add Creates a three-dimensional vector behavior. The direction and length of the vector are calculated by adding the corresponding coordinates of the given vectors. bSpline Creates a Vector3Bvr behavior based on a B-spline function. cross Creates a vector behavior that represents the "cross product" of the given vectors. derivative Creates a new, three-dimensional vector behavior that is the instantaneous derivative (rate of change) of the given vector behavior. dot Creates a number behavior that represent the "dot product" of the given vectors. integral Creates a three-dimensional vector that represents the sum of the all values of vec from the given start time to the present. neg Creates a new three-dimensional vector behavior that has the same length as the original vector, but points in the opposite direction. sub Creates a three-dimensional vector behavior. The direction and length of the vector are calculated by subtracting the coordinates of v2 from the corresponding coordinates of v1. vector3Spherical Creates a three-dimensional vector behavior, having a direction and length as specified by the given spherical coordinates. vector3 Creates a three-dimensional vector behavior, having a direction and length as specified by the given Cartesian coordinates.
Creates a three-dimensional vector behavior. The direction and length of the vector are calculated by adding the corresponding coordinates of the given vectors.
Syntax
public static Vector3Bvr add( Vector3Bvr v1, Vector3Bvr v2 );
Parameters
- v1 and v2
- Vector3Bvr objects.
Return Value
Returns the Vector3Bvr object.
See Also
Creates a Vector3Bvr 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
public static Vector3Bvr bSpline( int degree, NumberBvr[] knots, Vector3Bvr[] control_elements, NumberBvr[] weights, NumberBvr evaluation );
Parameters
- degree
- Number representing the mathematical degree of the B-spline to evaluate. Must be 1, 2, or 3.
- knots
- Array of NumberBvr objects representing the knots used to calculate the B-spline.
- control_elements
- Array of Vector3Bvr objects representing the control elements used to calculate the B-spline.
- weights
- Array of NumberBvr 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
- A NumberBvr object that controls the spline evaluation. See Remarks for more information.
Return Value
Returns the Vector3Bvr 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 Vector3Bvr is the traversal of the spline function according to the evaluation parameter. The evaluation parameter is a NumberBvr 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.
Creates a vector behavior 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
public static Vector3Bvr cross( Vector3Bvr v1, Vector3Bvr v2 );
Parameters
- v1 and v2
- Vector3Bvr objects.
Return Value
Returns the Vector3Bvr object.
Creates a new, three-dimensional vector behavior that is the instantaneous derivative (rate of change) of the given vector behavior. 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
public static Vector3Bvr derivative( Vector3Bvr vec );
Parameters
- vec
- Vector3Bvr object.
Return Value
Returns the Vector3Bvr object.
Creates a number behavior that represent 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
public static NumberBvr dot( Vector3Bvr v1, Vector3Bvr v2 );
Parameters
- v1 and v2
- Vector3Bvr objects.
Return Value
Returns the NumberBvr object.
Creates an three-dimensional vector that represents the sum of the all values of vec from the given start time to the present.
Syntax
public static Vector3Bvr integral( Vector3Bvr vec );
Parameters
- a
- Vector3Bvr object.
Return Value
Returns the Vector3Bvr object.
Creates a new three-dimensional vector behavior that has the same length as the original vector, but points in the opposite direction.
Syntax
public static Vector3Bvr neg( Vector3Bvr v1 );
Parameters
- v1
- Vector3Bvr object that is the original vector.
Return Value
Returns the Vector3Bvr object.
Creates a three-dimensional vector behavior. The direction and length of the vector are calculated by subtracting the coordinates of v2 from the corresponding coordinates of v1.
Syntax
public static Vector3Bvr sub( Vector3Bvr v1, Vector3Bvr v2 );
Parameters
- v1 and v2
- Vector3Bvr objects.
Return Value
Returns the Vector3Bvr object.
See Also
Creates a three-dimensional vector behavior, having a direction and length as specified by the given spherical coordinates.
Syntax
public static Vector3Bvr vector3Spherical( NumberBvr XYangle, NumberBvr YZangle, NumberBvr length );
Parameters
- XYangle
- NumberBvr object of the counter-clockwise 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 XYangle of 0, and [1 0 0] has a XYangle of pi/2. This parameter can also be of type double.
- YZangle
- NumberBvr object of the counter-clockwise 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 parameter can also be of type double.
- length
- NumberBvr object specifying the length of the vector. This parameter can also be of type double.
Return Value
Returns the Vector3Bvr object.
Remarks
The following table correlates Cartesian coordinates with spherical coordinates (X = Don't Care).
Cartesian coordinates XYangle YZangle Length [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
Creates a three-dimensional vector behavior, having a direction and length as specified by the given Cartesian coordinates.
Syntax
public static Vector3Bvr vector3( NumberBvr x, NumberBvr y, NumberBvr z );
Parameters
- x, y, and z
- NumberBvr 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 parameters can also be of type double.
Return Value
Returns the Vector3Bvr object.
See Also
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.