DAVector3 Class

Creates a DAVector3 object that represents a three-dimensional vector. At any given time, the value of the vector is a direction and length (magnitude), specified as a triplet of coordinate values given as either Cartesian coordinates (x, y, z) or spherical coordinates (XYangle, YZangle, length). The direction of the vector is parallel to the ray that starts at the origin and passes through the point specified by the vector's coordinates, and the length is the distance between the origin and the point.

Because coordinate values are animated numbers, (DANumber objects), the direction and length of the vector can change over time as the animated numbers change.

This class inherits from the DABehavior Class.

For relevant functions and properties from the DAStatics class, see the following topics.

DAVector3 Functions

Div Creates a DAVector3 object that points in the same direction as the original vector but has a length that has been divided by scalar. Same as DivAnim except that scalar is a nonanimated number (a double).
DivAnim Creates a DAVector3 object that points in the same direction as the original vector but has a length that has been divided by scalar.
Mul Creates a DAVector3 object that points in the same direction as the original vector but has a length that has been multiplied by scalar. Same as MulAnim except that scalar is a nonanimated number (a double).
MulAnim Creates a DAVector3 object that points in the same direction as the original vector but has a length that has been multiplied by scalar.
NormalizeCreates a normalized DAVector3 object.
TransformCreates a DAVector3 object that is the result of applying the given transformation to the original vector.

DAVector3 Properties

LengthA read-only property with a DANumber value that represents the length of a DAVector3 object.
LengthSquaredA read-only property with a DANumber value that represents the length of a DAVector3 object squared.
SphericalCoordLengthA read-only property with a DANumber value represents the length (or magnitude) of the vector.
SphericalCoordXYAngleA read-only property with a DANumber value that is the counter-clockwise angle, in radians, of the vector about the y-axis, starting at positive z.
SphericalCoordYZAngleA read-only property with a DANumber object that is the YZ angle, in radians, going up from the XZ-plane towards the positive y-ray.
XA read-only property with a DANumber value that represents the x-coordinate of the DAVector3 object.
YA read-only property with a DANumber value that represents the y-coordinate of the DAVector3 object.
ZA read-only property with a DANumber value that represents the z-coordinate of the DAVector3 object.

DAVector3 Functions

This section contains reference material for the DAVector3 functions.

Div

DAVector3 Class

Creates a DAVector3 object that points in the same direction as the original vector but has a length that has been divided by scalar. Same as DivAnim except that scalar is a nonanimated number (a double).

Syntax

vector3Obj.Div( scalar )

Parameters

scalar
A double value used as the divider. This is a nonanimated number.

Return Value

Returns the DAVector3 object.

DivAnim

DAVector3 Class

Creates a DAVector3 object that points in the same direction as the original vector but has a length that has been divided by scalar.

Syntax

vector3Obj.DivAnim( scalar )

Parameters

scalar
DANumber object used as the divider. This must be an animated number.

Return Value

Returns the DAVector3 object.

See Also

MulAnim

Mul

DAVector3 Class

Creates a DAVector3 object that points in the same direction as the original vector but has a length that has been multiplied by scalar. Same as MulAnim except that scalar is a nonanimated number (a double).

Syntax

vector3Obj.Mul( scalar )

Parameters

scalar
A double value used as the multiplier. This is a nonanimated number.

Return Value

Returns the DAVector3 object.

MulAnim

DAVector3 Class

Creates a DAVector3 object that points in the same direction as the original vector but has a length that has been multiplied by scalar.

Syntax

vector3Obj.MulAnim( scalar )

Parameters

scalar
DANumber object used as the multiplier. This must be an animated number.

Return Value

Returns the DAVector3 object.

See Also

DivAnim

Normalize

DAVector3 Class

Creates a normalized DAVector3 object. The normalized vector has the same direction as the original vector, but the length is 1.

Syntax

vector3Obj.Normalize()

Return Value

Returns the DAVector3 object.

Transform

DAVector3 Class

Creates a DAVector3 object that is the result of applying the given transformation to the original vector. The translation elements of the transformation are ignored because translation does not apply to vectors.

Syntax

vector3Obj.Transform( xf )

Parameters

xf
DATransform3 object.

Return Value

Returns the DAVector3 object.

Remarks

This function composes values. The resulting transformation is the new value applied to the old value.

DAVector3 Properties

This section contains reference material for the DAVector3 properties.

Length

DAVector3 Class

A read-only property with a DANumber value that represents the length of a DAVector3 object.

Syntax

vector3Obj.Length

See Also

LengthSquared

LengthSquared

DAVector3 Class

A read-only property with a DANumber value that represents the length of a DAVector3 object squared.

Syntax

vector3Obj.LengthSquared

See Also

Length

SphericalCoordLength

DAVector3 Class

A read-only property with a DANumber value represents the length (or magnitude) of the vector.

Syntax

vector3Obj.SphericalCoordLength

SphericalCoordXYAngle

DAVector3 Class

A read-only property with a DANumber value that is the counter-clockwise angle, in radians, of the vector about the y-axis, starting at positive z. The range is [-Pi, +Pi].

Syntax

vector3Obj.SphericalCoordXYAngle

SphericalCoordYZAngle

DAVector3 Class

A read-only property with a DANumber object that is the YZ angle, in radians, going up from the XZ-plane toward the positive y-ray. The range is [-Pi/2, +Pi/2].

Syntax

vector3Obj.SphericalCoordYZAngle

X

DAVector3 Class

A read-only property with a DANumber value that represents the x-coordinate of the DAVector3 object.

Syntax

vector3Obj.X

See Also

Y, Z, Vector3Anim

Y

DAVector3 Class

A read-only property with a DANumber value that represents the y-coordinate of the DAVector3 object.

Syntax

vector3Obj.Y

See Also

X, Z, Vector3Anim

Z

DAVector3 Class

A read-only property with a DANumber value that represents the z-coordinate of the DAVector3 object.

Syntax

vector3Obj.Z

See Also

X, Y, Vector3Anim


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.