#include <OgreVector3.h>
Public Methods | |
Vector3 () | |
Vector3 (Real fX, Real fY, Real fZ) | |
Vector3 (Real afCoordinate[3]) | |
Vector3 (int afCoordinate[3]) | |
Vector3 (const Real *const r) | |
Vector3 (const Vector3 &rkVector) | |
Real | operator[] (size_t i) const |
Real & | operator[] (size_t i) |
Vector3 & | operator= (const Vector3 &rkVector) |
Assigns the value of the other vector. | |
bool | operator== (const Vector3 &rkVector) const |
bool | operator!= (const Vector3 &rkVector) const |
Vector3 | operator+ (const Vector3 &rkVector) const |
Vector3 | operator- (const Vector3 &rkVector) const |
Vector3 | operator * (Real fScalar) const |
Vector3 | operator * (const Vector3 &rhs) const |
Vector3 | operator/ (Real fScalar) const |
Vector3 | operator/ (const Vector3 &rhs) const |
Vector3 | operator- () const |
Vector3 & | operator+= (const Vector3 &rkVector) |
Vector3 & | operator-= (const Vector3 &rkVector) |
Vector3 & | operator *= (Real fScalar) |
Vector3 & | operator *= (const Vector3 &rkVector) |
Vector3 & | operator/= (Real fScalar) |
Vector3 & | operator/= (const Vector3 &rkVector) |
Real | length () const |
Returns the length (magnitude) of the vector. | |
Real | squaredLength () const |
Returns the square of the length(magnitude) of the vector. | |
Real | dotProduct (const Vector3 &vec) const |
Calculates the dot (scalar) product of this vector with another. | |
Real | normalise () |
Normalises the vector. | |
Vector3 | crossProduct (const Vector3 &rkVector) const |
Calculates the cross-product of 2 vectors, i.e. | |
Vector3 | midPoint (const Vector3 &vec) const |
Returns a vector at a point half way between this and the passed in vector. | |
bool | operator< (const Vector3 &rhs) const |
Returns true if the vector's scalar components are all greater that the ones of the vector it is compared against. | |
bool | operator> (const Vector3 &rhs) const |
Returns true if the vector's scalar components are all smaller that the ones of the vector it is compared against. | |
void | makeFloor (const Vector3 &cmp) |
Sets this vector's components to the minimum of its own and the ones of the passed in vector. | |
void | makeCeil (const Vector3 &cmp) |
Sets this vector's components to the maximum of its own and the ones of the passed in vector. | |
Vector3 | perpendicular (void) const |
Generates a vector perpendicular to this vector (eg an 'up' vector). | |
Vector3 | randomDeviant (const Radian &angle, const Vector3 &up=Vector3::ZERO) const |
Generates a new random vector which deviates from this vector by a given angle in a random direction. | |
Quaternion | getRotationTo (const Vector3 &dest) const |
Gets the shortest arc quaternion to rotate this vector to the destination vector. | |
bool | isZeroLength (void) const |
Returns true if this vector is zero length. | |
Vector3 | normalisedCopy (void) const |
As normalise, except that this vector is unaffected and the normalised vector is returned as a copy. | |
Vector3 | reflect (const Vector3 &normal) |
Calculates a reflection vector to the plane with the given normal . | |
Static Public Attributes | |
const Vector3 | ZERO |
const Vector3 | UNIT_X |
const Vector3 | UNIT_Y |
const Vector3 | UNIT_Z |
const Vector3 | NEGATIVE_UNIT_X |
const Vector3 | NEGATIVE_UNIT_Y |
const Vector3 | NEGATIVE_UNIT_Z |
const Vector3 | UNIT_SCALE |
Friends | |
Vector3 | operator * (Real fScalar, const Vector3 &rkVector) |
_OgreExport friend std::ostream & | operator<< (std::ostream &o, const Vector3 &v) |
Function for writing to a stream. |
Definition at line 42 of file OgreVector3.h.
|
Definition at line 53 of file OgreVector3.h. |
|
Definition at line 57 of file OgreVector3.h. References Ogre::Real. |
|
Definition at line 62 of file OgreVector3.h. References Ogre::Real. |
|
Definition at line 69 of file OgreVector3.h. |
|
Definition at line 76 of file OgreVector3.h. References Ogre::Real. |
|
Definition at line 81 of file OgreVector3.h. |
|
Calculates the cross-product of 2 vectors, i.e. the vector that lies perpendicular to them both.
For a clearer explanation, look a the left and the bottom edges of your monitor's screen. Assume that the first vector is the left edge and the second vector is the bottom edge, both of them starting from the lower-left corner of the screen. The resulting vector is going to be perpendicular to both of them and will go inside the screen, towards the cathode tube (assuming you're using a CRT monitor, of course). Definition at line 373 of file OgreVector3.h. Referenced by Ogre::Light::_getFrustumClipVolumes(), Ogre::Light::_getNearClipVolume(), Ogre::TerrainRenderable::_getNormalAt(), Ogre::Math::calculateTangentSpaceVector(), Ogre::ProgressiveMesh::PMTriangle::computeNormal(), Ogre::MeshManager::createCurvedIllusionPlane(), Ogre::MeshManager::createCurvedPlane(), Ogre::MeshManager::createPlane(), Ogre::Matrix3::EigenSolveSymmetric(), Ogre::AreaEmitter::genAreaAxes(), Ogre::ParticleSystem::genBillboardAxes(), Ogre::BillboardSet::genBillboardAxes(), getRotationTo(), Ogre::Quaternion::operator *(), Ogre::SceneManager::prepareShadowTextures(), Ogre::Plane::redefine(), Ogre::SceneNode::setDirection(), Ogre::Camera::setDirection(), and Ogre::SceneManager::setSkyPlane(). |
|
Calculates the dot (scalar) product of this vector with another.
Definition at line 316 of file OgreVector3.h. References Ogre::Real, x, y, and z. Referenced by Ogre::TerrainRenderable::_generateVertexLighting(), Ogre::MovablePlane::_getDerivedPlane(), Ogre::Light::_getFrustumClipVolumes(), Ogre::Light::_getNearClipVolume(), Ogre::Math::calculateFaceNormal(), Ogre::Math::calculateTangentSpaceVector(), Ogre::ProgressiveMesh::computeEdgeCollapseCost(), Ogre::Matrix3::EigenSolveSymmetric(), Ogre::PatchSurface::findLevel(), Ogre::Plane::getDistance(), getRotationTo(), Ogre::Math::intersects(), Ogre::BspLevel::loadQuake3Level(), Ogre::Matrix4::operator *(), Ogre::Plane::Plane(), Ogre::SceneManager::prepareShadowTextures(), Ogre::Plane::redefine(), and Ogre::Frustum::updateView(). |
|
Gets the shortest arc quaternion to rotate this vector to the destination vector.
Definition at line 526 of file OgreVector3.h. References crossProduct(), dotProduct(), normalise(), Ogre::Real, Ogre::Quaternion::w, x, Ogre::Quaternion::x, y, Ogre::Quaternion::y, z, and Ogre::Quaternion::z. Referenced by Ogre::SceneNode::setDirection(), and Ogre::Camera::setDirection(). |
|
Returns true if this vector is zero length.
Definition at line 558 of file OgreVector3.h. References Ogre::Real. |
|
Returns the length (magnitude) of the vector.
Definition at line 282 of file OgreVector3.h. References Ogre::Real. Referenced by Ogre::GpuProgramParameters::_updateAutoParamsLightsOnly(), Ogre::MeshManager::createCurvedIllusionPlane(), Ogre::MeshManager::createCurvedPlane(), Ogre::MeshManager::createPlane(), Ogre::ShadowCaster::getExtrusionDistance(), Ogre::AutoParamDataSource::getShadowExtrusionDistance(), and Ogre::Sphere::intersects(). |
|
Sets this vector's components to the maximum of its own and the ones of the passed in vector.
Definition at line 436 of file OgreVector3.h. Referenced by Ogre::ParticleSystem::_updateBounds(), Ogre::BillboardSet::_updateBounds(), Ogre::MeshManager::createCurvedIllusionPlane(), Ogre::MeshManager::createCurvedPlane(), Ogre::MeshManager::createPlane(), Ogre::PatchSurface::defineSurface(), Ogre::ShadowCaster::extrudeBounds(), Ogre::SceneManager::findShadowCastersForLight(), and Ogre::AxisAlignedBox::merge(). |
|
Sets this vector's components to the minimum of its own and the ones of the passed in vector.
Definition at line 422 of file OgreVector3.h. Referenced by Ogre::ParticleSystem::_updateBounds(), Ogre::BillboardSet::_updateBounds(), Ogre::MeshManager::createCurvedIllusionPlane(), Ogre::MeshManager::createCurvedPlane(), Ogre::MeshManager::createPlane(), Ogre::PatchSurface::defineSurface(), Ogre::ShadowCaster::extrudeBounds(), Ogre::SceneManager::findShadowCastersForLight(), and Ogre::AxisAlignedBox::merge(). |
|
Returns a vector at a point half way between this and the passed in vector.
Definition at line 387 of file OgreVector3.h. Referenced by Ogre::Octree::_getChildIndexes(), Ogre::OctreeNode::_isIn(), and Ogre::PatchSurface::findLevel(). |
|
|
As normalise, except that this vector is unaffected and the normalised vector is returned as a copy.
Definition at line 567 of file OgreVector3.h. References normalise(). |
|
Definition at line 157 of file OgreVector3.h. |
|
Definition at line 146 of file OgreVector3.h. References Ogre::Real, x, y, and z. |
|
Definition at line 243 of file OgreVector3.h. |
|
Definition at line 235 of file OgreVector3.h. References Ogre::Real. |
|
Definition at line 118 of file OgreVector3.h. |
|
Definition at line 124 of file OgreVector3.h. |
|
Definition at line 217 of file OgreVector3.h. |
|
Definition at line 194 of file OgreVector3.h. |
|
Definition at line 135 of file OgreVector3.h. |
|
Definition at line 226 of file OgreVector3.h. |
|
Definition at line 182 of file OgreVector3.h. |
|
Definition at line 168 of file OgreVector3.h. References Ogre::Real, x, y, and z. |
|
Definition at line 265 of file OgreVector3.h. |
|
Definition at line 252 of file OgreVector3.h. References Ogre::Real. |
|
Returns true if the vector's scalar components are all greater that the ones of the vector it is compared against.
Definition at line 398 of file OgreVector3.h. |
|
Assigns the value of the other vector.
Definition at line 104 of file OgreVector3.h. |
|
Definition at line 113 of file OgreVector3.h. |
|
Returns true if the vector's scalar components are all smaller that the ones of the vector it is compared against.
Definition at line 408 of file OgreVector3.h. |
|
Definition at line 93 of file OgreVector3.h. References Ogre::Real. |
|
Definition at line 86 of file OgreVector3.h. References Ogre::Real. |
|
Generates a vector perpendicular to this vector (eg an 'up' vector).
Definition at line 450 of file OgreVector3.h. References Ogre::Real, and squaredLength(). Referenced by Ogre::ParticleEmitter::setDirection(). |
|
Generates a new random vector which deviates from this vector by a given angle in a random direction.
Definition at line 486 of file OgreVector3.h. References Ogre::Quaternion::FromAngleAxis(). Referenced by Ogre::ParticleEmitter::genEmissionDirection(). |
|
Calculates a reflection vector to the plane with the given normal .
Definition at line 577 of file OgreVector3.h. |
|
|
Definition at line 205 of file OgreVector3.h. |
|
Function for writing to a stream.
Definition at line 595 of file OgreVector3.h. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 49 of file OgreVector3.h. |
|
|
|
|
|
Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:51:46 2004