osg::Pnt3f Class Reference

Inheritance diagram for osg::Pnt3f:

osg::PointInterface< ValueTypeT, StorageInterfaceT >

List of all members.

Public Types

typedef 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 VectorInterface
< ValueTypeT,
StorageInterfaceT > 
VecInterface
typedef PointInterface
< ValueTypeT,
StorageInterfaceT > 
Self
 Own type.

Public Member Functions

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.
VecInterfacesubZero (void)
 Returns the corrosponding vector by subtracting zero.
const VecInterfacesubZero (void) const
 Returns the corrosponding vector by subtracting zero.
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.
PointInterface operator* (const ValueTypeT rVal) const
 Component wise binary scalar multiplication.
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 PointInterface Null


Detailed Description

This is a documentation wrapper. Its only purpose is to fool doxygen into thinking of a typedef as a class and to allow you to find all the needed info from this page.

Warning:
The real inheritance is not what you see here.

This is just to give you an idea of the conceptual relations and to help you understand the available methods of this class.

Definition at line 7334 of file dummyClasses.dox.


Member Typedef Documentation

template<class ValueTypeT, class StorageInterfaceT>
osg::PointInterface< ValueTypeT, StorageInterfaceT >::Inherited [inherited]

Reimplemented in osg::VectorInterface< ValueTypeT, StorageInterfaceT >, osg::VectorInterface< long double, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< long double, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< uint16_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< uint16_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage4< float > >, osg::VectorInterface< uint16_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage3< float > >, osg::VectorInterface< uint8_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage2< float > >, osg::VectorInterface< uint8_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage4< double > >, osg::VectorInterface< uint8_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< ValueTypeT, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage4< ValueTypeT > >, and osg::VectorInterface< long double, osg::VecStorage2< ValueTypeT > >.

Definition at line 292 of file OSGVector.h.

template<class ValueTypeT, class StorageInterfaceT>
osg::PointInterface< ValueTypeT, StorageInterfaceT >::RealReturnType [inherited]

Reimplemented in osg::VectorInterface< ValueTypeT, StorageInterfaceT >, osg::VectorInterface< long double, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< long double, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< uint16_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< uint16_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage4< float > >, osg::VectorInterface< uint16_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage3< float > >, osg::VectorInterface< uint8_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage2< float > >, osg::VectorInterface< uint8_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage4< double > >, osg::VectorInterface< uint8_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< ValueTypeT, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage4< ValueTypeT > >, and osg::VectorInterface< long double, osg::VecStorage2< ValueTypeT > >.

Definition at line 294 of file OSGVector.h.

template<class ValueTypeT, class StorageInterfaceT>
osg::PointInterface< ValueTypeT, StorageInterfaceT >::ValueType [inherited]

Reimplemented in osg::VectorInterface< ValueTypeT, StorageInterfaceT >, osg::VectorInterface< long double, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< long double, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< uint16_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< uint16_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage4< float > >, osg::VectorInterface< uint16_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage3< float > >, osg::VectorInterface< uint8_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage2< float > >, osg::VectorInterface< uint8_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage4< double > >, osg::VectorInterface< uint8_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< ValueTypeT, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage4< ValueTypeT > >, and osg::VectorInterface< long double, osg::VecStorage2< ValueTypeT > >.

Definition at line 296 of file OSGVector.h.

template<class ValueTypeT, class StorageInterfaceT>
typedef VectorInterface<ValueTypeT, StorageInterfaceT> osg::PointInterface< ValueTypeT, StorageInterfaceT >::VecInterface [inherited]

Definition at line 299 of file OSGVector.h.

template<class ValueTypeT, class StorageInterfaceT>
osg::PointInterface< ValueTypeT, StorageInterfaceT >::Self [inherited]

Reimplemented in osg::VectorInterface< ValueTypeT, StorageInterfaceT >, osg::VectorInterface< long double, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< long double, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< uint16_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< uint16_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage4< float > >, osg::VectorInterface< uint16_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage3< float > >, osg::VectorInterface< uint8_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage2< float > >, osg::VectorInterface< uint8_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage4< double > >, osg::VectorInterface< uint8_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< ValueTypeT, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage4< ValueTypeT > >, and osg::VectorInterface< long double, osg::VecStorage2< ValueTypeT > >.

Definition at line 303 of file OSGVector.h.


Member Function Documentation

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
void osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValue ( const PointInterface< ValueTypeT, StorageInterfaceT > &  vec  )  [inline, inherited]

template<class ValueTypeT, class StorageInterfaceT>
template<class ValueType2T, class StorageInterface2T>
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 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
void osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValueFromCString ( const Char8 szString  )  [inline, inherited]

Definition at line 718 of file OSGVector.inl.

Referenced by 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 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
ValueTypeT * osg::PointInterface< ValueTypeT, StorageInterfaceT >::getValues ( void   )  [inline, inherited]

template<class ValueTypeT, class StorageInterfaceT>
const ValueTypeT * osg::PointInterface< ValueTypeT, StorageInterfaceT >::getValues ( void   )  const [inline, inherited]

Definition at line 828 of file OSGVector.inl.

00829 {
00830     return Self::_values;
00831 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
PointInterface< ValueTypeT, StorageInterfaceT >::VecInterface & osg::PointInterface< ValueTypeT, StorageInterfaceT >::subZero ( void   )  [inline, inherited]

Reimplemented in osg::VectorInterface< ValueTypeT, StorageInterfaceT >, osg::VectorInterface< long double, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< long double, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< uint16_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< uint16_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage4< float > >, osg::VectorInterface< uint16_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage3< float > >, osg::VectorInterface< uint8_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage2< float > >, osg::VectorInterface< uint8_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage4< double > >, osg::VectorInterface< uint8_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< ValueTypeT, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage4< ValueTypeT > >, and osg::VectorInterface< long double, osg::VecStorage2< ValueTypeT > >.

Definition at line 893 of file OSGVector.inl.

Referenced by osg::DVRVolume::draw(), osg::FrustumVolume::getCenter(), osg::FrustumVolume::getScalarVolume(), and osg::DVRClipGeometry::interpolate().

00894 {
00895     return *(static_cast<VecInterface *>(this));
00896 }

template<class ValueTypeT, class StorageInterfaceT>
const PointInterface< ValueTypeT, StorageInterfaceT >::VecInterface & osg::PointInterface< ValueTypeT, StorageInterfaceT >::subZero ( void   )  const [inline, inherited]

Reimplemented in osg::VectorInterface< ValueTypeT, StorageInterfaceT >, osg::VectorInterface< long double, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< long double, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< uint16_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< uint16_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage4< float > >, osg::VectorInterface< uint16_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage3< float > >, osg::VectorInterface< uint8_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage2< float > >, osg::VectorInterface< uint8_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage4< double > >, osg::VectorInterface< uint8_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< ValueTypeT, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage4< ValueTypeT > >, and osg::VectorInterface< long double, osg::VecStorage2< ValueTypeT > >.

Definition at line 905 of file OSGVector.inl.

00906 {
00907     return *(static_cast<const VecInterface *>(this));
00908 }

template<class ValueTypeT, class StorageInterfaceT>
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().

00919 {
00920     return osgsqrt(dist2(vec));
00921 }

template<class ValueTypeT, class StorageInterfaceT>
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::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 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
PointInterface< ValueTypeT, StorageInterfaceT > osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator* ( const ValueTypeT  rVal  )  const [inline, inherited]

Reimplemented in osg::VectorInterface< ValueTypeT, StorageInterfaceT >, osg::VectorInterface< long double, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< long double, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< uint16_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< uint16_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage4< float > >, osg::VectorInterface< uint16_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage3< float > >, osg::VectorInterface< uint8_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage2< float > >, osg::VectorInterface< uint8_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage4< double > >, osg::VectorInterface< uint8_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< ValueTypeT, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage4< ValueTypeT > >, and osg::VectorInterface< long double, osg::VecStorage2< ValueTypeT > >.

Definition at line 1054 of file OSGVector.inl.

01056 {
01057     PointInterface<ValueTypeT, StorageInterfaceT> returnValue;
01058 
01059     for(UInt32 i = 0; i < StorageInterfaceT::_iSize; i++)
01060     {
01061         returnValue[i] = Self::_values[i] * rVal;
01062     }
01063 
01064     return returnValue;
01065 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
ValueTypeT & osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator[] ( const UInt32  uiVal  )  [inline, inherited]

Definition at line 1138 of file OSGVector.inl.

01139 {
01140     return Self::_values[uiVal];
01141 }

template<class ValueTypeT, class StorageInterfaceT>
const ValueTypeT & osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator[] ( const UInt32  uiVal  )  const [inline, inherited]

Definition at line 1147 of file OSGVector.inl.

01148 {
01149     return Self::_values[uiVal];
01150 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
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 }

template<class ValueTypeT, class StorageInterfaceT>
bool osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator!= ( const PointInterface< ValueTypeT, StorageInterfaceT > &  other  )  const [inline, inherited]

Definition at line 1243 of file OSGVector.inl.

01245 {
01246     return ! (*this == other);
01247 }


Member Data Documentation

template<class ValueTypeT, class StorageInterfaceT>
const PointInterface< ValueTypeT, StorageInterfaceT > osg::PointInterface< ValueTypeT, StorageInterfaceT >::Null [inline, static, inherited]

Reimplemented in osg::VectorInterface< ValueTypeT, StorageInterfaceT >, osg::VectorInterface< long double, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< long double, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< uint16_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< uint16_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage4< float > >, osg::VectorInterface< uint16_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage3< float > >, osg::VectorInterface< uint8_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage2< float > >, osg::VectorInterface< uint8_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage4< double > >, osg::VectorInterface< uint8_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< ValueTypeT, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage4< ValueTypeT > >, osg::VectorInterface< float, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage3< ValueTypeT > >, osg::VectorInterface< int16_t, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< double, osg::VecStorage2< ValueTypeT > >, osg::VectorInterface< int8_t, osg::VecStorage4< ValueTypeT > >, and osg::VectorInterface< long double, osg::VecStorage2< ValueTypeT > >.

Definition at line 305 of file OSGVector.h.

Referenced by osg::IntersectAction::getHitPoint(), and osg::FaceIterator::getPosition().


The documentation for this class was generated from the following file:

Generated on Mon Mar 17 11:53:44 2008 for OpenSG by  doxygen 1.5.5