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. Normalize Creates a normalized DAVector3 object. Transform Creates a DAVector3 object that is the result of applying the given transformation to the original vector.
DAVector3 Properties
Length A read-only property with a DANumber value that represents the length of a DAVector3 object. LengthSquared A read-only property with a DANumber value that represents the length of a DAVector3 object squared. SphericalCoordLength A read-only property with a DANumber value represents the length (or magnitude) of the vector. SphericalCoordXYAngle 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. SphericalCoordYZAngle A 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. X A read-only property with a DANumber value that represents the x-coordinate of the DAVector3 object. Y A read-only property with a DANumber value that represents the y-coordinate of the DAVector3 object. Z A read-only property with a DANumber value that represents the z-coordinate of the DAVector3 object.
This section contains reference material for the DAVector3 functions.
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.
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
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.
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
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.
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.
This section contains reference material for the DAVector3 properties.
A read-only property with a DANumber value that represents the length of a DAVector3 object.
Syntax
vector3Obj.Length
See Also
A read-only property with a DANumber value that represents the length of a DAVector3 object squared.
Syntax
vector3Obj.LengthSquared
See Also
A read-only property with a DANumber value represents the length (or magnitude) of the vector.
Syntax
vector3Obj.SphericalCoordLength
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
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
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
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
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
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.