|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLMISC::CVectorD Class ReferenceA 3D vector of double.
More...
#include <vectord.h>
List of all members.
Public Methods |
|
| CVectorD () |
| Constructor wich do nothing. More...
|
| CVectorD (double _x, double _y, double _z) |
| Constructor . More...
|
| CVectorD (const CVector &v) |
| Constructor with a CVector. More...
|
| CVectorD (const CVectorD &v) |
| Copy Constructor. More...
|
|
CVectorD & | operator+= (const CVectorD &v) |
CVectorD & | operator-= (const CVectorD &v) |
CVectorD & | operator *= (double f) |
CVectorD & | operator/= (double f) |
CVectorD | operator+ (const CVectorD &v) const |
CVectorD | operator- (const CVectorD &v) const |
CVectorD | operator * (double f) const |
CVectorD | operator/ (double f) const |
CVectorD | operator- () const |
|
double | operator * (const CVectorD &v) const |
| Dot product. More...
|
CVectorD | operator^ (const CVectorD &v) const |
| Cross product. More...
|
double | norm () const |
| Return the norm of the vector. More...
|
double | sqrnorm () const |
| Return the square of the norm of the vector. More...
|
void | normalize () |
| Normalize the vector. More...
|
CVectorD | normed () const |
| Return the vector normalized. More...
|
|
void | set (double _x, double _y, double _z) |
bool | operator== (const CVectorD &v) const |
bool | operator!= (const CVectorD &v) const |
bool | isNull () const |
void | sphericToCartesian (double r, double theta, double phi) |
| Setup the vector with spheric coordinates. More...
|
void | cartesianToSpheric (double &r, double &theta, double &phi) const |
| Get the sphreic coordinates of the vector. More...
|
void | serial (IStream &f) |
CVectorD & | operator= (const CVector &v) |
| operator CVector () const |
Public Attributes |
double | x |
double | y |
double | z |
Static Public Attributes |
const CVectorD | Null |
| Null vector (0,0,0). More...
|
const CVectorD | I |
| I vector (1,0,0). More...
|
const CVectorD | J |
| J vector (0,1,0). More...
|
const CVectorD | K |
| K vector (0,0,1). More...
|
Friends |
CVectorD | operator * (double f, const CVectorD &v0) |
Detailed Description
A 3D vector of double.
-
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2000
Definition at line 44 of file vectord.h.
Constructor & Destructor Documentation
NLMISC::CVectorD::CVectorD |
( |
|
) |
[inline] |
|
NLMISC::CVectorD::CVectorD |
( |
double |
_x, |
|
|
double |
_y, |
|
|
double |
_z |
|
) |
[inline] |
|
NLMISC::CVectorD::CVectorD |
( |
const CVector & |
v |
) |
[inline] |
|
NLMISC::CVectorD::CVectorD |
( |
const CVectorD & |
v |
) |
[inline] |
|
Member Function Documentation
void NLMISC::CVectorD::cartesianToSpheric |
( |
double & |
r, |
|
|
double & |
theta, |
|
|
double & |
phi |
|
) |
const [inline] |
|
bool NLMISC::CVectorD::isNull |
( |
|
) |
const [inline] |
|
double NLMISC::CVectorD::norm |
( |
|
) |
const [inline] |
|
void NLMISC::CVectorD::normalize |
( |
|
) |
[inline] |
|
CVectorD NLMISC::CVectorD::normed |
( |
|
) |
const [inline] |
|
double NLMISC::CVectorD::operator * |
( |
const CVectorD & |
v |
) |
const [inline] |
|
CVectorD NLMISC::CVectorD::operator * |
( |
double |
f |
) |
const [inline] |
|
CVectorD & NLMISC::CVectorD::operator *= |
( |
double |
f |
) |
[inline] |
|
NLMISC::CVectorD::operator CVector |
( |
|
) |
const [inline] |
|
bool NLMISC::CVectorD::operator!= |
( |
const CVectorD & |
v |
) |
const [inline] |
|
CVectorD NLMISC::CVectorD::operator+ |
( |
const CVectorD & |
v |
) |
const [inline] |
|
CVectorD & NLMISC::CVectorD::operator+= |
( |
const CVectorD & |
v |
) |
[inline] |
|
CVectorD NLMISC::CVectorD::operator- |
( |
|
) |
const [inline] |
|
CVectorD NLMISC::CVectorD::operator- |
( |
const CVectorD & |
v |
) |
const [inline] |
|
CVectorD & NLMISC::CVectorD::operator-= |
( |
const CVectorD & |
v |
) |
[inline] |
|
CVectorD NLMISC::CVectorD::operator/ |
( |
double |
f |
) |
const [inline] |
|
CVectorD & NLMISC::CVectorD::operator/= |
( |
double |
f |
) |
[inline] |
|
CVectorD & NLMISC::CVectorD::operator= |
( |
const CVector & |
v |
) |
[inline] |
|
bool NLMISC::CVectorD::operator== |
( |
const CVectorD & |
v |
) |
const [inline] |
|
CVectorD NLMISC::CVectorD::operator^ |
( |
const CVectorD & |
v |
) |
const [inline] |
|
void NLMISC::CVectorD::serial |
( |
IStream & |
f |
) |
[inline] |
|
void NLMISC::CVectorD::set |
( |
double |
_x, |
|
|
double |
_y, |
|
|
double |
_z |
|
) |
[inline] |
|
void NLMISC::CVectorD::sphericToCartesian |
( |
double |
r, |
|
|
double |
theta, |
|
|
double |
phi |
|
) |
[inline] |
|
|
Setup the vector with spheric coordinates.
sphericToCartesian(1,0,0) build the I vector ((1,0,0)). the formula is:
x= r*cos(theta)*cos(phi)
y= r*sin(theta)*cos(phi)
z= r*sin(phi)
-
See also:
-
cartesianToSpheric()
Definition at line 166 of file vectord_inline.h.
References r, x, y, and z. |
double NLMISC::CVectorD::sqrnorm |
( |
|
) |
const [inline] |
|
|
Return the square of the norm of the vector.
Definition at line 111 of file vectord_inline.h.
References x, y, and z. |
Friends And Related Function Documentation
CVectorD operator * |
( |
double |
f, |
|
|
const CVectorD & |
v0 |
|
) |
[friend] |
|
Member Data Documentation
const CVectorD NLMISC::CVectorD::I [static]
|
|
const CVectorD NLMISC::CVectorD::J [static]
|
|
const CVectorD NLMISC::CVectorD::K [static]
|
|
const CVectorD NLMISC::CVectorD::Null [static]
|
|
double NLMISC::CVectorD::x
|
|
|
Definition at line 47 of file vectord.h.
Referenced by NLPACS::CPrimitiveWorldImage::evalCollisionOCoverOC, NLPACS::CPrimitiveWorldImage::evalCollisionPoverOC, NLPACS::CPrimitiveWorldImage::evalCollisionPoverS, NLPACS::CPrimitiveWorldImage::evalCollisionSoverOC, norm, operator *, operator *=, operator CVector, operator+, operator+=, operator-, operator-=, operator=, operator==, operator^, NLPACS::CPrimitiveWorldImage::precalcBB, NLPACS::CPrimitiveWorldImage::precalcPos, NLPACS::CRetrieverInstance::retrievePosition, serial, set, NL3D::CDriverGL::setConstant, NLPACS::CPrimitiveWorldImage::CPosition::setGlobalPosKeepZ, sphericToCartesian, sqrnorm, NLAIAGENT::IVector::squareLength, and NLAIAGENT::IVector::x. |
double NLMISC::CVectorD::y
|
|
|
Definition at line 47 of file vectord.h.
Referenced by NLPACS::CPrimitiveWorldImage::evalCollisionOCoverOC, NLPACS::CPrimitiveWorldImage::evalCollisionPoverOC, NLPACS::CPrimitiveWorldImage::evalCollisionPoverS, NLPACS::CPrimitiveWorldImage::evalCollisionSoverOC, norm, operator *, operator *=, operator CVector, operator+, operator+=, operator-, operator-=, operator=, operator==, operator^, NLPACS::CPrimitiveWorldImage::precalcBB, NLPACS::CPrimitiveWorldImage::precalcPos, NLPACS::CRetrieverInstance::retrievePosition, serial, set, NL3D::CDriverGL::setConstant, NLPACS::CPrimitiveWorldImage::CPosition::setGlobalPosKeepZ, sphericToCartesian, sqrnorm, NLAIAGENT::IVector::squareLength, and NLAIAGENT::IVector::y. |
double NLMISC::CVectorD::z
|
|
|
Definition at line 47 of file vectord.h.
Referenced by NLPACS::CPrimitiveWorldImage::evalCollisionOCoverOC, NLPACS::CPrimitiveWorldImage::evalCollisionPoverOC, NLPACS::CPrimitiveWorldImage::evalCollisionPoverS, NLPACS::CPrimitiveWorldImage::evalCollisionSoverOC, norm, operator *, operator *=, operator CVector, operator+, operator+=, operator-, operator-=, operator=, operator==, operator^, NLPACS::CRetrieverInstance::retrievePosition, serial, set, NL3D::CDriverGL::setConstant, NLPACS::CPrimitiveWorldImage::setGlobalPosition, sphericToCartesian, sqrnorm, NLAIAGENT::IVector::squareLength, and NLAIAGENT::IVector::z. |
The documentation for this class was generated from the following files:
|
|