Statics Methods Relevant to Vector2Bvr Objects

add Creates a two-dimensional vector behavior that is the vector-valued sum of the two vectors.
bSpline Creates a Vector2Bvr behavior based on a B-spline function.
derivative Creates a new, two-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 two-dimensional vector that represents the sum of the all values of vec from the given start time to the present.
neg Creates a new two-dimensional vector that is the same length as the original vector but points in the opposite direction.
sub Creates a two-dimensional vector behavior.
vector2 Creates a two-dimensional vector behavior, having a direction and length as specified by the given Cartesian coordinates.
vector2Polar Creates a two-dimensional vector behavior, having a direction and length as specified by the given polar coordinates.
vector2PolarDegrees Creates a two-dimensional vector behavior, having a direction and length as specified by the given polar coordinates.

add

Statics Class

Creates a two-dimensional vector behavior that is the vector-valued sum of the two vectors.

Syntax

public static Vector2Bvr add( Vector2Bvr v1, Vector2Bvr v2 );

Parameters

v1 and v2
Vector2Bvr objects.

Return Value

Returns the Vector2Bvr object.

See Also

sub

bSpline

Statics Class

Creates a Vector2Bvr 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 Vector2Bvr bSpline(
     int degree,
     NumberBvr[] knots,
     Vector2Bvr[] 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 Point2Bvr 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 non-rational B-splines, the value of weights is null.
evaluation
NumberBvr object that controls the spline evaluation.

Return Value

Returns the Vector2Bvr 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 Vector2Bvr 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.

derivative

Statics Class

Creates a new, two-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], and vector2(time, 0) (without any additional time substitutions) yields a constant derivative vector of [1 0].

Syntax

public static Vector2Bvr derivative( Vector2Bvr vec );

Parameters

vec
Vector2Bvr object.

Return Value

Returns the Vector2Bvr object.

dot

Statics Class

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( Vector2Bvr v1, Vector2Bvr v2 );

Parameters

v1 and v2
Vector2Bvr objects.

Return Value

Returns the NumberBvr object.

integral

Statics Class

Creates an two-dimensional vector that represents the sum of the all values of vec from the given start time to the present.

Syntax

public static Vector2Bvr integral( Vector2Bvr vec );

Parameters

a
Vector2Bvr object.

Return Value

Returns the Vector2Bvr object.

neg

Statics Class

Creates a new two-dimensional vector that is the same length as the original vector but points in the opposite direction.

Syntax

public static Vector2Bvr neg( Vector2Bvr v1 );

Parameters

v1
Vector2Bvr object that is the original vector.

Return Value

Returns the Vector2Bvr object.

sub

Statics Class

Creates a two-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 Vector2Bvr sub( Vector2Bvr v1, Vector2Bvr v2 );

Parameters

v1 and v2
Vector2Bvr objects.

Return Value

Returns the Vector2Bvr object.

See Also

add

vector2

Statics Class

Creates a two-dimensional vector behavior, having a direction and length as specified by the given Cartesian coordinates.

Syntax

public static Vector2Bvr vector2( NumberBvr x, NumberBvr y );

Parameters

x
NumberBvr object specifying the distance along the x-axis from the origin to a point. This parameter can also be of type double.
y
NumberBvr object specifying the distance along the y-axis. This parameter can also be of type double.

Return Value

Returns the Vector2Bvr object.

See Also

vector2Polar

vector2Polar

Statics Class

Creates a two-dimensional vector behavior, having a direction and length as specified by the given polar coordinates.

Syntax

public static Vector2Bvr vector2Polar( NumberBvr XYangle, NumberBvr length );

Parameters

XYangle
NumberBvr object that is the counter-clockwise angle of the vector, in radians, from the positive x-ray. This parameter can also be of type double.
length
NumberBvr object that is the length of the vector. This parameter can also be of type double.

Return Value

Returns the Vector2Bvr object.

See Also

vector2

vector2PolarDegrees

Statics Class

Creates a two-dimensional vector behavior, having a direction and length as specified by the given polar coordinates.

Syntax

public static Vector2Bvr vector2PolarDegrees( double XYangle, double length );

Parameters

XYangle
The double that is the counter-clockwise angle of the vector (expressed in degrees) from the positive x-ray.
length
The double that is the length of the vector.

Return Value

Returns the Vector2Bvr object.


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