DAStatics Functions Relevant to DAVector3 Objects

AddVector3 Creates a DAVector3 object. The direction and length of the vector are calculated by adding the corresponding coordinates of the given vectors.
CrossVector3 Creates a DAVector3 object that represents the "cross product" of the given vectors.
DerivativeVector3 Creates a DAVector3 object that is the instantaneous derivative (rate of change) of the given vector.
DotVector3 Creates DANumber object that represents the "dot product" of the given vectors.
IntegralVector3 Creates a DAVector3 object that represents the sum of all the values of vec from the given start time to the present.
NegVector3 Creates a DAVector3 object that has the same length as the original vector, but points in the opposite direction.
SubVector3 Creates a DAVector3 object. The direction and length of the vector are calculated by subtracting the coordinates of v2 from the corresponding coordinates of v1.
Vector3 Creates a DAVector3 object having a direction and length as specified by the given Cartesian coordinates. Same as Vector3Anim except that x, y, and z are nonanimated numbers (doubles).
Vector3Anim Creates a DAVector3 object having a direction and length as specified by the given Cartesian coordinates.
Vector3BSpline Creates a DAVector3 behavior based on a B-spline function.
Vector3Spherical Creates a DAVector3 object having a direction and length as specified by the given spherical coordinates. Same as Vector3SphericalAnim except that XYangle, YZangle, and length are nonanimated numbers (doubles).
Vector3SphericalAnim Creates a DAVector3 object having a direction and length as specified by the given spherical coordinates.

AddVector3

DAStatics Class

Creates a DAVector3 object. The direction and length of the vector are calculated by adding the corresponding coordinates of the given vectors.

Syntax

lib.AddVector3( v1, v2 )

Parameters

v1 and v2
DAVector3 objects.

Return Value

Returns the DAVector3 object.

See Also

SubVector3

CrossVector3

DAStatics Class

Creates a DAVector3 object that represents the "cross product" of the given vectors. The new vector has a length that is equal to the product of the lengths of the original vectors and the sine of the angle between them. The new vector has a direction that is perpendicular to the plane formed by the original vectors and that obeys the right-hand rule.

Syntax

lib.CrossVector3( v1, v2 )

Parameters

v1 and v2
DAVector3 objects.

Return Value

Returns the DAVector3 object.

DerivativeVector3

DAStatics Class

Creates a DAVector3 object that is the instantaneous derivative (rate of change) of the given vector. For example, a constant vector behavior yields a constant derivative of [0 0 0], and Vector3 (time, 0, 0) (without any additional time substitutions) yields a constant derivative vector of [1 0 0].

Syntax

lib.DerivativeVector3( vec )

Parameters

vec
DAVector3 object.

Return Value

Returns the DAVector3 object.

DotVector3

DAStatics Class

Creates DANumber object that represents the "dot product" of the given vectors. The dot product is the product of the lengths of the vectors and the cosine of the angle between them.

Syntax

lib.DotVector3( v1, v2 )

Parameters

v1 and v2
DAVector3 objects.

Return Value

Returns the DANumber object.

IntegralVector3

DAStatics Class

Creates a DAVector3 object that represents the sum of all the values of vec from the given start time to the present.

Syntax

lib.IntegralVector3( vec )

Parameters

vec
DAVector3 object.

Return Value

Returns the DAVector3 object.

NegVector3

DAStatics Class

Creates a DAVector3 object that has the same length as the original vector, but points in the opposite direction.

Syntax

lib.NegVector3( v1 )

Parameters

v1
DAVector3 object that is the original vector.

Return Value

Returns the DAVector3 object.

SubVector3

DAStatics Class

Creates a DAVector3 object. The direction and length of the vector are calculated by subtracting the coordinates of v2 from the corresponding coordinates of v1.

Syntax

lib.SubVector3( v1, v2 )

Parameters

v1 and v2
DAVector3 objects.

Return Value

Returns the DAVector3 object.

See Also

AddVector3

Vector3

DAStatics Class

Creates a DAVector3 object having a direction and length as specified by the given Cartesian coordinates. Same as Vector3Anim except that x, y, and z are nonanimated numbers (doubles).

Syntax

lib.Vector3( x, y, z )

Parameters

x, y, and z
Values specifying the coordinate values. The x specifies a distance along the x-axis from the origin to a point, y specifies a distance along the y-axis, and z a distance along the z-axis. These are nonanimated numbers (double values).

Return Value

Returns the DAVector3 object.

Vector3Anim

DAStatics Class

Creates a DAVector3 object having a direction and length as specified by the given Cartesian coordinates.

Syntax

lib.Vector3Anim( x, y, z )

Parameters

x, y, and z
DANumber objects specifying the coordinate values. The x specifies a distance along the x-axis from the origin to a point, y specifies a distance along the y-axis, and z a distance along the z-axis. These must be animated numbers.

Return Value

Returns the DAVector3 object.

See Also

Vector3SphericalAnim

Vector3BSpline

DAStatics Class

Creates a DAVector3 behavior based on a B-spline function. The function depends on the control elements, the knot vector, the mathematical degree, and the weights of the control elements (these are optional).

Syntax

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

Parameters

degree
Number (long) representing the mathematical degree of the B-spline to evaluate. Must be 1, 2, or 3.
knots
Array (variant) of DANumber objects representing the knots used to calculate the B-spline.
control_elements
Array (variant) of DAVector3 objects representing the control elements used to calculate the B-spline.
weights
Array (variant) of DANumber objects representing the weights used to calculate the rational B-spline. There must be the same number of weights as control elements. For nonrational B-splines, the value of weights is null.
evaluation
DANumber object that controls the spline evaluation. This must be an animated number.

Return Value

Returns the DAVector3 object.

Remarks

A B-spline function without weights is piecewise polynomial and with weights is piecewise rational (the quotient of two polynomials). It requires that:

numberOfControlElements = numberOfKnots - degree + 1

The control elements define the approximate direction and shape of the function. The knots represent junction values, in parameter space, between the connected polynomial parts.

Given a degree d and a number of knots k, the function is valid in the range knotd to knotk-d+1, and is otherwise undefined. For example, for a degree 2 curve, the valid range is from the second knot to the next to the last knot, inclusive.

The returned DAVector3 is the traversal of the spline function according to the evaluation parameter. The evaluation parameter is a DANumber that must be in the valid range of the spline, which is [knotd, knotk-d+1]. Any values outside this range are automatically clamped to the end values.

Vector3Spherical

DAStatics Class

Creates a DAVector3 object having a direction and length as specified by the given spherical coordinates. Same as Vector3SphericalAnim except that XYangle, YZangle, and length are nonanimated numbers (doubles).

Syntax

lib.Vector3Spherical( XYangle, YZangle, length )

Parameters

XYangle
A double value indicating the counterclockwise XY angle, in radians, of the point about the positive y-axis. The angle begins at the positive z-ray, so that [0 0 1] has a theta of 0, and [1 0 0] has a theta of pi/2. This is a nonanimated number.
YZangle
A double value indicating the counterclockwise elevation angle, in radians, of the point above the XZ-plane. A YZangle of pi/2 means the point is straight up (on the positive y-ray), and a YZangle of –pi/2 is straight down (on the negative y-ray). This is a nonanimated number.
length
A double value indicating the length of the vector. This is a nonanimated number.

Return Value

Returns the DAVector3 object.

Remarks

The following table correlates Cartesian coordinates with spherical coordinates (X means "Don't Care").

Cartesian coordinatesXYangleYZanglelength
[0 0 0] X X 0
[d 0 0] pi/2 0 d
[–d 0 0] –pi/2 0 d
[0 d 0] X pi/2 d
[0 –d 0] X –pi/2 d
[0 0 d] 0 0 d
[0 0 –d] pi 0 d

Vector3SphericalAnim

DAStatics Class

Creates a DAVector3 object having a direction and length as specified by the given spherical coordinates.

Syntax

lib.Vector3SphericalAnim( XYangle, YZangle, length )

Parameters

XYangle
DANumber object of the counterclockwise XY angle, in radians, of the point about the positive y-axis. The angle begins at the positive z-ray, so that [0 0 1] has a theta of 0, and [1 0 0] has a theta of pi/2. This must be an animated number.
YZangle
DANumber object of the counterclockwise elevation angle, in radians, of the point above the XZ-plane. A YZangle of pi/2 means the point is straight up (on the positive y-ray), and a YZangle of –pi/2 is straight down (on the negative y-ray). This must be an animated number.
length
DANumber object specifying the length of the vector. This must be an animated number.

Return Value

Returns the DAVector3 object.

Remarks

The following table correlates Cartesian coordinates with spherical coordinates (X means "Don't Care").

Cartesian coordinatesXYangleYZanglelength
[0 0 0] X X 0
[d 0 0] pi/2 0 d
[–d 0 0] –pi/2 0 d
[0 d 0] X pi/2 d
[0 –d 0] X –pi/2 d
[0 0 d] 0 0 d
[0 0 –d] pi 0 d

See Also

Vector3Anim


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