    Contents  Index  Topic Contents
    Previous Topic: DAVector2 Class
    Next Topic: DAViewerControl Class

> ## 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.

> - DAVector3 Functions
> - DAVector3 Properties
> - Relevant Functions from the DAStatics Class
> - Relevant Properties from the DAStatics Class

> ### DAVector3 Functions

> DivAnim

> Div

> MulAnim

> Mul

> Normalize

> Transform

> ####

> 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.

> vector3Obj.DivAnim(
> scalar
> )

> ##### Parameters

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

> ##### Return Values

> Returns the DAVector3 object.

> ##### See Also

> MulAnim

> ####

> Div

> DAVector3 Class

> Same as DivAnim except that scalar is a non-animated number (a double).

> vector3Obj.Div(
> scalar
> )

> ####

> 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.

> vector3Obj.MulAnim(
> scalar
> )

> ##### Parameters

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

> ##### Return Values

> Returns the DAVector3 object.

> ##### See Also

> DivAnim

> ####

> Mul

> DAVector3 Class

> Same as MulAnim except that scalar is a non-animated number (a double).

> vector3Obj.Mul(
> scalar
> )

> ####

> Normalize

> DAVector3 Class

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

> vector3Obj.Normalize

> ##### Return Values

> 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.

> vector3Obj.Transform(
> xf
> )

> ##### Parameters

> xf
>   A DATransform3 object.

> ##### Return Values

> Returns the DAVector3 object.

> ##### Remarks

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

> ### DAVector3 Properties

> Length

> LengthSquared

> SphericalCoordLength

> vector3Obj.SphericalCoordXYAngle

> SphericalCoordYZAngle

> X

> Y

> Z

> ####

> Length

> DAVector3 Class

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

> 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.

> vector3Obj.LengthSquared

> ##### See Also

> Length

> ####

> SphericalCoordLength

> DAVector3 Class

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

> vector3Obj.SphericalCoordLength

> ####

> vector3Obj.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].

> 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 towards the positive y-ray. The range is [-Pi/2, +Pi/2].

> vector3Obj.SphericalCoordYZAngle

> ####

> X

> DAVector3 Class

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

> 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.

> 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.

> vector3Obj.Z

> ##### See Also

> X, Y, Vector3Anim

> ### Relevant Functions from the DAStatics Class

> The following functions are defined in the DAStatics class and are most relevant to objects of type DAVector3.

> lib.AddVector3(v1, v2)

> lib.CrossVector3(v1, v2)

> lib.DerivativeVector3(vec)

> lib.DotVector3(v1, v2)

> lib.IntegralVector3(vec)

> lib.NegVector3(v1)

> lib.SubVector3(v1, v2)

> lib.Vector3Anim(x, y)

> lib.Vector3(x, y)

> lib.Vector3BSpline(degree, knots, control_elements, weights, evaluation)

> lib.Vector3SphericalAnim(XYangle, YZangle, length)

> lib.Vector3Spherical(XYangle, YZangle, length)

> ### Relevant Properties from the DAStatics Class

> The following properties are defined in the DAStatics class and are most relevant to objects of type DAVector3.

> lib.XVector3

> lib.YVector3

> lib.ZVector3

> lib.ZeroVector3

> © 1998 Microsoft Corporation. All rights reserved. Terms of Use.

> Top of Page