Represents a 3D vector or point with S56E11 floating point
elements.
Definition at line 336 of file math.h.
Public Member Functions
|
|
DblVector (void) throw () |
|
Constructs the vector with zero values.
|
Vector |
Vec () const |
|
DblVector (double fX, double fY, double fZ=0.0) throw () |
|
Constructs the vector with specified values.
|
|
DblVector (const DblVector &vVector) throw
() |
|
Copy constructor.
|
|
DblVector (const Vector &vVector) throw
() |
|
constructor from single precision vector.
|
|
DblVector (const char *pVector) throw () |
|
Construct the vector from a pointer to 8bit
signed data.
|
|
DblVector (const short *pVector) throw () |
|
Construct the vector from a pointer to 16bit
signed data.
|
DblVector
& |
Set (double fX, double fY, double fZ) throw () |
|
Sets the values of the vector elements and
returns the vector.
|
DblVector
& |
Clear (void) throw () |
|
Zeros all the components of the
Vector, then returns it.
|
DblVector
& |
Normalize (void) throw () |
|
Normalizes the vector and returns it.
|
DblVector |
Normalized (void) const throw () |
|
Returns a normalized version of the vector,
without changing this vector.
|
DblVector
& |
MakeOrthogonal (const DblVector &vBase) |
|
Makes this vector orthogonal to the given
vBase vector and normalizes it.
|
DblVector
& |
SetLength (double fLength) |
|
Sets the vector to the given length, without
changing its direction.
|
double |
LengthSquare (void) const |
|
Returns the square of the length of the
DblVector.
|
double |
Length () const throw () |
|
Returns the length of the
DblVector.
|
double |
Length2D () const throw () |
|
Returns the 2D length of the
DblVector, ignoring the z element.
|
double |
DistanceFrom (const DblVector &v) const |
|
Returns the distance between two points
(this and another, represented as
DblVector objects).
|
double |
DistanceFromLine (const DblVector &v0, const
DblVector
&v1) const |
|
Returns the shortest distance between this
point and a line defined by two other points (all points
represented by
DblVector objects).
|
double |
DistanceFromSegment (const DblVector &v0, const
DblVector
&v1) const |
|
Returns the distance between this point and
a line segment defined by the two ending points.
|
double |
AngleCos (const DblVector &v1) const
throw () |
|
Returns the cosine of the angle between this
vector and the one passed in.
|
DblVector |
Minimum (const DblVector &o) |
|
Returns the minimum of this and the argument
vector.
|
DblVector |
Maximum (const DblVector &o) |
|
Returns the maximum of this and the argument
vector.
|
DblVector |
operator- (void) const throw () |
|
Returns the inverse of the vector.
|
DblVector |
operator+ (double f) const throw () |
|
Returns the sum of a vector and a scalar.
|
DblVector |
operator+ (const DblVector &v) const throw
() |
|
Returns the sum of two vectors.
|
DblVector |
operator- (const DblVector &v) const throw
() |
|
Returns the difference between two
DblVectors/points.
|
DblVector |
operator* (const DblVector &v) const throw
() |
|
Returns the product of two DblVectors by
components.
|
DblVector |
operator* (double f) const throw () |
|
Returns the product of the
DblVector and a scalar.
|
DblVector |
operator/ (const DblVector &v) const throw
() |
|
Returns the quotient of two DblVectors by
components.
|
DblVector |
operator/ (double f) const throw () |
|
Returns the quotient of a
DblVector and a scalar.
|
DblVector |
operator* (int i) const throw () |
|
Returns the product of a
DblVector and an integer.
|
DblVector |
operator/ (int i) const throw () |
|
Returns the quotient of a
DblVector and an integer.
|
DblVector |
operator/ (unsigned int i) const throw () |
|
Returns the quotient of a
DblVector and an unsigned integer.
|
double |
operator| (const DblVector &v) const throw
() |
|
Returns the dot product of two DblVectors.
|
DblVector |
operator& (const DblVector &v) const |
|
Returns the cross product of two DblVectors.
|
bool |
operator== (const DblVector &v) const throw
() |
|
Returns true if the two DblVectors
are identical, false otherwise.
|
bool |
operator!= (const DblVector &v) const throw
() |
|
Returns true if the two DblVectors
are different, false otherwise.
|
|
operator bool (void) const throw () |
|
Returns true if the
DblVector is not a zero
DblVector, false otherwise.
|
bool |
operator! (void) const throw () |
|
Returns true if the
DblVector is a zero
DblVector, false otherwise.
|
DblVector
& |
operator= (const DblVector &v) |
|
Sets this
DblVector to equal another one and returns it.
|
DblVector
& |
operator<< (const DblVector &v) |
|
Sets this
DblVector to equal another one and returns it.
|
DblVector
& |
operator-= (const DblVector &v) throw
() |
|
Subtracts the component values of another
DblVector from this one's, and returns the result.
|
DblVector
& |
operator+= (const DblVector &v) throw
() |
|
Adds another
DblVector to this one and returns the result.
|
DblVector
& |
operator*= (double f) |
|
Multiplies the components of the
DblVector with a scalar value and returns the result.
|
DblVector
& |
operator*= (const DblVector &v) |
|
Multiplies the
DblVector with another
DblVector by components and returns the result.
|
DblVector
& |
operator/= (double f) |
|
Divides the
DblVector by a scalar and returns the result.
|
double
& |
operator[] (int i) throw () |
|
Returns a individual components of the
DblVector.
|
double
& |
operator[] (unsigned int i) throw () |
|
Returns a component of the
DblVector.
|
|
operator const double * (void) const |
|
Returns a pointer to the data of the
DblVector. Do not delete this pointer.
|
Public Attributes
|
union { |
struct { |
double m_fX |
double m_fY |
double m_fZ |
} |
|
struct { |
double x |
double y |
double z |
} |
|
double m_aCoors
[3] |
}; |
|