Panda3D
|
This is a three-component vector distance (as opposed to a three-component point, which represents a particular point in space). More...
#include "lvector3.h"
Public Member Functions | |
LVector3d (const LVecBase3d ©) | |
LVector3d (double fill_value) | |
LVector3d (double x, double y, double z) | |
double | angle_deg (const LVector3d &other) const |
Returns the angle between this vector and the other one, expressed in degrees. | |
double | angle_rad (const LVector3d &other) const |
Returns the unsigned angle between this vector and the other one, expressed in radians. | |
LVector3d | cross (const LVecBase3d &other) const |
LVector2d | get_xy () const |
Returns a 2-component vector that shares just the first two components of this vector. | |
LVector2d | get_xz () const |
Returns a 2-component vector that shares just the first and last components of this vector. | |
LVector2d | get_yz () const |
Returns a 2-component vector that shares just the last two components of this vector. | |
LVector3d | operator* (double scalar) const |
LVecBase3d | operator+ (const LVecBase3d &other) const |
LVector3d | operator+ (const LVector3d &other) const |
LVector3d | operator- () const |
LVecBase3d | operator- (const LVecBase3d &other) const |
LVector3d | operator- (const LVector3d &other) const |
LVector3d | operator/ (double scalar) const |
LVector3d & | operator= (const LVecBase3d ©) |
LVector3d & | operator= (double fill_value) |
LVector3d | project (const LVecBase3d &onto) const |
Returns a new vector representing the projection of this vector onto another one. | |
double | relative_angle_deg (const LVector3d &other) const |
This method is deprecated. | |
double | relative_angle_rad (const LVector3d &other) const |
This method is deprecated. | |
double | signed_angle_deg (const LVector3d &other, const LVector3d &ref) const |
Returns the signed angle between two vectors. | |
double | signed_angle_rad (const LVector3d &other, const LVector3d &ref) const |
returns the signed angle between two vectors. | |
Static Public Member Functions | |
static LVector3d | back (CoordinateSystem cs=CS_default) |
Returns the back vector for the given coordinate system. | |
static LVector3d | down (CoordinateSystem cs=CS_default) |
Returns the down vector for the given coordinate system. | |
static LVector3d | forward (CoordinateSystem cs=CS_default) |
Returns the forward vector for the given coordinate system. | |
static TypeHandle | get_class_type () |
static void | init_type () |
static LVector3d | left (CoordinateSystem cs=CS_default) |
Returns the left vector for the given coordinate system. | |
static LVector3d | rfu (double right, double fwd, double up, CoordinateSystem cs=CS_default) |
Returns a vector that is described by its right, forward, and up components, in whatever way the coordinate system represents that vector. | |
static LVector3d | right (CoordinateSystem cs=CS_default) |
Returns the right vector for the given coordinate system. | |
static const LVector3d & | unit_x () |
Returns a unit X vector. | |
static const LVector3d & | unit_y () |
Returns a unit Y vector. | |
static const LVector3d & | unit_z () |
Returns a unit Z vector. | |
static LVector3d | up (CoordinateSystem cs=CS_default) |
Returns the up vector for the given coordinate system. | |
static const LVector3d & | 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.
Definition at line 723 of file lvector3.h.
double LVector3d::angle_deg | ( | const LVector3d & | other | ) | const [inline] |
Returns the angle between this vector and the other one, expressed in degrees.
Both vectors should be initially normalized.
Definition at line 1045 of file lvector3.h.
double LVector3d::angle_rad | ( | const LVector3d & | other | ) | const [inline] |
Returns the unsigned angle between this vector and the other one, expressed in radians.
Both vectors should be initially normalized.
Definition at line 1025 of file lvector3.h.
LVector3d LVector3d::back | ( | CoordinateSystem | cs = CS_default | ) | [inline, static] |
Returns the back vector for the given coordinate system.
Definition at line 1226 of file lvector3.h.
LVector3d LVector3d::down | ( | CoordinateSystem | cs = CS_default | ) | [inline, static] |
Returns the down vector for the given coordinate system.
Definition at line 1204 of file lvector3.h.
LVector3d LVector3d::forward | ( | CoordinateSystem | cs = CS_default | ) | [inline, static] |
Returns the forward vector for the given coordinate system.
Definition at line 1173 of file lvector3.h.
Referenced by EggXfmSAnim::compose_with_order().
LVector2d LVector3d::get_xy | ( | ) | const [inline] |
Returns a 2-component vector that shares just the first two components of this vector.
Reimplemented from LVecBase3d.
Definition at line 919 of file lvector3.h.
LVector2d LVector3d::get_xz | ( | ) | const [inline] |
Returns a 2-component vector that shares just the first and last components of this vector.
Reimplemented from LVecBase3d.
Definition at line 930 of file lvector3.h.
LVector2d LVector3d::get_yz | ( | ) | const [inline] |
Returns a 2-component vector that shares just the last two components of this vector.
Reimplemented from LVecBase3d.
Definition at line 941 of file lvector3.h.
LVector3d LVector3d::left | ( | CoordinateSystem | cs = CS_default | ) | [inline, static] |
Returns the left vector for the given coordinate system.
Definition at line 1215 of file lvector3.h.
LVector3d LVector3d::project | ( | const LVecBase3d & | onto | ) | const [inline] |
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 LVecBase3d.
Definition at line 1013 of file lvector3.h.
double LVector3d::relative_angle_deg | ( | const LVector3d & | other | ) | const [inline] |
double LVector3d::relative_angle_rad | ( | const LVector3d & | other | ) | const [inline] |
LVector3d LVector3d::rfu | ( | double | right, |
double | fwd, | ||
double | up, | ||
CoordinateSystem | cs = CS_default |
||
) | [inline, static] |
Returns a vector that is described by its right, forward, and up components, in whatever way the coordinate system represents that vector.
Definition at line 1240 of file lvector3.h.
LVector3d LVector3d::right | ( | CoordinateSystem | cs = CS_default | ) | [inline, static] |
Returns the right vector for the given coordinate system.
Definition at line 1162 of file lvector3.h.
Referenced by EggXfmSAnim::compose_with_order().
double LVector3d::signed_angle_deg | ( | const LVector3d & | other, |
const LVector3d & | ref | ||
) | const [inline] |
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.
Definition at line 1082 of file lvector3.h.
double LVector3d::signed_angle_rad | ( | const LVector3d & | other, |
const LVector3d & | ref | ||
) | const [inline] |
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.
Definition at line 1061 of file lvector3.h.
const LVector3d & LVector3d::unit_x | ( | ) | [inline, static] |
const LVector3d & LVector3d::unit_y | ( | ) | [inline, static] |
const LVector3d & LVector3d::unit_z | ( | ) | [inline, static] |
LVector3d LVector3d::up | ( | CoordinateSystem | cs = CS_default | ) | [inline, static] |
Returns the up vector for the given coordinate system.
Definition at line 1135 of file lvector3.h.
Referenced by EggXfmSAnim::compose_with_order().
const LVector3d & LVector3d::zero | ( | ) | [inline, static] |
Returns a zero-length vector.
Reimplemented from LVecBase3d.
Definition at line 878 of file lvector3.h.
Referenced by EggPolygon::calculate_normal(), EggTransform::get_component_vec3(), and FltToEggLevelState::set_transform().