This is a three-component vector distance (as opposed to a three-component point, which represents a particular point in space). More...
Public Member Functions | |
Vec3D () | |
Vec3D (VBase3D const copy) | |
Vec3D (double fill_value) | |
Vec3D (double x, double y, double z) | |
double | angleDeg (Vec3D const other) |
Returns the angle between this vector and the other one, expressed in degrees. | |
double | angleRad (Vec3D const other) |
Returns the unsigned angle between this vector and the other one, expressed in radians. | |
Vec3D | cross (VBase3D const other) |
PyObject | getattr (string attr_name) |
Vec2D | getXy () |
Returns a 2-component vector that shares just the first two components of this vector. | |
Vec2D | getXz () |
Returns a 2-component vector that shares just the first and last components of this vector. | |
Vec2D | getYz () |
Returns a 2-component vector that shares just the last two components of this vector. | |
Vec3D | operator* (double scalar) |
VBase3D | operator+ (VBase3D const other) |
Vec3D | operator+ (Vec3D const other) |
Vec3D | operator- () |
VBase3D | operator- (VBase3D const other) |
Vec3D | operator- (Vec3D const other) |
Vec3D | operator/ (double scalar) |
Vec3D | operator= (VBase3D const copy) |
Vec3D | operator= (double fill_value) |
Vec3D | project (VBase3D const onto) |
Returns a new vector representing the projection of this vector onto another one. | |
pythonRepr (ostream out, string class_name) | |
double | relativeAngleDeg (Vec3D const other) |
This method is deprecated. | |
double | relativeAngleRad (Vec3D const other) |
This method is deprecated. | |
int | setattr (PyObject self, string attr_name, PyObject assign) |
double | signedAngleDeg (Vec3D const other, Vec3D const ref) |
Returns the signed angle between two vectors. | |
double | signedAngleRad (Vec3D const other, Vec3D const ref) |
returns the signed angle between two vectors. | |
Static Public Member Functions | |
static Vec3D | back (CoordinateSystem cs) |
Returns the back vector for the given coordinate system. | |
static Vec3D | back () |
Returns the back vector for the given coordinate system. | |
static Vec3D | down (CoordinateSystem cs) |
Returns the down vector for the given coordinate system. | |
static Vec3D | down () |
Returns the down vector for the given coordinate system. | |
static Vec3D | forward (CoordinateSystem cs) |
Returns the forward vector for the given coordinate system. | |
static Vec3D | forward () |
Returns the forward vector for the given coordinate system. | |
static TypeHandle | getClassType () |
static Vec3D | left (CoordinateSystem cs) |
Returns the left vector for the given coordinate system. | |
static Vec3D | left () |
Returns the left vector for the given coordinate system. | |
static Vec3D | rfu (double right, double fwd, double up, CoordinateSystem cs) |
Returns a vector that is described by its right, forward, and up components, in whatever way the coordinate system represents that vector. | |
static Vec3D | rfu (double right, double fwd, double up) |
Returns a vector that is described by its right, forward, and up components, in whatever way the coordinate system represents that vector. | |
static Vec3D | right (CoordinateSystem cs) |
Returns the right vector for the given coordinate system. | |
static Vec3D | right () |
Returns the right vector for the given coordinate system. | |
static Vec3D const | unitX () |
Returns a unit X vector. | |
static Vec3D const | unitY () |
Returns a unit Y vector. | |
static Vec3D const | unitZ () |
Returns a unit Z vector. | |
static Vec3D | up (CoordinateSystem cs) |
Returns the up vector for the given coordinate system. | |
static Vec3D | up () |
Returns the up vector for the given coordinate system. | |
static Vec3D const | zero () |
Returns a zero-length vector. |
This is a three-component vector distance (as opposed to a three-component point, which represents a particular point in space).
Some of the methods are slightly different between LPoint3 and LVector3; in particular, subtraction of two points yields a vector, while addition of a vector and a point yields a point.
Vec3D | ( | ) |
Vec3D | ( | double | fill_value | ) |
Vec3D | ( | double | x, |
double | y, | ||
double | z | ||
) |
Returns the angle between this vector and the other one, expressed in degrees.
Both vectors should be initially normalized.
Returns the unsigned angle between this vector and the other one, expressed in radians.
Both vectors should be initially normalized.
static Vec3D back | ( | CoordinateSystem | cs | ) | [static] |
Returns the back vector for the given coordinate system.
static Vec3D down | ( | CoordinateSystem | cs | ) | [static] |
Returns the down vector for the given coordinate system.
static Vec3D forward | ( | CoordinateSystem | cs | ) | [static] |
Returns the forward vector for the given coordinate system.
static TypeHandle getClassType | ( | ) | [static] |
Reimplemented from VBase3D.
Returns a 2-component vector that shares just the first two components of this vector.
Reimplemented from VBase3D.
Returns a 2-component vector that shares just the first and last components of this vector.
Reimplemented from VBase3D.
Returns a 2-component vector that shares just the last two components of this vector.
Reimplemented from VBase3D.
static Vec3D left | ( | CoordinateSystem | cs | ) | [static] |
Returns the left vector for the given coordinate system.
Returns a new vector representing the projection of this vector onto another one.
The resulting vector will be a scalar multiple of onto.
Reimplemented from VBase3D.
pythonRepr | ( | ostream | out, |
string | class_name | ||
) |
Reimplemented from VBase3D.
double relativeAngleDeg | ( | Vec3D const | other | ) |
This method is deprecated.
Do not use.
double relativeAngleRad | ( | Vec3D const | other | ) |
This method is deprecated.
Do not use.
static Vec3D rfu | ( | double | right, |
double | fwd, | ||
double | up, | ||
CoordinateSystem | cs | ||
) | [static] |
Returns a vector that is described by its right, forward, and up components, in whatever way the coordinate system represents that vector.
INLINE_LINMATH FLOATNAME(LVector3) & FLOATNAME(LVector3)::
Returns a vector that is described by its right, forward, and up components, in whatever way the coordinate system represents that vector.
INLINE_LINMATH FLOATNAME(LVector3) & FLOATNAME(LVector3)::
static Vec3D right | ( | CoordinateSystem | cs | ) | [static] |
Returns the right vector for the given coordinate system.
double signedAngleDeg | ( | Vec3D const | other, |
Vec3D const | ref | ||
) |
Returns the signed angle between two vectors.
The angle is positive if the rotation from this vector to other is clockwise when looking in the direction of the ref vector.
Vectors (except the ref vector) should be initially normalized.
double signedAngleRad | ( | Vec3D const | other, |
Vec3D const | ref | ||
) |
returns the signed angle between two vectors.
The angle is positive if the rotation from this vector to other is clockwise when looking in the direction of the ref vector.
Vectors (except the ref vector) should be initially normalized.
static Vec3D up | ( | CoordinateSystem | cs | ) | [static] |
Returns the up vector for the given coordinate system.