#include <points.H>
Inheritance diagram for mlib::Wvec:
Public Types | |
typedef double | value_type |
Public Member Functions | |
Vec3 () | |
Default constructor. Creates a zero length vector. | |
Vec3 (double x, double y, double z) | |
Constructor that sets the components of the vector to the values specified in the arguments. | |
const double * | data () const |
Returns the elements of the vector as an array. | |
void | set (double x, double y, double z) |
Sets the components of the vector to the values specified in the arguments. | |
double | operator[] (int index) const |
double & | operator[] (int index) |
Wvec | operator+ (const Wvec &v) const |
Wvec | operator- (const Wvec &v) const |
Wvec | operator- () const |
double | operator * (const Wvec &v) const |
Wvec | operator * (double s) const |
Wvec | operator/ (double s) const |
void | operator+= (const Wvec &v) |
void | operator-= (const Wvec &v) |
void | operator *= (double s) |
void | operator/= (double s) |
int | operator> (const Wvec &v) const |
int | operator< (const Wvec &v) const |
bool | operator== (const Wvec &v) const |
bool | operator!= (const Wvec &v) const |
double | length () const |
double | length_sqrd () const |
double | length_rect () const |
bool | is_null (double epsSqrd=epsNorSqrdMath()) const |
Is the vector's length equal to zero? | |
double | dist (const Wvec &v) const |
Compute the distance between the two vectors. | |
double | dist_sqrd (const Wvec &v) const |
Compute the distance squared between the two vectors. | |
double | angle (const Wvec &) const |
Compute the angle between the two vectors. The result will be in the range 0 to pi radians. | |
double | tlen (const Wvec &b) const |
Returns (this * b) / (b * b). | |
Wvec | projected (const Wvec &b) const |
Returns the projection of this onto b. | |
Wvec | orthogonalized (const Wvec &b) const |
Returns this vector minus its projection onto b. | |
bool | is_equal (const Wvec &v, double epsSqrd=epsNorSqrdMath()) const |
Are the two vectors equal? | |
bool | is_parallel (const Wvec &) const |
Are the two vectors parallel? | |
bool | is_perpend (const Wvec &) const |
Are the two vectors perpendicular? | |
Wvec | normalized () const |
Return a unit-length copy of this vector. | |
Wvec | perpend () const |
Return a vector perpendicular to this one using an arbitrary axis algorithm. | |
Constructors | |
Wvec () | |
Wvec (CXYpt &) | |
Wvec (CNDCZvec &, CWtransf &) | |
Wvec (double x, double y, double z) | |
Wvec (CWpt &, CVEXEL &) | |
Static Public Member Functions | |
static CWvec & | null () |
static CWvec & | X () |
static CWvec & | Y () |
static CWvec & | Z () |
static int | dim () |
Protected Attributes | |
double | _x |
double | _y |
double | _z |
Static Protected Attributes | |
static CWvec | _null_vec |
static CWvec | _x_axis |
static CWvec | _y_axis |
static CWvec | _z_axis |
Definition at line 203 of file points.H.
|
|
|
|
|
Definition at line 100 of file points.C. References XYtoWvec. |
|
|
|
|
|
|
|
Compute the angle between the two vectors. The result will be in the range 0 to pi radians.
|
|
Returns the elements of the vector as an array.
Definition at line 58 of file vec3.H. References mlib::Vec3< V >::_x. |
|
|
|
Compute the distance between the two vectors.
|
|
Compute the distance squared between the two vectors.
|
|
Are the two vectors equal?
Definition at line 148 of file vec3.H. References mlib::Vec3< V >::dist_sqrd(). |
|
Is the vector's length equal to zero?
Definition at line 111 of file vec3.H. References mlib::Vec3< V >::length_sqrd(). |
|
Are the two vectors parallel?
|
|
Are the two vectors perpendicular?
|
|
Definition at line 106 of file vec3.H. References mlib::Vec3< V >::_x, mlib::Vec3< V >::_y, and mlib::Vec3< V >::_z. |
|
Definition at line 108 of file vec3.H. References mlib::Vec3< V >::_x, mlib::Vec3< V >::_y, and mlib::Vec3< V >::_z. |
|
Definition at line 107 of file vec3.H. References mlib::Vec3< V >::_x, mlib::Vec3< V >::_y, and mlib::Vec3< V >::_z. |
|
Return a unit-length copy of this vector.
|
|
Definition at line 225 of file points.H. References _null_vec. |
|
Definition at line 76 of file vec3.H. References mlib::Vec3< V >::_x, mlib::Vec3< V >::_y, and mlib::Vec3< V >::_z. |
|
Definition at line 74 of file vec3.H. References mlib::Vec3< V >::_x, mlib::Vec3< V >::_y, and mlib::Vec3< V >::_z. |
|
Definition at line 81 of file vec3.H. References mlib::Vec3< V >::_x, mlib::Vec3< V >::_y, and mlib::Vec3< V >::_z. |
|
Definition at line 99 of file vec3.H. References mlib::Vec3< V >::_x, mlib::Vec3< V >::_y, and mlib::Vec3< V >::_z. |
|
Definition at line 72 of file vec3.H. References mlib::Vec3< V >::_x, mlib::Vec3< V >::_y, and mlib::Vec3< V >::_z. |
|
Definition at line 79 of file vec3.H. References mlib::Vec3< V >::_x, mlib::Vec3< V >::_y, and mlib::Vec3< V >::_z. |
|
Definition at line 75 of file vec3.H. References mlib::Vec3< V >::_x, mlib::Vec3< V >::_y, and mlib::Vec3< V >::_z. |
|
Definition at line 73 of file vec3.H. References mlib::Vec3< V >::_x, mlib::Vec3< V >::_y, and mlib::Vec3< V >::_z. |
|
Definition at line 80 of file vec3.H. References mlib::Vec3< V >::_x, mlib::Vec3< V >::_y, and mlib::Vec3< V >::_z. |
|
Definition at line 77 of file vec3.H. References mlib::Vec3< V >::_x, mlib::Vec3< V >::_y, and mlib::Vec3< V >::_z. |
|
Definition at line 82 of file vec3.H. References mlib::Vec3< V >::_x, mlib::Vec3< V >::_y, and mlib::Vec3< V >::_z. |
|
Provided so that min(V, V) and max(V, V) work.
Definition at line 96 of file vec3.H. References mlib::Vec3< V >::length(). |
|
Definition at line 98 of file vec3.H. References mlib::Vec3< V >::_x, mlib::Vec3< V >::_y, and mlib::Vec3< V >::_z. |
|
Provided so that min(V, V) and max(V, V) work.
Definition at line 92 of file vec3.H. References mlib::Vec3< V >::length(). |
|
Definition at line 65 of file vec3.H. References mlib::Vec3< V >::_x. |
|
Definition at line 64 of file vec3.H. References mlib::Vec3< V >::_x. |
|
Returns this vector minus its projection onto b.
Definition at line 138 of file vec3.H. References mlib::Vec3< V >::projected(). |
|
Return a vector perpendicular to this one using an arbitrary axis algorithm. The arbitrary perpendicular vector is found as follows. First, the minimum length component of the vector is found. Second, a new vector is created that is the unit vector along the direction of the minimum component. Third, the perpendicular vector is found by taking the cross product of the vector with the minimum component set to zero and the original vector. Fourth, the perpendicular vector is normalized. |
|
Returns the projection of this onto b.
Definition at line 135 of file vec3.H. References mlib::Vec3< V >::tlen(). |
|
Sets the components of the vector to the values specified in the arguments.
Definition at line 62 of file vec3.H. References mlib::Vec3< V >::_x, mlib::Vec3< V >::_y, and mlib::Vec3< V >::_z. |
|
Returns (this * b) / (b * b).
Definition at line 129 of file vec3.H. References mlib::isZero(). |
|
Constructor that sets the components of the vector to the values specified in the arguments.
|
|
Default constructor. Creates a zero length vector.
|
|
Definition at line 226 of file points.H. References _x_axis. Referenced by ToonTexCB::faceCB(), XToonStripCB::faceCB(), and Cam_int_edit::rot_x(). |
|
Definition at line 227 of file points.H. References _y_axis. Referenced by GEOM::do_cam_focus(), ToonTexCB::faceCB(), XToonStripCB::faceCB(), Cam_int_edit::rot(), Cam_int_edit::rot_y(), and CamOrbit::tick(). |
|
Definition at line 228 of file points.H. References _z_axis. Referenced by ToonTexCB::faceCB(), XToonStripCB::faceCB(), and Cam_int_edit::rot_z(). |
|
Definition at line 207 of file points.H. Referenced by null(). |
|
|
|
Definition at line 208 of file points.H. Referenced by X(). |
|
|
|
Definition at line 209 of file points.H. Referenced by Y(). |
|
|
|
Definition at line 210 of file points.H. Referenced by Z(). |