#include <color.H>
Inheritance diagram for HSVCOLVEC:
Public Types | |
typedef double | value_type |
Public Member Functions | |
HSVCOLVEC () | |
HSVCOLVEC (double h, double s, double v) | |
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) |
HSVCOLVEC | operator+ (const HSVCOLVEC &v) const |
HSVCOLVEC | operator- (const HSVCOLVEC &v) const |
HSVCOLVEC | operator- () const |
double | operator * (const HSVCOLVEC &v) const |
HSVCOLVEC | operator * (double s) const |
HSVCOLVEC | operator/ (double s) const |
void | operator+= (const HSVCOLVEC &v) |
void | operator-= (const HSVCOLVEC &v) |
void | operator *= (double s) |
void | operator/= (double s) |
int | operator> (const HSVCOLVEC &v) const |
int | operator< (const HSVCOLVEC &v) const |
bool | operator== (const HSVCOLVEC &v) const |
bool | operator!= (const HSVCOLVEC &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 HSVCOLVEC &v) const |
Compute the distance between the two vectors. | |
double | dist_sqrd (const HSVCOLVEC &v) const |
Compute the distance squared between the two vectors. | |
double | angle (const HSVCOLVEC &) const |
Compute the angle between the two vectors. The result will be in the range 0 to pi radians. | |
double | tlen (const HSVCOLVEC &b) const |
Returns (this * b) / (b * b). | |
HSVCOLVEC | projected (const HSVCOLVEC &b) const |
Returns the projection of this onto b. | |
HSVCOLVEC | orthogonalized (const HSVCOLVEC &b) const |
Returns this vector minus its projection onto b. | |
bool | is_equal (const HSVCOLVEC &v, double epsSqrd=epsNorSqrdMath()) const |
Are the two vectors equal? | |
bool | is_parallel (const HSVCOLVEC &) const |
Are the two vectors parallel? | |
bool | is_perpend (const HSVCOLVEC &) const |
Are the two vectors perpendicular? | |
HSVCOLVEC | normalized () const |
Return a unit-length copy of this vector. | |
HSVCOLVEC | perpend () const |
Return a vector perpendicular to this one using an arbitrary axis algorithm. | |
Static Public Member Functions | |
static int | dim () |
Protected Attributes | |
double | _x |
double | _y |
double | _z |
Definition at line 66 of file color.H.
|
|
|
|
|
|
|
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.
|
|
|
|
Compute the distance between the two vectors.
|
|
Compute the distance squared between the two vectors.
|
|
Are the two vectors equal?
|
|
Is the vector's length equal to zero?
|
|
Are the two vectors parallel?
|
|
Are the two vectors perpendicular?
|
|
|
|
|
|
|
|
Return a unit-length copy of this vector.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Provided so that min(V, V) and max(V, V) work.
|
|
|
|
Provided so that min(V, V) and max(V, V) work.
|
|
|
|
|
|
Returns this vector minus its projection onto b.
|
|
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.
|
|
Sets the components of the vector to the values specified in the arguments.
|
|
Returns (this * b) / (b * b).
|
|
Constructor that sets the components of the vector to the values specified in the arguments.
|
|
Default constructor. Creates a zero length vector.
|
|
|
|
|
|
|