#include <OSGVector.h>

Public Types | |
| typedef PointInterface < ValueTypeT, StorageInterfaceT > | Inherited |
| Parent type. | |
| typedef TypeTraits< ValueTypeT > ::RealReturnType | RealReturnType |
| Used type if the returnvalue must be a real value. | |
| typedef ValueTypeT | ValueType |
| Value type. | |
| typedef Inherited | PntInterface |
| typedef VectorInterface < ValueTypeT, StorageInterfaceT > | Self |
| Own type. | |
| typedef VectorInterface < ValueTypeT, StorageInterfaceT > | VecInterface |
Public Member Functions | |
Constructors | |
| VectorInterface (void) | |
| VectorInterface (const ValueTypeT *pVals) | |
| Constructor which takes a const value array. | |
| VectorInterface (ValueTypeT *pVals) | |
| Constructor which takes a const value array. | |
| template<class ValueType2T, class StorageInterface2T> | |
| VectorInterface (const PointInterface< ValueType2T, StorageInterface2T > &vec) | |
| template<class ValueType2T, class StorageInterface2T> | |
| VectorInterface (const VectorInterface< ValueType2T, StorageInterface2T > &vec) | |
| VectorInterface (const VectorInterface &source) | |
| VectorInterface (const ValueTypeT rVal1) | |
| VectorInterface (const ValueTypeT rVal1, const ValueTypeT rVal2) | |
| VectorInterface (const ValueTypeT rVal1, const ValueTypeT rVal2, const ValueTypeT rVal3) | |
| VectorInterface (const ValueTypeT rVal1, const ValueTypeT rVal2, const ValueTypeT rVal3, const ValueTypeT rVal4) | |
Destructor | |
| ~VectorInterface (void) | |
Common Math | |
| RealReturnType | length (void) const |
| Euclidean length of the vector. | |
| RealReturnType | squareLength (void) const |
| square of the Euclidean length of the vector | |
| void | normalize (void) |
| Changes vector to be of unit length. | |
| VectorInterface | cross (const VectorInterface &vec) const |
| Returns the right handed cross-product for a given vector; This function is implemented for size 3 vectors only. | |
| VectorInterface | operator% (const VectorInterface &vec) const |
| Euclidean length of the vector. | |
| void | crossThis (const VectorInterface &vec) |
| Calculates the right handed cross-product with a given vector; This function is implemented for size 3 vectors only. | |
| ValueTypeT | dot (const VectorInterface &vec) const |
| Return the dot (inner) product for a given vector. | |
| ValueTypeT | operator* (const VectorInterface &vec) const |
| Euclidean length of the vector. | |
| ValueTypeT | dot (const PntInterface &pnt) const |
| Euclidean length of the vector. | |
| ValueTypeT | operator* (const PntInterface &pnt) const |
| Euclidean length of the vector. | |
| RealReturnType | enclosedAngle (const VectorInterface &vec) const |
| Returns the angle between this and another vector. | |
| RealReturnType | projectTo (const VectorInterface &toVec) |
| Euclidean length of the vector. | |
Conv | |
| PntInterface & | addToZero (void) |
| Returns the corrosponding point by adding it to zero. | |
| const PntInterface & | addToZero (void) const |
| Returns the corrosponding point by adding it to zero. | |
| VectorInterface & | subZero (void) |
| Returns the corrosponding point by adding it to zero. | |
| const VectorInterface & | subZero (void) const |
| Returns the corrosponding point by adding it to zero. | |
Math | |
| VectorInterface | operator- (const VectorInterface &vec) const |
| Component wise binary vector subtraction operator. | |
| VectorInterface | operator+ (const VectorInterface &vec) const |
| Component wise binary vector addition operator. | |
| VectorInterface | operator* (const ValueTypeT rVal) const |
| Component wise binary scalar multiplication. | |
| VectorInterface | operator- (void) const |
| Nondestructive unary negation, returns new vector. | |
Assignment | |
| VectorInterface & | operator= (const VectorInterface &source) |
Comparison | |
| bool | operator< (const VectorInterface &other) const |
| bool | operator== (const VectorInterface &other) const |
| Equal operator, using Eps as the tolerance. | |
| bool | operator!= (const VectorInterface &other) const |
| Not eual operator, using Eps as the tolerance. | |
Set Values | |
| void | setNull (void) |
| void | setValue (const PointInterface &vec) |
| template<class ValueType2T, class StorageInterface2T> | |
| void | setValue (const PointInterface< ValueType2T, StorageInterface2T > &vec) |
| void | setValue (const ValueTypeT *pVals) |
| Set value from a given array, be sure to match sizes. | |
| void | setValue (ValueTypeT *pVals) |
| Set value from a given array, be sure to match sizes. | |
| void | setValue (const Char8 *szString) |
| void | setValue (Char8 *szString) |
| void | setValueFromCString (const Char8 *szString) |
| Extract values from given string, where both (const and not const) must be present, otherwise the compiler strikes back :-) (GV). | |
| void | setValueFromCString (Char8 *szString) |
| Extract values from given string, where both (const and not const) must be present, otherwise the compiler strikes back :-) (GV). | |
Get Values | |
| ValueTypeT * | getValues (void) |
| Get a pointer to the value storage. | |
| const ValueTypeT * | getValues (void) const |
| Get a const pointer to the value storage. | |
Common Math | |
| bool | isZero (void) const |
| Returns true iff the norm of each value is less than Eps. | |
| void | negate (void) |
| Negates each value of the point in place. | |
| bool | equals (const PointInterface &vec, const ValueTypeT tolerance) const |
| Returns true iff the two points are eual within a given tolerance. | |
| RealReturnType | dist (const PointInterface &vec) const |
| Returns the distance between the two points. | |
| RealReturnType | dist2 (const PointInterface &vec) const |
| Returns the distance between the two points, squared. | |
| RealReturnType | maxValue (void) const |
| Returns the maximum value of the vector. | |
Math | |
| void | operator*= (const ValueTypeT val) |
| Component wise scalar multiplication. | |
| void | operator/= (const ValueTypeT val) |
| Component wise scalar division. | |
| VecInterface | operator- (const PointInterface &vec) const |
| Point substraction, returns a new vector. | |
| PointInterface | operator- (const VecInterface &vec) const |
| Component wise binary vector addition operator. | |
| PointInterface | operator- (void) |
| Nondestructive unary negation, returns new point. | |
| PointInterface | operator+ (const VecInterface &vec) const |
| Component wise binary vector addition operator. | |
| void | operator+= (const VecInterface &vec) |
| Component wise vector addition. | |
| void | operator-= (const VecInterface &vec) |
| Component wise vector substraction. | |
Element Access | |
| ValueTypeT & | operator[] (const UInt32 uiVal) |
| const ValueTypeT & | operator[] (const UInt32 uiVal) const |
Comparison | |
| bool | operator< (const PointInterface &other) const |
| bool | operator== (const PointInterface &other) const |
| Equal operator, using Eps as the tolerance. | |
| bool | operator!= (const PointInterface &other) const |
| Not equal operator, using Eps as the tolerance. | |
Static Public Attributes | |
| static const VectorInterface | Null |
Definition at line 498 of file OSGVector.h.
| osg::VectorInterface< ValueTypeT, StorageInterfaceT >::Inherited |
Reimplemented from osg::PointInterface< ValueTypeT, StorageInterfaceT >.
Definition at line 506 of file OSGVector.h.
| osg::VectorInterface< ValueTypeT, StorageInterfaceT >::RealReturnType |
Reimplemented from osg::PointInterface< ValueTypeT, StorageInterfaceT >.
Definition at line 508 of file OSGVector.h.
| osg::VectorInterface< ValueTypeT, StorageInterfaceT >::ValueType |
Reimplemented from osg::PointInterface< ValueTypeT, StorageInterfaceT >.
Definition at line 510 of file OSGVector.h.
| typedef Inherited osg::VectorInterface< ValueTypeT, StorageInterfaceT >::PntInterface |
Definition at line 512 of file OSGVector.h.
| typedef VectorInterface<ValueTypeT, StorageInterfaceT> osg::VectorInterface< ValueTypeT, StorageInterfaceT >::Self |
Reimplemented from osg::PointInterface< ValueTypeT, StorageInterfaceT >.
Definition at line 515 of file OSGVector.h.
typedef VectorInterface<ValueTypeT, StorageInterfaceT> osg::PointInterface< ValueTypeT, StorageInterfaceT >::VecInterface [inherited] |
Definition at line 299 of file OSGVector.h.
| osg::VectorInterface< ValueTypeT, StorageInterfaceT >::VectorInterface | ( | void | ) | [inline] |
Definition at line 1319 of file OSGVector.inl.
01319 : 01320 Inherited() 01321 { 01322 for(UInt32 i = 0; i < Self::_iSize; i++) 01323 { 01324 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 01325 } 01326 }
| osg::VectorInterface< ValueTypeT, StorageInterfaceT >::VectorInterface | ( | const ValueTypeT * | pVals | ) | [inline] |
Be shure the array size at least as large as the vector size.
Definition at line 1337 of file OSGVector.inl.
01337 : 01338 Inherited(pVals) 01339 { 01340 }
| osg::VectorInterface< ValueTypeT, StorageInterfaceT >::VectorInterface | ( | ValueTypeT * | pVals | ) | [inline] |
Be shure the array size at least as large as the vector size.
Definition at line 1350 of file OSGVector.inl.
01350 : 01351 Inherited(pVals) 01352 { 01353 }
| osg::VectorInterface< ValueTypeT, StorageInterfaceT >::VectorInterface | ( | const PointInterface< ValueType2T, StorageInterface2T > & | vec | ) | [inline] |
| osg::VectorInterface< ValueTypeT, StorageInterfaceT >::VectorInterface | ( | const VectorInterface< ValueType2T, StorageInterface2T > & | vec | ) | [inline] |
| osg::VectorInterface< ValueTypeT, StorageInterfaceT >::VectorInterface | ( | const VectorInterface< ValueTypeT, StorageInterfaceT > & | source | ) | [inline] |
Definition at line 1380 of file OSGVector.inl.
01381 : 01382 01383 Inherited(source) 01384 { 01385 }
| osg::VectorInterface< ValueTypeT, StorageInterfaceT >::VectorInterface | ( | const ValueTypeT | rVal1 | ) | [inline] |
Definition at line 1389 of file OSGVector.inl.
01391 { 01392 UInt32 i; 01393 01394 Self::_values[0] = rVal1; 01395 01396 for(i = 1; i < Self::_iSize; i++) 01397 { 01398 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 01399 } 01400 }
| osg::VectorInterface< ValueTypeT, StorageInterfaceT >::VectorInterface | ( | const ValueTypeT | rVal1, | |
| const ValueTypeT | rVal2 | |||
| ) | [inline] |
Definition at line 1405 of file OSGVector.inl.
01406 : 01407 01408 Inherited(rVal1, rVal2) 01409 { 01410 }
| osg::VectorInterface< ValueTypeT, StorageInterfaceT >::VectorInterface | ( | const ValueTypeT | rVal1, | |
| const ValueTypeT | rVal2, | |||
| const ValueTypeT | rVal3 | |||
| ) | [inline] |
Definition at line 1415 of file OSGVector.inl.
01417 : 01418 01419 Inherited(rVal1, rVal2, rVal3) 01420 { 01421 }
| osg::VectorInterface< ValueTypeT, StorageInterfaceT >::VectorInterface | ( | const ValueTypeT | rVal1, | |
| const ValueTypeT | rVal2, | |||
| const ValueTypeT | rVal3, | |||
| const ValueTypeT | rVal4 | |||
| ) | [inline] |
Definition at line 1426 of file OSGVector.inl.
01429 : 01430 01431 Inherited(rVal1, rVal2, rVal3, rVal4) 01432 { 01433 }
| osg::VectorInterface< ValueTypeT, StorageInterfaceT >::~VectorInterface | ( | void | ) | [inline] |
| VectorInterface< ValueTypeT, StorageInterfaceT >::RealReturnType osg::VectorInterface< ValueTypeT, StorageInterfaceT >::length | ( | void | ) | const [inline] |
Definition at line 1454 of file OSGVector.inl.
References osg::osgsqrt(), and osg::VectorInterface< ValueTypeT, StorageInterfaceT >::squareLength().
Referenced by osg::calcFaceNormals(), osg::ExtrusionSurface::calcQuadFaceNormal(), osg::ExtrusionSurface::calcYAxes(), osg::ExtrusionSurface::calcZAxes(), osg::createNormalVolume(), osg::ExtrusionSurface::determineTopology(), osg::dist3D_Segment_to_Segment(), osg::Slices::drawSlices(), osg::VectorInterface< ValueTypeT, StorageInterfaceT >::enclosedAngle(), osg::extend(), osg::Surface::FindClosestPoint(), osg::CylinderVolume::getScalarVolume(), osg::QuaternionBase< ValueTypeT >::getValueAsAxisDeg(), osg::DVRVolume::initializeClipObjects(), osg::intersect(), osg::Plane::intersect(), osg::Line::intersect(), osg::Transform::intersectActorEnter(), osg::Transform::intersectActorLeave(), osg::Transform::intersectEnter(), osg::ScreenGroup::intersectEnter(), osg::InverseTransform::intersectEnter(), osg::Billboard::intersectEnter(), osg::Transform::intersectLeave(), osg::ScreenGroup::intersectLeave(), osg::InverseTransform::intersectLeave(), osg::Billboard::intersectLeave(), osg::DynamicVolume::morphToType(), osg::VectorInterface< ValueTypeT, StorageInterfaceT >::normalize(), osg::Brick::render3DSlices(), osg::TrackballNavigator::rotate(), osg::TrackballNavigator::set(), osg::QuaternionBase< ValueTypeT >::setValue(), setVecLen(), osg::SimpleSceneManager::showAll(), osg::Plane::transform(), osg::CylinderVolume::transform(), osg::GeoTypeGraphOp::travNodeEnter(), osg::ProjectionCameraDecorator::updateData(), and osg::Trackball::updateRotation().
01455 { 01456 return osgsqrt(Self::squareLength()); 01457 }
| VectorInterface< ValueTypeT, StorageInterfaceT >::RealReturnType osg::VectorInterface< ValueTypeT, StorageInterfaceT >::squareLength | ( | void | ) | const [inline] |
Definition at line 1464 of file OSGVector.inl.
Referenced by osg::calcVertexNormals(), osg::Surface::FindClosestPoint(), osg::Surface::FindClosestPointExact(), osg::Line::getClosestPoints(), osg::Surface::getDesiredError(), and osg::VectorInterface< ValueTypeT, StorageInterfaceT >::length().
01465 { 01466 RealReturnType rTmpVal = RealReturnType(Self::_values[0] * 01467 Self::_values[0] ); 01468 01469 for(UInt32 i = 1; i < Self::_iSize; i++) 01470 { 01471 rTmpVal += Self::_values[i] * Self::_values[i]; 01472 } 01473 01474 return rTmpVal; 01475 }
| void osg::VectorInterface< ValueTypeT, StorageInterfaceT >::normalize | ( | void | ) | [inline] |
Definition at line 1481 of file OSGVector.inl.
References osg::Eps, osg::VectorInterface< ValueTypeT, StorageInterfaceT >::length(), and osg::osgabs().
Referenced by osg::DVRIsoShader::activate_FragmentProgramShading(), addPoint(), osg::Surface::buildSurface(), osg::DVRClipGeometry::buildTriangledGeometry(), osg::calcFaceNormals(), osg::Billboard::calcMatrix(), osg::ExtrusionSurface::calcQuadFaceNormal(), osg::ExtrusionSurface::calcVertexNormal(), osg::calcVertexNormals(), osg::calcVertexTangents(), osg::ExtrusionSurface::calcXAxis(), osg::ExtrusionSurface::calcYAxes(), osg::ExtrusionSurface::calcZAxes(), osg::TextVectorGlyph::computeContourOrientations(), osg::computeEdgeNormal(), osg::createNormalizationCubeMap(), osg::createNormalMapFromBump(), osg::createNormalVolume(), drawViewerObjects< posTrait, colTrait, sizeTrait, geoTrait >::draw(), drawObjects< posTrait, colTrait, sizeTrait, normalTrait, geoTrait >::draw(), drawViewerQuads< posTrait, colTrait, texTrait, sizeTrait >::draw(), drawViewerObjects< posTrait, colTrait, sizeTrait, geoTrait >::drawIndexed(), drawObjects< posTrait, colTrait, sizeTrait, normalTrait, geoTrait >::drawIndexed(), drawViewerQuads< posTrait, colTrait, texTrait, sizeTrait >::drawIndexed(), osg::Slices::drawPrimitives(), osg::Slices::drawSlices(), osg::Surface::FindClosestPoint(), osg::WalkNavigator::forward(), osg::FlyNavigator::forward(), osg::DVRSlice::getNormal(), osg::TextVectorGlyph::getNormals(), osg::NormalQuantifier::getSubIndex(), osg::Line::intersect(), osg::ExtrusionSurface::isLeft(), osg::makeSphereGeo(), osg::MatrixLookAt(), osg::Plane::Plane(), osg::MergeGraphOp::processTransformations(), osg::RAWSceneFileType::read(), osg::WalkNavigator::right(), osg::FlyNavigator::right(), osg::FlyNavigator::rotate(), osg::DVRIsoShader::setupCombinerParametersDiffuse(), osg::DVRIsoShader::setupCombinerParametersSpecular(), osg::QuaternionBase< ValueTypeT >::setValue(), osg::Line::setValue(), osg::NormalQuantifier::subdivide(), osg::Plane::transform(), osg::CylinderVolume::transform(), and osg::TileGeometryLoad::updateView().
01482 { 01483 ValueTypeT rLength = ValueTypeT(length()); 01484 01485 if(osgabs(rLength) < Eps) 01486 { 01487 rLength = TypeTraits<ValueTypeT>::getOneElement(); 01488 } 01489 else 01490 { 01491 rLength = TypeTraits<ValueTypeT>::getOneElement() / rLength; 01492 } 01493 01494 for(UInt32 i = 0; i < Self::_iSize; i++) 01495 { 01496 Self::_values[i] *= rLength; 01497 } 01498 }
| VectorInterface< ValueTypeT, StorageInterfaceT > osg::VectorInterface< ValueTypeT, StorageInterfaceT >::cross | ( | const VectorInterface< ValueTypeT, StorageInterfaceT > & | vec | ) | const [inline] |
Definition at line 1512 of file OSGVector.inl.
Referenced by osg::Billboard::calcMatrix(), osg::ExtrusionSurface::calcNonUnitZAxis(), osg::ExtrusionSurface::calcTriangleFaceNormal(), osg::calcVertexTangents(), osg::ExtrusionSurface::calcXAxis(), osg::Surface::checkOrient(), osg::createNormalMapFromBump(), osg::Slices::createSlice(), drawViewerObjects< posTrait, colTrait, sizeTrait, geoTrait >::draw(), drawObjects< posTrait, colTrait, sizeTrait, normalTrait, geoTrait >::draw(), drawViewerQuads< posTrait, colTrait, texTrait, sizeTrait >::draw(), drawViewerObjects< posTrait, colTrait, sizeTrait, geoTrait >::drawIndexed(), drawObjects< posTrait, colTrait, sizeTrait, normalTrait, geoTrait >::drawIndexed(), drawViewerQuads< posTrait, colTrait, texTrait, sizeTrait >::drawIndexed(), osg::Line::getClosestPoints(), osg::ProjectionCameraDecorator::getProjectionTranslation(), osg::FrustumVolume::getScalarVolume(), osg::Plane::intersect(), osg::Line::intersect(), osg::DVRClipGeometry::linkContour(), osg::MatrixLookAt(), osg::VectorInterface< ValueTypeT, StorageInterfaceT >::operator%(), osg::NormalQuantifier::rayTriangle(), osg::QuaternionBase< ValueTypeT >::setValue(), and osg::ProjectionCameraDecorator::updateData().
01513 { 01514 VectorInterface<ValueTypeT, StorageInterfaceT> returnValue; 01515 01516 if(Self::_iSize >= 3) 01517 { 01518 returnValue[0] = 01519 Self::_values[1] * vec._values[2] - 01520 Self::_values[2] * vec._values[1]; 01521 returnValue[1] = 01522 Self::_values[2] * vec._values[0] - 01523 Self::_values[0] * vec._values[2]; 01524 returnValue[2] = 01525 Self::_values[0] * vec._values[1] - 01526 Self::_values[1] * vec._values[0]; 01527 } 01528 else 01529 { 01530 // Must be changed 01531 fprintf(stderr, "cross only implemented for size 3\n"); 01532 } 01533 01534 return returnValue; 01535 }
| VectorInterface< ValueTypeT, StorageInterfaceT > osg::VectorInterface< ValueTypeT, StorageInterfaceT >::operator% | ( | const VectorInterface< ValueTypeT, StorageInterfaceT > & | vec | ) | const [inline] |
Definition at line 1540 of file OSGVector.inl.
References osg::VectorInterface< ValueTypeT, StorageInterfaceT >::cross().
01542 { 01543 return this->cross(vec); 01544 }
| void osg::VectorInterface< ValueTypeT, StorageInterfaceT >::crossThis | ( | const VectorInterface< ValueTypeT, StorageInterfaceT > & | vec | ) | [inline] |
Definition at line 1553 of file OSGVector.inl.
Referenced by osg::calcVertexNormals(), osg::WalkNavigator::forward(), osg::Plane::Plane(), osg::RAWSceneFileType::read(), osg::WalkNavigator::right(), osg::FlyNavigator::right(), osg::TrackballNavigator::rotate(), osg::FlyNavigator::rotate(), osg::CylinderVolume::transform(), and osg::Trackball::updateRotation().
01554 { 01555 if(Self::_iSize >= 3) 01556 { 01557 ValueTypeT rTmp[2]; 01558 01559 rTmp[0] = 01560 Self::_values[1] * vec._values[2] - 01561 Self::_values[2] * vec._values[1]; 01562 rTmp[1] = 01563 Self::_values[2] * vec._values[0] - 01564 Self::_values[0] * vec._values[2]; 01565 01566 Self::_values[2] = 01567 Self::_values[0] * vec._values[1] - 01568 Self::_values[1] * vec._values[0]; 01569 01570 Self::_values[0] = rTmp[0]; 01571 Self::_values[1] = rTmp[1]; 01572 } 01573 else 01574 { 01575 // Must be changed 01576 fprintf(stderr, "crossThis only available for size 3\n"); 01577 } 01578 }
| ValueTypeT osg::VectorInterface< ValueTypeT, StorageInterfaceT >::dot | ( | const VectorInterface< ValueTypeT, StorageInterfaceT > & | vec | ) | const [inline] |
Definition at line 1588 of file OSGVector.inl.
Referenced by osg::DVRClipGeometry::buildTriangledGeometry(), osg::Navigator::calcDeltas(), osg::calcVertexNormals(), osg::calcVertexTangents(), osg::ExtrusionSurface::calcZAxes(), osg::Surface::checkOrient(), osg::dist3D_Segment_to_Segment(), osg::Plane::distance(), osg::VectorInterface< ValueTypeT, StorageInterfaceT >::enclosedAngle(), osg::WalkNavigator::forward(), osg::Line::getClosestPoint(), osg::Line::getClosestPoints(), osg::Navigator::getIntersectionPoint(), osg::FrustumVolume::getScalarVolume(), osg::Line::intersect(), osg::Plane::intersectInfinite(), osg::Plane::isInHalfSpace(), osg::isLeft(), osg::ExtrusionSurface::isLeft(), osg::Plane::isOnPlane(), osg::DVRClipGeometry::linkContour(), osg::MatrixLookAt(), osg::VectorInterface< ValueTypeT, StorageInterfaceT >::operator*(), osg::Plane::Plane(), osg::VectorInterface< ValueTypeT, StorageInterfaceT >::projectTo(), osg::NormalQuantifier::rayTriangle(), osg::Brick::render3DSlices(), osg::WalkNavigator::right(), and osg::QuaternionBase< ValueTypeT >::setValue().
01590 { 01591 ValueTypeT rTmpVal = Self::_values[0] * vec._values[0]; 01592 01593 for(UInt32 i = 1; i < Self::_iSize; i++) 01594 { 01595 rTmpVal += Self::_values[i] * vec._values[i]; 01596 } 01597 01598 return rTmpVal; 01599 }
| ValueTypeT osg::VectorInterface< ValueTypeT, StorageInterfaceT >::operator* | ( | const VectorInterface< ValueTypeT, StorageInterfaceT > & | vec | ) | const [inline] |
Definition at line 1603 of file OSGVector.inl.
References osg::VectorInterface< ValueTypeT, StorageInterfaceT >::dot().
01605 { 01606 return this->dot(vec); 01607 }
| ValueTypeT osg::VectorInterface< ValueTypeT, StorageInterfaceT >::dot | ( | const PntInterface & | pnt | ) | const [inline] |
Definition at line 1611 of file OSGVector.inl.
01613 { 01614 ValueTypeT rTmpVal = Self::_values[0] * pnt[0]; 01615 01616 for(UInt32 i = 1; i < Self::_iSize; i++) 01617 { 01618 rTmpVal += Self::_values[i] * pnt[i]; 01619 } 01620 01621 return rTmpVal; 01622 }
| ValueTypeT osg::VectorInterface< ValueTypeT, StorageInterfaceT >::operator* | ( | const PntInterface & | pnt | ) | const [inline] |
Definition at line 1626 of file OSGVector.inl.
References osg::VectorInterface< ValueTypeT, StorageInterfaceT >::dot().
01628 { 01629 return this->dot(pnt); 01630 }
| VectorInterface< ValueTypeT, StorageInterfaceT >::RealReturnType osg::VectorInterface< ValueTypeT, StorageInterfaceT >::enclosedAngle | ( | const VectorInterface< ValueTypeT, StorageInterfaceT > & | vec | ) | const [inline] |
Definition at line 1637 of file OSGVector.inl.
References osg::VectorInterface< ValueTypeT, StorageInterfaceT >::dot(), osg::Eps, osg::PointInterface< ValueTypeT, StorageInterfaceT >::isZero(), osg::VectorInterface< ValueTypeT, StorageInterfaceT >::length(), osg::osgacos(), and osg::Pi.
Referenced by osg::ExtrusionSurface::calcVertexNormal().
01639 { 01640 RealReturnType returnValue; 01641 01642 if(Self::isZero() || vec.isZero()) 01643 { 01644 returnValue = TypeTraits<RealReturnType>::getZeroElement(); 01645 } 01646 else 01647 { 01648 returnValue = dot(vec); 01649 returnValue /= (length() * vec.length()); 01650 01651 if((returnValue - Eps) < -1.) 01652 { 01653 returnValue = Pi; 01654 } 01655 else if((returnValue + Eps) > 1.) 01656 { 01657 returnValue = TypeTraits<RealReturnType>::getZeroElement(); 01658 } 01659 else 01660 { 01661 returnValue = osgacos(returnValue); 01662 } 01663 } 01664 01665 return returnValue; 01666 }
| VectorInterface< ValueTypeT, StorageInterfaceT >::RealReturnType osg::VectorInterface< ValueTypeT, StorageInterfaceT >::projectTo | ( | const VectorInterface< ValueTypeT, StorageInterfaceT > & | toVec | ) | [inline] |
Definition at line 1671 of file OSGVector.inl.
References osg::VectorInterface< ValueTypeT, StorageInterfaceT >::dot(), osg::Eps, osg::osgabs(), and osg::PointInterface< ValueTypeT, StorageInterfaceT >::setNull().
Referenced by osg::Plane::transform().
01673 { 01674 RealReturnType rDot = dot(toVec); 01675 RealReturnType rSquareDot = toVec.dot(toVec); 01676 01677 if(rSquareDot > Eps) 01678 { 01679 rDot /= rSquareDot; 01680 01681 if(osgabs(rDot) > Eps) 01682 { 01683 *this = toVec; 01684 *this *= ValueTypeT(rDot); 01685 } 01686 else 01687 { 01688 this->setNull(); 01689 rDot = TypeTraits<RealReturnType>::getZeroElement(); 01690 } 01691 } 01692 else 01693 { 01694 rDot = TypeTraits<RealReturnType>::getOneElement(); 01695 } 01696 01697 return rDot; 01698 }
| VectorInterface< ValueTypeT, StorageInterfaceT >::PntInterface & osg::VectorInterface< ValueTypeT, StorageInterfaceT >::addToZero | ( | void | ) | [inline] |
Definition at line 1719 of file OSGVector.inl.
Referenced by osg::makeSphereGeo().
01720 { 01721 return *(static_cast<PntInterface *>(this)); 01722 }
| const VectorInterface< ValueTypeT, StorageInterfaceT >::PntInterface & osg::VectorInterface< ValueTypeT, StorageInterfaceT >::addToZero | ( | void | ) | const [inline] |
Definition at line 1707 of file OSGVector.inl.
01708 { 01709 return *(static_cast<const PntInterface *>(this)); 01710 }
| VectorInterface< ValueTypeT, StorageInterfaceT > & osg::VectorInterface< ValueTypeT, StorageInterfaceT >::subZero | ( | void | ) | [inline] |
Reimplemented from osg::PointInterface< ValueTypeT, StorageInterfaceT >.
Definition at line 1727 of file OSGVector.inl.
| const VectorInterface< ValueTypeT, StorageInterfaceT > & osg::VectorInterface< ValueTypeT, StorageInterfaceT >::subZero | ( | void | ) | const [inline] |
Reimplemented from osg::PointInterface< ValueTypeT, StorageInterfaceT >.
Definition at line 1735 of file OSGVector.inl.
| VectorInterface< ValueTypeT, StorageInterfaceT > osg::VectorInterface< ValueTypeT, StorageInterfaceT >::operator- | ( | const VectorInterface< ValueTypeT, StorageInterfaceT > & | vec | ) | const [inline] |
Definition at line 1748 of file OSGVector.inl.
01750 { 01751 VectorInterface<ValueTypeT, StorageInterfaceT> returnValue; 01752 01753 for(UInt32 i = 0; i < StorageInterfaceT::_iSize; i++) 01754 { 01755 returnValue[i] = Self::_values[i] - vec[i]; 01756 } 01757 01758 return returnValue; 01759 }
| VectorInterface< ValueTypeT, StorageInterfaceT > osg::VectorInterface< ValueTypeT, StorageInterfaceT >::operator+ | ( | const VectorInterface< ValueTypeT, StorageInterfaceT > & | vec | ) | const [inline] |
Definition at line 1766 of file OSGVector.inl.
01768 { 01769 VectorInterface<ValueTypeT, StorageInterfaceT> returnValue; 01770 01771 for(UInt32 i = 0; i < StorageInterfaceT::_iSize; i++) 01772 { 01773 returnValue[i] = Self::_values[i] + vec[i]; 01774 } 01775 01776 return returnValue; 01777 }
| VectorInterface< ValueTypeT, StorageInterfaceT > osg::VectorInterface< ValueTypeT, StorageInterfaceT >::operator* | ( | const ValueTypeT | rVal | ) | const [inline] |
Reimplemented from osg::PointInterface< ValueTypeT, StorageInterfaceT >.
Definition at line 1785 of file OSGVector.inl.
01787 { 01788 VectorInterface<ValueTypeT, StorageInterfaceT> returnValue; 01789 01790 for(UInt32 i = 0; i < StorageInterfaceT::_iSize; i++) 01791 { 01792 returnValue[i] = Self::_values[i] * rVal; 01793 } 01794 01795 return returnValue; 01796 }
| VectorInterface< ValueTypeT, StorageInterfaceT > osg::VectorInterface< ValueTypeT, StorageInterfaceT >::operator- | ( | void | ) | const [inline] |
Definition at line 1803 of file OSGVector.inl.
01804 { 01805 VectorInterface<ValueTypeT, StorageInterfaceT> returnValue; 01806 01807 for(UInt32 i = 0; i < Self::_iSize; i++) 01808 { 01809 returnValue._values[i] = - Self::_values[i]; 01810 } 01811 01812 return returnValue; 01813 }
| VectorInterface< ValueTypeT, StorageInterfaceT > & osg::VectorInterface< ValueTypeT, StorageInterfaceT >::operator= | ( | const VectorInterface< ValueTypeT, StorageInterfaceT > & | source | ) | [inline] |
Definition at line 1821 of file OSGVector.inl.
01823 { 01824 if(this == &source) 01825 return *this; 01826 01827 *(static_cast<Inherited *>(this)) = 01828 static_cast<const Inherited &>(source); 01829 01830 return *this; 01831 }
| bool osg::VectorInterface< ValueTypeT, StorageInterfaceT >::operator< | ( | const VectorInterface< ValueTypeT, StorageInterfaceT > & | other | ) | const [inline] |
Definition at line 1838 of file OSGVector.inl.
01840 { 01841 bool ret = false; 01842 01843 for(UInt32 i = 0; i < Self::_iSize; i++) 01844 { 01845 if(Self::_values[i] > other._values[i]) 01846 { 01847 break; 01848 } 01849 if(Self::_values[i] < other._values[i]) 01850 { 01851 ret = true; 01852 break; 01853 } 01854 } 01855 01856 return ret; 01857 }
| bool osg::VectorInterface< ValueTypeT, StorageInterfaceT >::operator== | ( | const VectorInterface< ValueTypeT, StorageInterfaceT > & | other | ) | const [inline] |
Definition at line 1863 of file OSGVector.inl.
References osg::Eps, and osg::PointInterface< ValueTypeT, StorageInterfaceT >::equals().
01865 { 01866 //CHECK 01867 return Self::equals(other, ValueTypeT(Eps)); 01868 }
| bool osg::VectorInterface< ValueTypeT, StorageInterfaceT >::operator!= | ( | const VectorInterface< ValueTypeT, StorageInterfaceT > & | other | ) | const [inline] |
| void osg::PointInterface< ValueTypeT, StorageInterfaceT >::setNull | ( | void | ) | [inline, inherited] |
Definition at line 591 of file OSGVector.inl.
Referenced by osg::VectorInterface< ValueTypeT, StorageInterfaceT >::projectTo(), and osg::TransformationMatrix< ValueTypeT >::setIdentity().
00592 { 00593 for(UInt32 i = 0; i < Self::_iSize; i++) 00594 { 00595 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 00596 } 00597 }
| void osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValue | ( | const PointInterface< ValueTypeT, StorageInterfaceT > & | vec | ) | [inline, inherited] |
Definition at line 614 of file OSGVector.inl.
Referenced by osg::Billboard::calcMatrix(), osg::MergeGraphOp::processTransformations(), osg::TransformationMatrix< ValueTypeT >::setTranslate(), osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValue(), osg::TransformationMatrix< ValueTypeT >::setValue(), and osg::TransformationMatrix< ValueTypeT >::TransformationMatrix().
00615 { 00616 for(UInt32 i = 0; i < Self::_iSize; i++) 00617 { 00618 Self::_values[i] = vec._values[i]; 00619 } 00620 }
| void osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValue | ( | const PointInterface< ValueType2T, StorageInterface2T > & | vec | ) | [inline, inherited] |
Definition at line 627 of file OSGVector.inl.
00628 { 00629 typedef PointInterface<ValueType2T, StorageInterface2T> VectorT; 00630 00631 static const UInt32 nElementsToCopy = Self::_iSize < VectorT::_iSize ? Self::_iSize : VectorT::_iSize; 00632 00633 for(UInt32 i = 0; i < nElementsToCopy; ++i) 00634 { 00635 Self::_values[i] = vec.getValues()[i]; 00636 } 00637 }
| void osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValue | ( | const ValueTypeT * | pVals | ) | [inline, inherited] |
Definition at line 693 of file OSGVector.inl.
00694 { 00695 for(UInt32 i = 0; i < Self::_iSize; i++) 00696 { 00697 Self::_values[i] = pVals[i]; 00698 } 00699 }
| void osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValue | ( | ValueTypeT * | pVals | ) | [inline, inherited] |
Definition at line 706 of file OSGVector.inl.
References osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValue().
00707 { 00708 setValue(static_cast<const ValueTypeT *>(pVals)); 00709 }
| void osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValue | ( | const Char8 * | szString | ) | [inline, inherited] |
Definition at line 796 of file OSGVector.inl.
References osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValueFromCString().
00797 { 00798 setValueFromCString(szString); 00799 }
| void osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValue | ( | Char8 * | szString | ) | [inline, inherited] |
Definition at line 804 of file OSGVector.inl.
References osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValueFromCString().
00805 { 00806 setValueFromCString(szString); 00807 }
| void osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValueFromCString | ( | const Char8 * | szString | ) | [inline, inherited] |
Definition at line 718 of file OSGVector.inl.
Referenced by osg::osg::FieldDataTraits< Pnt4ld >::getFromString(), osg::osg::FieldDataTraits< Pnt3ld >::getFromString(), osg::osg::FieldDataTraits< Pnt2ld >::getFromString(), osg::osg::FieldDataTraits< Pnt4d >::getFromString(), osg::osg::FieldDataTraits< Pnt3d >::getFromString(), osg::osg::FieldDataTraits< Pnt2d >::getFromString(), osg::osg::FieldDataTraits< Pnt4f >::getFromString(), osg::osg::FieldDataTraits< Pnt3f >::getFromString(), osg::osg::FieldDataTraits< Pnt2f >::getFromString(), osg::osg::FieldDataTraits< Pnt4s >::getFromString(), osg::osg::FieldDataTraits< Pnt3s >::getFromString(), osg::osg::FieldDataTraits< Pnt2s >::getFromString(), osg::osg::FieldDataTraits< Pnt4us >::getFromString(), osg::osg::FieldDataTraits< Pnt3us >::getFromString(), osg::osg::FieldDataTraits< Pnt2us >::getFromString(), osg::osg::FieldDataTraits< Pnt4b >::getFromString(), osg::osg::FieldDataTraits< Pnt3b >::getFromString(), osg::osg::FieldDataTraits< Pnt2b >::getFromString(), osg::osg::FieldDataTraits< Pnt4ub >::getFromString(), osg::osg::FieldDataTraits< Pnt3ub >::getFromString(), osg::osg::FieldDataTraits< Pnt2ub >::getFromString(), osg::osg::FieldDataTraits< Vec4ld >::getFromString(), osg::osg::FieldDataTraits< Vec3ld >::getFromString(), osg::osg::FieldDataTraits< Vec2ld >::getFromString(), osg::osg::FieldDataTraits< Vec4d >::getFromString(), osg::osg::FieldDataTraits< Vec3d >::getFromString(), osg::osg::FieldDataTraits< Vec2d >::getFromString(), osg::osg::FieldDataTraits< Vec4f >::getFromString(), osg::osg::FieldDataTraits< Vec3f >::getFromString(), osg::osg::FieldDataTraits< Vec2f >::getFromString(), osg::osg::FieldDataTraits< Vec4s >::getFromString(), osg::osg::FieldDataTraits< Vec3s >::getFromString(), osg::osg::FieldDataTraits< Vec2s >::getFromString(), osg::osg::FieldDataTraits< Vec4us >::getFromString(), osg::osg::FieldDataTraits< Vec3us >::getFromString(), osg::osg::FieldDataTraits< Vec2us >::getFromString(), osg::osg::FieldDataTraits< Vec4b >::getFromString(), osg::osg::FieldDataTraits< Vec3b >::getFromString(), osg::osg::FieldDataTraits< Vec2b >::getFromString(), osg::osg::FieldDataTraits< Vec4ub >::getFromString(), osg::osg::FieldDataTraits< Vec3ub >::getFromString(), osg::osg::FieldDataTraits< Vec2ub >::getFromString(), osg::ClusterWindow::loadCalibration(), osg::ClusterWindow::loadFilter(), osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValue(), osg::Color4< ValueTypeT >::setValue(), osg::Color3< ValueTypeT >::setValue(), and osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValueFromCString().
00720 { 00721 UInt32 i; 00722 UInt32 numOfToken = Self::_iSize; 00723 00724 Char8 *c = const_cast<Char8 *>(szString); 00725 Char8 *tokenC = 0; 00726 00727 Char8 token[256]; 00728 00729 if(szString == NULL || (*szString) == '\0') 00730 { 00731 for(i = 0; i < Self::_iSize; i++) 00732 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 00733 00734 return; 00735 } 00736 00737 for (i = 0; i < numOfToken; c++) 00738 { 00739 switch (*c) 00740 { 00741 case '\0': 00742 if(tokenC) 00743 { 00744 *tokenC = 0; 00745 Self::_values[i++] = 00746 TypeTraits<ValueTypeT>::getFromString(token); 00747 } 00748 00749 while (i < numOfToken) 00750 { 00751 Self::_values[i++] = 00752 TypeTraits<ValueTypeT>::getZeroElement(); 00753 } 00754 break; 00755 00756 case ' ' : 00757 case '\t': 00758 case '\n': 00759 case ',': 00760 if(tokenC) 00761 { 00762 *tokenC = 0; 00763 Self::_values[i++] = 00764 TypeTraits<ValueTypeT>::getFromString(token); 00765 tokenC = 0; 00766 } 00767 break; 00768 default: 00769 if(!tokenC) 00770 { 00771 tokenC = token; 00772 } 00773 *tokenC++ = *c; 00774 break; 00775 } 00776 } 00777 }
| void osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValueFromCString | ( | Char8 * | szString | ) | [inline, inherited] |
Definition at line 786 of file OSGVector.inl.
References osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValueFromCString().
00787 { 00788 setValueFromCString(static_cast<const Char8 *>(szString)); 00789 }
| ValueTypeT * osg::PointInterface< ValueTypeT, StorageInterfaceT >::getValues | ( | void | ) | [inline, inherited] |
Definition at line 818 of file OSGVector.inl.
Referenced by changeGenFunc(), osg::DVRClipper::clipSlice(), drawShaderStrips< posTrait, secPosTrait, colTrait, texTrait, sizeTrait, normalTrait >::draw(), drawShaderQuads< posTrait, secPosTrait, colTrait, texTrait, sizeTrait, normalTrait >::draw(), GeoTraitRectangle::draw(), GeoTraitArrow::draw(), osg::SkyBackground::drawFace(), drawShaderStrips< posTrait, secPosTrait, colTrait, texTrait, sizeTrait, normalTrait >::drawIndexed(), drawShaderQuads< posTrait, secPosTrait, colTrait, texTrait, sizeTrait, normalTrait >::drawIndexed(), osg::Slices::drawSlices(), osg::Window::frameInit(), osg::TransformationMatrix< ValueTypeT >::getValues(), osg::ProgramChunk::handleGL(), NormalTraitGeneric3f::normal(), NormalTraitGeneric::normal(), osg::PointInterface< ValueTypeT, StorageInterfaceT >::PointInterface(), osg::osg::FieldDataTraits< Pnt4ld >::putToString(), osg::osg::FieldDataTraits< Pnt3ld >::putToString(), osg::osg::FieldDataTraits< Pnt2ld >::putToString(), osg::osg::FieldDataTraits< Pnt4d >::putToString(), osg::osg::FieldDataTraits< Pnt3d >::putToString(), osg::osg::FieldDataTraits< Pnt2d >::putToString(), osg::osg::FieldDataTraits< Pnt4f >::putToString(), osg::osg::FieldDataTraits< Pnt3f >::putToString(), osg::osg::FieldDataTraits< Pnt2f >::putToString(), osg::osg::FieldDataTraits< Pnt4s >::putToString(), osg::osg::FieldDataTraits< Pnt3s >::putToString(), osg::osg::FieldDataTraits< Pnt2s >::putToString(), osg::osg::FieldDataTraits< Pnt4us >::putToString(), osg::osg::FieldDataTraits< Pnt3us >::putToString(), osg::osg::FieldDataTraits< Pnt2us >::putToString(), osg::osg::FieldDataTraits< Pnt4b >::putToString(), osg::osg::FieldDataTraits< Pnt3b >::putToString(), osg::osg::FieldDataTraits< Pnt2b >::putToString(), osg::osg::FieldDataTraits< Pnt4ub >::putToString(), osg::osg::FieldDataTraits< Pnt3ub >::putToString(), osg::osg::FieldDataTraits< Pnt2ub >::putToString(), osg::osg::FieldDataTraits< Vec4ld >::putToString(), osg::osg::FieldDataTraits< Vec3ld >::putToString(), osg::osg::FieldDataTraits< Vec2ld >::putToString(), osg::osg::FieldDataTraits< Vec4d >::putToString(), osg::osg::FieldDataTraits< Vec3d >::putToString(), osg::osg::FieldDataTraits< Vec2d >::putToString(), osg::osg::FieldDataTraits< Vec4f >::putToString(), osg::osg::FieldDataTraits< Vec3f >::putToString(), osg::osg::FieldDataTraits< Vec2f >::putToString(), osg::osg::FieldDataTraits< Vec4s >::putToString(), osg::osg::FieldDataTraits< Vec3s >::putToString(), osg::osg::FieldDataTraits< Vec2s >::putToString(), osg::osg::FieldDataTraits< Vec4us >::putToString(), osg::osg::FieldDataTraits< Vec3us >::putToString(), osg::osg::FieldDataTraits< Vec2us >::putToString(), osg::osg::FieldDataTraits< Vec4b >::putToString(), osg::osg::FieldDataTraits< Vec3b >::putToString(), osg::osg::FieldDataTraits< Vec2b >::putToString(), osg::osg::FieldDataTraits< Vec4ub >::putToString(), osg::osg::FieldDataTraits< Vec3ub >::putToString(), osg::osg::FieldDataTraits< Vec2ub >::putToString(), osg::osg::FieldDataTraits< Plane >::putToString(), osg::osg::FieldDataTraits< DynamicVolume >::putToString(), osg::Brick::render3DSlices(), setGenFunc(), osg::SHLChunk::updateCameraPosition(), and PosTraitGeneric::vertex().
| const ValueTypeT * osg::PointInterface< ValueTypeT, StorageInterfaceT >::getValues | ( | void | ) | const [inline, inherited] |
| bool osg::PointInterface< ValueTypeT, StorageInterfaceT >::isZero | ( | void | ) | const [inline, inherited] |
Definition at line 841 of file OSGVector.inl.
References osg::Eps.
Referenced by osg::VectorInterface< ValueTypeT, StorageInterfaceT >::enclosedAngle(), osg::Line::getClosestPoints(), osg::BoxVolume::setBoundsByCenterAndSize(), and osg::ProjectionCameraDecorator::updateData().
00842 { 00843 bool returnValue = true; 00844 00845 for(UInt32 i = 0; i < Self::_iSize; i++) 00846 { 00847 returnValue &= ((Self::_values[i] <= Eps) && 00848 (Self::_values[i] >= -Eps)); 00849 } 00850 00851 return returnValue; 00852 }
| void osg::PointInterface< ValueTypeT, StorageInterfaceT >::negate | ( | void | ) | [inline, inherited] |
Definition at line 858 of file OSGVector.inl.
Referenced by osg::DVRClipGeometry::buildTriangledGeometry(), and osg::ExtrusionSurface::calcZAxes().
00859 { 00860 for(UInt32 i = 0; i < Self::_iSize; i++) 00861 { 00862 Self::_values[i] = -Self::_values[i]; 00863 } 00864 }
| bool osg::PointInterface< ValueTypeT, StorageInterfaceT >::equals | ( | const PointInterface< ValueTypeT, StorageInterfaceT > & | vec, | |
| const ValueTypeT | tolerance | |||
| ) | const [inline, inherited] |
Definition at line 870 of file OSGVector.inl.
Referenced by osg::VectorInterface< ValueTypeT, StorageInterfaceT >::operator==(), osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator==(), and osg::LightChunk::operator==().
00873 { 00874 bool returnValue = true; 00875 00876 for(UInt32 i = 0; i < Self::_iSize; i++) 00877 { 00878 returnValue &= 00879 ( (Self::_values[i] - vec ._values[i] <= tolerance) && 00880 (vec ._values[i] - Self::_values[i] <= tolerance)); 00881 } 00882 00883 return returnValue; 00884 }
| PointInterface< ValueTypeT, StorageInterfaceT >::RealReturnType osg::PointInterface< ValueTypeT, StorageInterfaceT >::dist | ( | const PointInterface< ValueTypeT, StorageInterfaceT > & | vec | ) | const [inline, inherited] |
Definition at line 917 of file OSGVector.inl.
References osg::PointInterface< ValueTypeT, StorageInterfaceT >::dist2(), and osg::osgsqrt().
Referenced by osg::Surface::getDesiredError().
| PointInterface< ValueTypeT, StorageInterfaceT >::RealReturnType osg::PointInterface< ValueTypeT, StorageInterfaceT >::dist2 | ( | const PointInterface< ValueTypeT, StorageInterfaceT > & | vec | ) | const [inline, inherited] |
Definition at line 929 of file OSGVector.inl.
Referenced by osg::Particles::calcIndex(), and osg::PointInterface< ValueTypeT, StorageInterfaceT >::dist().
00931 { 00932 RealReturnType returnValue = 0; 00933 RealReturnType tmp; 00934 00935 for(UInt32 i = 0; i < Self::_iSize; i++) 00936 { 00937 tmp = Self::_values[i] - vec._values[i]; 00938 00939 returnValue += tmp * tmp; 00940 } 00941 00942 return returnValue; 00943 }
| PointInterface< ValueTypeT, StorageInterfaceT >::RealReturnType osg::PointInterface< ValueTypeT, StorageInterfaceT >::maxValue | ( | void | ) | const [inline, inherited] |
Definition at line 951 of file OSGVector.inl.
Referenced by osg::Billboard::adjustVolume().
00953 { 00954 RealReturnType returnValue = TypeTraits<RealReturnType>::getMin(); 00955 00956 for(UInt32 i = 0; i < Self::_iSize; i++) 00957 { 00958 if(Self::_values[i] > returnValue) 00959 returnValue = Self::_values[i]; 00960 } 00961 00962 return returnValue; 00963 }
| void osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator*= | ( | const ValueTypeT | val | ) | [inline, inherited] |
Definition at line 973 of file OSGVector.inl.
00974 { 00975 for(UInt32 i = 0; i < Self::_iSize; i++) 00976 { 00977 Self::_values[i] *= val; 00978 } 00979 }
| void osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator/= | ( | const ValueTypeT | val | ) | [inline, inherited] |
Definition at line 986 of file OSGVector.inl.
00987 { 00988 for(UInt32 i = 0; i < Self::_iSize; i++) 00989 { 00990 Self::_values[i] /= val; 00991 } 00992 }
| PointInterface< ValueTypeT, StorageInterfaceT >::VecInterface osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator- | ( | const PointInterface< ValueTypeT, StorageInterfaceT > & | vec | ) | const [inline, inherited] |
Definition at line 1000 of file OSGVector.inl.
01002 { 01003 VecInterface returnValue(*this); 01004 01005 for(UInt32 i = 0; i < Self::_iSize; i++) 01006 { 01007 returnValue[i] -= vec[i]; 01008 } 01009 01010 return returnValue; 01011 }
| PointInterface< ValueTypeT, StorageInterfaceT > osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator- | ( | const VecInterface & | vec | ) | const [inline, inherited] |
Definition at line 1036 of file OSGVector.inl.
01038 { 01039 PointInterface<ValueTypeT, StorageInterfaceT> returnValue; 01040 01041 for(UInt32 i = 0; i < StorageInterfaceT::_iSize; i++) 01042 { 01043 returnValue[i] = Self::_values[i] - vec[i]; 01044 } 01045 01046 return returnValue; 01047 }
| PointInterface< ValueTypeT, StorageInterfaceT > osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator- | ( | void | ) | [inline, inherited] |
Definition at line 1094 of file OSGVector.inl.
01095 { 01096 PointInterface<ValueTypeT, StorageInterfaceT> returnValue; 01097 01098 for(UInt32 i = 0; i < Self::_iSize; i++) 01099 { 01100 returnValue._values[i] = - Self::_values[i]; 01101 } 01102 01103 return returnValue; 01104 }
| PointInterface< ValueTypeT, StorageInterfaceT > osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator+ | ( | const VecInterface & | vec | ) | const [inline, inherited] |
Definition at line 1018 of file OSGVector.inl.
01020 { 01021 PointInterface<ValueTypeT, StorageInterfaceT> returnValue; 01022 01023 for(UInt32 i = 0; i < StorageInterfaceT::_iSize; i++) 01024 { 01025 returnValue[i] = Self::_values[i] + vec[i]; 01026 } 01027 01028 return returnValue; 01029 }
| void osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator+= | ( | const VecInterface & | vec | ) | [inline, inherited] |
Definition at line 1110 of file OSGVector.inl.
01112 { 01113 for(UInt32 i = 0; i < Self::_iSize; i++) 01114 { 01115 Self::_values[i] += vec._values[i]; 01116 } 01117 }
| void osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator-= | ( | const VecInterface & | vec | ) | [inline, inherited] |
Definition at line 1123 of file OSGVector.inl.
01125 { 01126 for(UInt32 i = 0; i < Self::_iSize; i++) 01127 { 01128 Self::_values[i] -= vec._values[i]; 01129 } 01130 }
| ValueTypeT & osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator[] | ( | const UInt32 | uiVal | ) | [inline, inherited] |
| const ValueTypeT & osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator[] | ( | const UInt32 | uiVal | ) | const [inline, inherited] |
| bool osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator< | ( | const PointInterface< ValueTypeT, StorageInterfaceT > & | other | ) | const [inline, inherited] |
Definition at line 1207 of file OSGVector.inl.
01209 { 01210 bool ret = false; 01211 01212 for(UInt32 i = 0; i < Self::_iSize; i++) 01213 { 01214 if(Self::_values[i] > other._values[i]) 01215 { 01216 break; 01217 } 01218 if(Self::_values[i] < other._values[i]) 01219 { 01220 ret = true; 01221 break; 01222 } 01223 } 01224 01225 return ret; 01226 }
| bool osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator== | ( | const PointInterface< ValueTypeT, StorageInterfaceT > & | other | ) | const [inline, inherited] |
Definition at line 1232 of file OSGVector.inl.
References osg::Eps, and osg::PointInterface< ValueTypeT, StorageInterfaceT >::equals().
01234 { 01235 // CHECK 01236 return Self::equals(other, ValueTypeT(Eps)); 01237 }
| bool osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator!= | ( | const PointInterface< ValueTypeT, StorageInterfaceT > & | other | ) | const [inline, inherited] |
const VectorInterface< ValueTypeT, StorageInterfaceT > osg::VectorInterface< ValueTypeT, StorageInterfaceT >::Null [inline, static] |
Reimplemented from osg::PointInterface< ValueTypeT, StorageInterfaceT >.
Definition at line 517 of file OSGVector.h.
Referenced by osg::Billboard::calcMatrix(), osg::IntersectAction::getHitNormal(), osg::TriangleIterator::getNormal(), osg::PrimitiveIterator::getNormal(), osg::LineIterator::getNormal(), osg::FaceIterator::getNormal(), osg::TriangleIterator::getTexCoords(), osg::PrimitiveIterator::getTexCoords(), osg::LineIterator::getTexCoords(), osg::FaceIterator::getTexCoords(), osg::TriangleIterator::getTexCoords1(), osg::PrimitiveIterator::getTexCoords1(), osg::LineIterator::getTexCoords1(), osg::FaceIterator::getTexCoords1(), osg::TriangleIterator::getTexCoords2(), osg::PrimitiveIterator::getTexCoords2(), osg::LineIterator::getTexCoords2(), osg::FaceIterator::getTexCoords2(), osg::TriangleIterator::getTexCoords3(), osg::PrimitiveIterator::getTexCoords3(), osg::LineIterator::getTexCoords3(), osg::FaceIterator::getTexCoords3(), osg::TriangleIterator::getTexCoords4(), osg::PrimitiveIterator::getTexCoords4(), osg::LineIterator::getTexCoords4(), osg::FaceIterator::getTexCoords4(), osg::TriangleIterator::getTexCoords5(), osg::PrimitiveIterator::getTexCoords5(), osg::LineIterator::getTexCoords5(), osg::FaceIterator::getTexCoords5(), osg::TriangleIterator::getTexCoords6(), osg::PrimitiveIterator::getTexCoords6(), osg::LineIterator::getTexCoords6(), osg::FaceIterator::getTexCoords6(), osg::TriangleIterator::getTexCoords7(), osg::PrimitiveIterator::getTexCoords7(), osg::LineIterator::getTexCoords7(), and osg::FaceIterator::getTexCoords7().
1.5.5