Point4 Values

Value > Basic Data Values > Point4 Values

 

   

Values and Collections - Quick Navigation

The Point4 class defines the characteristics of points in 4D space (for example RGBA color space).

These values contain 4 component floating point numbers and can be used to express floating point color values where the components are the Red, Green, Blue and Alpha values.

This value class was first introduced in 3ds Max 6 to accommodate floating point colors required by the mental ray renderer.

Several Point4 controllers were also introduced to store animation of parameters containing Point4 values.

   

Literals

[<expr>, <expr>, <expr>, <expr>]

Constructors

point4 <x> <y> <z> <w>
<color> as point4

   

Properties

<point4>.x: Float --the x component
<point4>.y: Float --the y component
<point4>.z: Float --the z component
<point4>.w: Float --the w component

Operators

<point4> == <point4>
<point4> != <point4>
 
<point4> + <point4_or_number>
<point4> - <point4_or_number>
<point4> * <point4_or_number>
<point4> / <point4_or_number>

Standard vector arithmetic.

If the second operand is a number, the operation is performed on each component of the value.

   

- <point4>

Unary minus

   

<point4>[<integer>]

Returns a component of the Point4 as a float.

Valid range on the index is 1 to 4.

   

<point4>[<integer>] = <float>

Sets a component of the Point4 to the float.

Valid range on the index is 1 to4.

   

Methods

copy <point4>

Creates a new copy of the Point4 value.

The new value contains a copy of the input Point4 value, and is independent of the input Point4 value.

FOR EXAMPLE

oldValue = Point4 1.0 2.0 3.0 4.0--define a Point4 value
[1,2,3,4]
newValue1 = copy oldValue--create a copy of the value
[1,2,3,4]
newValue2 = oldValue--variable newValue2 points at the same value!
[1,2,3,4]
newValue2.x = 10.0--set the x component of the instance to 10
10.0
newValue2--see the result
[10,2,3,4]
oldValue--note that the original value was also changed!
[10,2,3,4]
newValue1--but the copy was independent and did not change!
[1,2,3,4]
random <point4> <point4>

Generates a pseudo-random point between the given points.

   

length <point4>

Returns the length of the 4D vector.

   

distance <point4> <point4>

Returns the distance between the points in 4D space.

   

normalize <point4>

Returns the point4 value normalized such that the 4D vector length equals 1.

   

See Also