|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLMISC::CVector Class ReferenceA 3D vector of float.
More...
#include <vector.h>
Inheritance diagram for NLMISC::CVector:
List of all members.
Public Methods |
std::string | asString () const |
| Returns the contents as a printable string "x y z". More...
|
|
| CVector () |
| Constructor wich do nothing. More...
|
| CVector (float _x, float _y, float _z) |
| Constructor . More...
|
| CVector (const CVector &v) |
| Copy Constructor. More...
|
|
CVector & | operator+= (const CVector &v) |
CVector & | operator-= (const CVector &v) |
CVector & | operator *= (float f) |
CVector & | operator/= (float f) |
CVector | operator+ (const CVector &v) const |
CVector | operator- (const CVector &v) const |
CVector | operator * (float f) const |
CVector | operator/ (float f) const |
CVector | operator- () const |
|
float | operator * (const CVector &v) const |
| Dot product. More...
|
CVector | operator^ (const CVector &v) const |
| Cross product. More...
|
float | norm () const |
| Return the norm of the vector. More...
|
float | sqrnorm () const |
| Return the square of the norm of the vector. More...
|
void | normalize () |
| Normalize the vector. More...
|
CVector | normed () const |
| Return the vector normalized. More...
|
|
void | set (float _x, float _y, float _z) |
bool | operator== (const CVector &v) const |
bool | operator!= (const CVector &v) const |
bool | isNull () const |
bool | operator< (const CVector &v) const |
| This operator is here just for map/set insertion(no meaning). comparison order is x,y,z. More...
|
void | sphericToCartesian (float r, float theta, float phi) |
| Setup the vector with spheric coordinates. More...
|
void | cartesianToSpheric (float &r, float &theta, float &phi) const |
| Get the sphreic coordinates of the vector. More...
|
void | minof (const CVector &a, const CVector &b) |
| Set all vector x/y/z as minimum of a/b x/y/z (respectively). More...
|
void | maxof (const CVector &a, const CVector &b) |
| Set all vector x/y/z as maximum of a/b x/y/z (respectively). More...
|
void | serial (IStream &f) |
| serial. More...
|
Public Attributes |
float | x |
float | y |
float | z |
Static Public Attributes |
const CVector | Null |
| Null vector (0,0,0). More...
|
const CVector | I |
| I vector (1,0,0). More...
|
const CVector | J |
| J vector (0,1,0). More...
|
const CVector | K |
| K vector (0,0,1). More...
|
Friends |
CVector | operator * (float f, const CVector &v0) |
Detailed Description
A 3D vector of float.
-
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2000
Definition at line 48 of file vector.h.
Constructor & Destructor Documentation
NLMISC::CVector::CVector |
( |
|
) |
[inline] |
|
NLMISC::CVector::CVector |
( |
float |
_x, |
|
|
float |
_y, |
|
|
float |
_z |
|
) |
[inline] |
|
|
Constructor .
Definition at line 69 of file vector.h. |
NLMISC::CVector::CVector |
( |
const CVector & |
v |
) |
[inline] |
|
Member Function Documentation
string NLMISC::CVector::asString |
( |
|
) |
const |
|
|
Returns the contents as a printable string "x y z".
Definition at line 45 of file vector.cpp.
References x, y, and z. |
void NLMISC::CVector::cartesianToSpheric |
( |
float & |
r, |
|
|
float & |
theta, |
|
|
float & |
phi |
|
) |
const [inline] |
|
bool NLMISC::CVector::isNull |
( |
|
) |
const [inline] |
|
void NLMISC::CVector::maxof |
( |
const CVector & |
a, |
|
|
const CVector & |
b |
|
) |
[inline] |
|
|
Set all vector x/y/z as maximum of a/b x/y/z (respectively).
Definition at line 192 of file vector_inline.h.
References x, y, and z. |
void NLMISC::CVector::minof |
( |
const CVector & |
a, |
|
|
const CVector & |
b |
|
) |
[inline] |
|
|
Set all vector x/y/z as minimum of a/b x/y/z (respectively).
Definition at line 186 of file vector_inline.h.
References min, x, y, and z. |
float NLMISC::CVector::norm |
( |
|
) |
const [inline] |
|
void NLMISC::CVector::normalize |
( |
|
) |
[inline] |
|
CVector NLMISC::CVector::normed |
( |
|
) |
const [inline] |
|
float NLMISC::CVector::operator * |
( |
const CVector & |
v |
) |
const [inline] |
|
CVector NLMISC::CVector::operator * |
( |
float |
f |
) |
const [inline] |
|
CVector & NLMISC::CVector::operator *= |
( |
float |
f |
) |
[inline] |
|
bool NLMISC::CVector::operator!= |
( |
const CVector & |
v |
) |
const [inline] |
|
CVector NLMISC::CVector::operator+ |
( |
const CVector & |
v |
) |
const [inline] |
|
CVector & NLMISC::CVector::operator+= |
( |
const CVector & |
v |
) |
[inline] |
|
CVector NLMISC::CVector::operator- |
( |
|
) |
const [inline] |
|
CVector NLMISC::CVector::operator- |
( |
const CVector & |
v |
) |
const [inline] |
|
CVector & NLMISC::CVector::operator-= |
( |
const CVector & |
v |
) |
[inline] |
|
CVector NLMISC::CVector::operator/ |
( |
float |
f |
) |
const [inline] |
|
CVector & NLMISC::CVector::operator/= |
( |
float |
f |
) |
[inline] |
|
bool NLMISC::CVector::operator< |
( |
const CVector & |
v |
) |
const [inline] |
|
|
This operator is here just for map/set insertion(no meaning). comparison order is x,y,z.
Definition at line 152 of file vector_inline.h.
References v, x, y, and z. |
bool NLMISC::CVector::operator== |
( |
const CVector & |
v |
) |
const [inline] |
|
CVector NLMISC::CVector::operator^ |
( |
const CVector & |
v |
) |
const [inline] |
|
void NLMISC::CVector::serial |
( |
IStream & |
f |
) |
[inline] |
|
void NLMISC::CVector::set |
( |
float |
_x, |
|
|
float |
_y, |
|
|
float |
_z |
|
) |
[inline] |
|
|
Definition at line 136 of file vector_inline.h.
References x, y, and z.
Referenced by NL3D::CZoneLighter::CLightDesc::CLightDesc, NL3D::CInstanceLighter::CLightDesc::CLightDesc, NL3D::CQuadTree::CQuadTree, NLSOUND::CSourceDSound::getDirection, NLSOUND::CSourceAL::getDirection, NLSOUND::CListenerDSound::getOrientation, NLSOUND::CListenerAL::getOrientation, NLSOUND::CSourceDSound::getVelocity, NLSOUND::CSourceAL::getVelocity, NLSOUND::CListenerDSound::getVelocity, NLSOUND::CListenerAL::getVelocity, NL3D::CZoneLighter::init, NL3D::CPSBrownianForce::initPrecalc, NL3D::CPSBrownianForce::integrate, NL3D::CHeatHaze::performHeatHaze, and NLPACS::ULocalPosition::setKeepZ. |
void NLMISC::CVector::sphericToCartesian |
( |
float |
r, |
|
|
float |
theta, |
|
|
float |
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 175 of file vector_inline.h.
References r, x, y, and z. |
float NLMISC::CVector::sqrnorm |
( |
|
) |
const [inline] |
|
Friends And Related Function Documentation
CVector operator * |
( |
float |
f, |
|
|
const CVector & |
v0 |
|
) |
[friend] |
|
Member Data Documentation
const CVector NLMISC::CVector::I [static]
|
|
const CVector NLMISC::CVector::J [static]
|
|
const CVector NLMISC::CVector::K [static]
|
|
const CVector NLMISC::CVector::Null [static]
|
|
|
Null vector (0,0,0).
Referenced by NLPACS::CLocalRetriever::CLocalPosition::CLocalPosition, NL3D::CParticleSystem::computeBBox, NL3D::CPSLocated::CPostNewElementRequestInfo::CPostNewElementRequestInfo, NL3D::CSegRemanence::CSampledPos::CSampledPos, NL3D::CSegRemanenceShape::CSegRemanenceShape, NL3D::CWaterShape::CWaterShape, NL3D::CMRMMeshFinal::CWedge::CWedge, NL3D::CWaveMakerShape::getAABBox, NL3D::CParticleSystemShape::getAABBox, NL3D::UParticleSystemInstance::getGlobalVectorValue, NL3D::CParticleSystem::getGlobalVectorValue, NL3D::CParticleSystem::getGlobalVectorValueHandle, NL3D::IPSMover::getNormal, NL3D::CPSBrownianForce::initPrecalc, NL3D::ITravCameraScene::ITravCameraScene, NL3D::CHeatHaze::performHeatHaze, NL3D::CSegRemanenceShape::setNumCorners, and NL3D::CParticleSystem::setSysMat. |
|
Definition at line 51 of file vector.h.
Referenced by NLPACS::CMoveContainer::addCollisionnablePrimitiveBlock, asString, NL3D::CZoneLighter::computeTileFlagsForPositionTowardWater, NLLIGO::CPrimZone::contains, NL3D::CMaterial::decompUserTexMat, NL3D::CCloud::dispBill, NL3D::CCloud::dispXYZ, NL3D::CPSEmitterRectangle::emit, NL3D::CCloud::genBill, NLPACS::CRetrieverInstance::getDoubleGlobalPosition, NLPACS::CRetrieverInstance::getGlobalPosition, NL3D::CPSUtil::getInterpolatedNoise, NLPACS::CRetrieverInstance::getLocalPosition, NL3D::CCloud::getSizeX, NL3D::CZoneLighter::getSkyContribution, NLSOUND::CListenerAL::getVelocity, NL3D::CCloud::getX, NL3D::CQuadTree::CQuadNode::includeBoxQuad, NL3D::CCloud::init, NL3D::CQuadTree::insert, NLPACS::CFaceGrid::CFaceGridBuild::insert, NLPACS::CLocalRetriever::insurePosition, NL3D::CPSBrownianForce::integrate, NL3D::CPSGravity::integrate, NL3D::CPSLocated::integrateSingle, NL3D::CPSBrownianForce::integrateSingle, NL3D::CPSGravity::integrateSingle, NL3D::CQuadTree::CQuadNode::intersectBox, NL3D::CQuadTree::CQuadNode::intersectBoxQuad, NL3D::CZoneLighter::light, NL3D::CZoneLighter::lightWater, NLPACS::CCollisionMeshBuild::link, maxof, minof, norm, operator *, operator *=, operator+, operator+=, operator-, operator-=, operator<, operator==, operator^, NLPACS::CVector2s::pack, NL3D::CPSBrownianForce::performDynamic, NL3D::CHeatHaze::performHeatHaze, NL3D::CCubeGrid::project, NL3D::CCloud::reset, NL3D::CQuadTree::select, NLPACS::CFaceGrid::select, NL3D::CCubeGrid::select, NL3D::CStaticQuadGrid< const CTriangle * >::selectPoint, serial, set, NL3D::CDriverGL::setConstant, NLSOUND::CSourceDSound::setDirection, NLSOUND::CSourceAL::setDirection, NLSOUND::CListenerDSound::setOrientation, NLSOUND::CListenerAL::setOrientation, NLSOUND::CSourceDSound::setPos, NLSOUND::CSourceAL::setPos, NLSOUND::CListenerDSound::setPos, NLSOUND::CListenerAL::setPos, NL3D::CCloud::setSizeX, NL3D::CWaterRenderObs::setupMaterialNVertexShader, NLSOUND::CSourceDSound::setVelocity, NLSOUND::CSourceAL::setVelocity, NLSOUND::CListenerDSound::setVelocity, NLSOUND::CListenerAL::setVelocity, NL3D::CCloud::setX, NLPACS::CRetrieverInstance::snap, sphericToCartesian, NL3D::CQuadTree::CQuadNode::split, sqrnorm, NLPACS::CGlobalRetriever::testBBoxMove, NLPACS::CGlobalRetriever::testBBoxRot, NLPACS::CGlobalRetriever::testCylinderMove, NLPACS::IQuadNode::translate, NL3D::CWaveMakerDetailObs::traverse, and NL3D::CWaterRenderObs::traverse. |
|
Definition at line 51 of file vector.h.
Referenced by NLPACS::CMoveContainer::addCollisionnablePrimitiveBlock, asString, NL3D::CZoneLighter::computeTileFlagsForPositionTowardWater, NLLIGO::CPrimZone::contains, NL3D::CMaterial::decompUserTexMat, NL3D::CCloud::dispBill, NL3D::CCloud::dispXYZ, NL3D::CDeform2d::doDeform, NL3D::CPSEmitterRectangle::emit, NL3D::CCloud::genBill, NLPACS::CRetrieverInstance::getDoubleGlobalPosition, NLPACS::CRetrieverInstance::getGlobalPosition, NL3D::CPSUtil::getInterpolatedNoise, NLPACS::CRetrieverInstance::getLocalPosition, NL3D::CCloud::getSizeY, NL3D::CZoneLighter::getSkyContribution, NLSOUND::CListenerAL::getVelocity, NL3D::CCloud::getY, NL3D::CCloud::init, NL3D::CQuadTree::insert, NL3D::CQuadTree::CQuadNode::insert, NLPACS::CFaceGrid::CFaceGridBuild::insert, NLPACS::CLocalRetriever::insurePosition, NL3D::CPSBrownianForce::integrate, NL3D::CPSGravity::integrate, NL3D::CPSLocated::integrateSingle, NL3D::CPSBrownianForce::integrateSingle, NL3D::CPSGravity::integrateSingle, NL3D::CQuadTree::CQuadNode::intersectBox, NL3D::CZoneLighter::light, NL3D::CZoneLighter::lightWater, NLPACS::CCollisionMeshBuild::link, maxof, minof, norm, operator *, operator *=, operator+, operator+=, operator-, operator-=, operator<, operator==, operator^, NLPACS::CVector2s::pack, NL3D::CPSBrownianForce::performDynamic, NL3D::CCubeGrid::project, NL3D::CCloud::reset, NL3D::CQuadTree::select, NLPACS::CFaceGrid::select, NL3D::CCubeGrid::select, NL3D::CStaticQuadGrid< const CTriangle * >::selectPoint, serial, set, NL3D::CDriverGL::setConstant, NLSOUND::CSourceDSound::setDirection, NLSOUND::CSourceAL::setDirection, NLSOUND::CListenerDSound::setOrientation, NLSOUND::CListenerAL::setOrientation, NLSOUND::CSourceDSound::setPos, NLSOUND::CSourceAL::setPos, NLSOUND::CListenerDSound::setPos, NLSOUND::CListenerAL::setPos, NL3D::CCloud::setSizeY, NL3D::CWaterRenderObs::setupMaterialNVertexShader, NLSOUND::CSourceDSound::setVelocity, NLSOUND::CSourceAL::setVelocity, NLSOUND::CListenerDSound::setVelocity, NLSOUND::CListenerAL::setVelocity, NL3D::CCloud::setY, NLPACS::CRetrieverInstance::snap, sphericToCartesian, sqrnorm, NLPACS::CGlobalRetriever::testBBoxMove, NLPACS::CGlobalRetriever::testBBoxRot, NLPACS::CGlobalRetriever::testCylinderMove, NLPACS::IQuadNode::translate, NL3D::CWaveMakerDetailObs::traverse, and NL3D::CWaterRenderObs::traverse. |
|
Definition at line 51 of file vector.h.
Referenced by NLPACS::CMoveContainer::addCollisionnablePrimitiveBlock, NLPACS::IQuadNode::addVertex, asString, NL3D::CZoneLighter::computeTileFlagsForPositionTowardWater, NL3D::CCloud::dispBill, NL3D::CCloud::dispXYZ, NL3D::CPSEmitterRectangle::emit, NL3D::CCloud::genBill, NLPACS::CRetrieverInstance::getDoubleGlobalPosition, NLPACS::CRetrieverInstance::getGlobalPosition, NLPACS::CLocalRetriever::getHeight, NL3D::CPSUtil::getInterpolatedNoise, NLPACS::CRetrieverInstance::getLocalPosition, NL3D::CCloud::getSizeZ, NLSOUND::CListenerAL::getVelocity, NL3D::CCloud::getZ, NL3D::CQuadTree::CQuadNode::includeBoxQuad, NL3D::CCloud::init, NL3D::CQuadTree::insert, NL3D::CPSBrownianForce::integrate, NL3D::CPSGravity::integrate, NL3D::CPSLocated::integrateSingle, NL3D::CPSBrownianForce::integrateSingle, NL3D::CPSGravity::integrateSingle, NL3D::CQuadTree::CQuadNode::intersectBox, NL3D::CQuadTree::CQuadNode::intersectBoxQuad, NLPACS::CCollisionMeshBuild::link, maxof, minof, norm, operator *, operator *=, operator+, operator+=, operator-, operator-=, operator<, operator==, operator^, NL3D::CHeatHaze::performHeatHaze, NL3D::CCubeGrid::project, NL3D::CCloud::reset, NL3D::CQuadTree::select, NL3D::CCubeGrid::select, serial, set, NL3D::CDriverGL::setConstant, NLSOUND::CSourceDSound::setDirection, NLSOUND::CSourceAL::setDirection, NLPACS::ULocalPosition::setKeepZ, NLSOUND::CListenerDSound::setOrientation, NLSOUND::CListenerAL::setOrientation, NLSOUND::CSourceDSound::setPos, NLSOUND::CSourceAL::setPos, NLSOUND::CListenerDSound::setPos, NLSOUND::CListenerAL::setPos, NL3D::CCloud::setSizeZ, NL3D::CWaterRenderObs::setupMaterialNVertexShader, NLSOUND::CSourceDSound::setVelocity, NLSOUND::CSourceAL::setVelocity, NLSOUND::CListenerDSound::setVelocity, NLSOUND::CListenerAL::setVelocity, NL3D::CCloud::setZ, NLPACS::CRetrieverInstance::snap, sphericToCartesian, NL3D::CQuadTree::CQuadNode::split, sqrnorm, NLPACS::IQuadNode::translate, NL3D::CWaterRenderObs::traverse, and NLSOUND::CBackgroundSoundManager::updateBackgroundStatus. |
The documentation for this class was generated from the following files:
|
|