#include <OSGVector.h>

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 | |
Constructors | |
| PointInterface (void) | |
| PointInterface (const ValueTypeT *pVals) | |
| Constructor which takes a const value array. | |
| PointInterface (ValueTypeT *pVals) | |
| Constructor which takes a value array. | |
| template<class ValueType2T, class StorageInterface2T> | |
| PointInterface (const PointInterface< ValueType2T, StorageInterface2T > &vec) | |
| template<class ValueType2T, class StorageInterface2T> | |
| PointInterface (const VectorInterface< ValueType2T, StorageInterface2T > &vec) | |
| PointInterface (const PointInterface &source) | |
| PointInterface (const ValueTypeT rVal1) | |
| PointInterface (const ValueTypeT rVal1, const ValueTypeT rVal2) | |
| Constructor which takes two values, remaining entries will be zero. | |
| PointInterface (const ValueTypeT rVal1, const ValueTypeT rVal2, const ValueTypeT rVal3) | |
| Constructor which takes three values, remaining entries will be zero. | |
| PointInterface (const ValueTypeT rVal1, const ValueTypeT rVal2, const ValueTypeT rVal3, const ValueTypeT rVal4) | |
| Constructor which takes four values, remaining entries will be zero. | |
Destructor | |
| ~PointInterface (void) | |
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 | 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). | |
| void | setValue (const Char8 *szString) |
| void | setValue (Char8 *szString) |
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. | |
| VecInterface & | subZero (void) |
| Returns the corrosponding vector by subtracting zero. | |
| const VecInterface & | subZero (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- (const VecInterface &vec) const |
| Component wise binary vector addition operator. | |
| PointInterface | operator* (const ValueTypeT rVal) const |
| Component wise binary scalar multiplication. | |
| PointInterface | operator- (void) |
| Nondestructive unary negation, returns new point. | |
| 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 |
Assignment | |
| PointInterface & | operator= (const PointInterface &source) |
| PointInterface & | operator= (const VecInterface &source) |
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 |
Definition at line 286 of file OSGVector.h.
| osg::PointInterface< ValueTypeT, StorageInterfaceT >::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.
| osg::PointInterface< ValueTypeT, StorageInterfaceT >::RealReturnType |
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.
| osg::PointInterface< ValueTypeT, StorageInterfaceT >::ValueType |
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.
| typedef VectorInterface<ValueTypeT, StorageInterfaceT> osg::PointInterface< ValueTypeT, StorageInterfaceT >::VecInterface |
Definition at line 299 of file OSGVector.h.
| osg::PointInterface< ValueTypeT, StorageInterfaceT >::Self |
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.
| osg::PointInterface< ValueTypeT, StorageInterfaceT >::PointInterface | ( | void | ) | [inline] |
| osg::PointInterface< ValueTypeT, StorageInterfaceT >::PointInterface | ( | const ValueTypeT * | pVals | ) | [inline] |
Be shure the array size at least as large as the vector size.
Definition at line 383 of file OSGVector.inl.
00383 : 00384 Inherited() 00385 { 00386 if(pVals == NULL) 00387 { 00388 for(UInt32 i = 0; i < Self::_iSize; i++) 00389 { 00390 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 00391 } 00392 } 00393 else 00394 { 00395 for(UInt32 i = 0; i < Self::_iSize; i++) 00396 { 00397 Self::_values[i] = pVals[i]; 00398 } 00399 } 00400 }
| osg::PointInterface< ValueTypeT, StorageInterfaceT >::PointInterface | ( | ValueTypeT * | pVals | ) | [inline] |
Be shure the array size at least as large as the vector size.
Definition at line 410 of file OSGVector.inl.
00410 : 00411 Inherited() 00412 { 00413 if(pVals == NULL) 00414 { 00415 for(UInt32 i = 0; i < Self::_iSize; i++) 00416 { 00417 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 00418 } 00419 } 00420 else 00421 { 00422 for(UInt32 i = 0; i < Self::_iSize; i++) 00423 { 00424 Self::_values[i] = pVals[i]; 00425 } 00426 } 00427 }
| osg::PointInterface< ValueTypeT, StorageInterfaceT >::PointInterface | ( | const PointInterface< ValueType2T, StorageInterface2T > & | vec | ) | [inline] |
Definition at line 319 of file OSGVector.inl.
References osg::PointInterface< ValueTypeT, StorageInterfaceT >::getValues().
00320 { 00321 typedef PointInterface<ValueType2T, StorageInterface2T> VectorT; 00322 00323 if(Self::_iSize <= VectorT::_iSize) 00324 { 00325 for(UInt32 i = 0; i < Self::_iSize; i++) 00326 { 00327 Self::_values[i] = vec.getValues()[i]; 00328 } 00329 } 00330 else 00331 { 00332 UInt32 i; 00333 for(i = 0; i < VectorT::_iSize; i++) 00334 { 00335 Self::_values[i] = vec.getValues()[i]; 00336 } 00337 for(i = VectorT::_iSize; i < Self::_iSize; i++) 00338 { 00339 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 00340 } 00341 } 00342 }
| osg::PointInterface< ValueTypeT, StorageInterfaceT >::PointInterface | ( | const VectorInterface< ValueType2T, StorageInterface2T > & | vec | ) | [inline] |
Definition at line 349 of file OSGVector.inl.
References osg::PointInterface< ValueTypeT, StorageInterfaceT >::getValues().
00350 { 00351 typedef VectorInterface<ValueType2T, StorageInterface2T> VectorT; 00352 00353 if(Self::_iSize <= VectorT::_iSize) 00354 { 00355 for(UInt32 i = 0; i < Self::_iSize; i++) 00356 { 00357 Self::_values[i] = vec.getValues()[i]; 00358 } 00359 } 00360 else 00361 { 00362 UInt32 i; 00363 for(i = 0; i < VectorT::_iSize; i++) 00364 { 00365 Self::_values[i] = vec.getValues()[i]; 00366 } 00367 for(i = VectorT::_iSize; i < Self::_iSize; i++) 00368 { 00369 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 00370 } 00371 } 00372 }
| osg::PointInterface< ValueTypeT, StorageInterfaceT >::PointInterface | ( | const PointInterface< ValueTypeT, StorageInterfaceT > & | source | ) | [inline] |
Definition at line 431 of file OSGVector.inl.
00432 : 00433 00434 Inherited() 00435 { 00436 for(UInt32 i = 0; i < Self::_iSize; i++) 00437 { 00438 Self::_values[i] = source._values[i]; 00439 } 00440 }
| osg::PointInterface< ValueTypeT, StorageInterfaceT >::PointInterface | ( | const ValueTypeT | rVal1 | ) | [inline] |
Definition at line 444 of file OSGVector.inl.
00446 { 00447 UInt32 i; 00448 00449 Self::_values[0] = rVal1; 00450 00451 for(i = 1; i < Self::_iSize; i++) 00452 { 00453 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 00454 } 00455 }
| osg::PointInterface< ValueTypeT, StorageInterfaceT >::PointInterface | ( | const ValueTypeT | rVal1, | |
| const ValueTypeT | rVal2 | |||
| ) | [inline] |
Definition at line 466 of file OSGVector.inl.
00467 : 00468 Inherited() 00469 { 00470 Self::_values[0] = rVal1; 00471 00472 if(Self::_iSize == 2) 00473 { 00474 Self::_values[1] = rVal2; 00475 } 00476 else if(Self::_iSize >= 3) 00477 { 00478 Self::_values[1] = rVal2; 00479 00480 for(UInt32 i = 2; i < Self::_iSize; i++) 00481 { 00482 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 00483 } 00484 } 00485 }
| osg::PointInterface< ValueTypeT, StorageInterfaceT >::PointInterface | ( | const ValueTypeT | rVal1, | |
| const ValueTypeT | rVal2, | |||
| const ValueTypeT | rVal3 | |||
| ) | [inline] |
Definition at line 498 of file OSGVector.inl.
00500 : 00501 Inherited() 00502 { 00503 Self::_values[0] = rVal1; 00504 00505 if(Self::_iSize == 2) 00506 { 00507 Self::_values[1] = rVal2; 00508 } 00509 else if(Self::_iSize == 3) 00510 { 00511 Self::_values[1] = rVal2; 00512 Self::_values[2] = rVal3; 00513 } 00514 else if(Self::_iSize >= 4) 00515 { 00516 Self::_values[1] = rVal2; 00517 Self::_values[2] = rVal3; 00518 00519 for(UInt32 i = 3; i < Self::_iSize; i++) 00520 { 00521 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 00522 } 00523 } 00524 }
| osg::PointInterface< ValueTypeT, StorageInterfaceT >::PointInterface | ( | const ValueTypeT | rVal1, | |
| const ValueTypeT | rVal2, | |||
| const ValueTypeT | rVal3, | |||
| const ValueTypeT | rVal4 | |||
| ) | [inline] |
Definition at line 537 of file OSGVector.inl.
00540 : 00541 Inherited() 00542 { 00543 Self::_values[0] = rVal1; 00544 00545 if(Self::_iSize == 2) 00546 { 00547 Self::_values[1] = rVal2; 00548 } 00549 else if(Self::_iSize == 3) 00550 { 00551 Self::_values[1] = rVal2; 00552 Self::_values[2] = rVal3; 00553 } 00554 else if(Self::_iSize == 4) 00555 { 00556 Self::_values[1] = rVal2; 00557 Self::_values[2] = rVal3; 00558 Self::_values[3] = rVal4; 00559 } 00560 else if(Self::_iSize >= 5) 00561 { 00562 Self::_values[1] = rVal2; 00563 Self::_values[2] = rVal3; 00564 Self::_values[3] = rVal4; 00565 00566 for(UInt32 i = 4; i < Self::_iSize; i++) 00567 { 00568 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 00569 } 00570 } 00571 }
| osg::PointInterface< ValueTypeT, StorageInterfaceT >::~PointInterface | ( | void | ) | [inline] |
| void osg::PointInterface< ValueTypeT, StorageInterfaceT >::setNull | ( | void | ) | [inline] |
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] |
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] |
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] |
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] |
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 >::setValueFromCString | ( | const Char8 * | szString | ) | [inline] |
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 }
| void osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValueFromCString | ( | Char8 * | szString | ) | [inline] |
Definition at line 786 of file OSGVector.inl.
References osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValueFromCString().
00787 { 00788 setValueFromCString(static_cast<const Char8 *>(szString)); 00789 }
| void osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValue | ( | const Char8 * | szString | ) | [inline] |
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] |
Definition at line 804 of file OSGVector.inl.
References osg::PointInterface< ValueTypeT, StorageInterfaceT >::setValueFromCString().
00805 { 00806 setValueFromCString(szString); 00807 }
| ValueTypeT * osg::PointInterface< ValueTypeT, StorageInterfaceT >::getValues | ( | void | ) | [inline] |
Definition at line 818 of file OSGVector.inl.
Referenced by changeGenFunc(), osg::DVRClipper::clipSlice(), osg::SkyBackground::drawFace(), osg::Slices::drawSlices(), osg::Window::frameInit(), osg::TransformationMatrix< ValueTypeT >::getValues(), osg::ProgramChunk::handleGL(), osg::PointInterface< ValueTypeT, StorageInterfaceT >::PointInterface(), osg::Brick::render3DSlices(), setGenFunc(), and osg::SHLChunk::updateCameraPosition().
| const ValueTypeT * osg::PointInterface< ValueTypeT, StorageInterfaceT >::getValues | ( | void | ) | const [inline] |
| bool osg::PointInterface< ValueTypeT, StorageInterfaceT >::isZero | ( | void | ) | const [inline] |
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] |
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] |
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 >::VecInterface & osg::PointInterface< ValueTypeT, StorageInterfaceT >::subZero | ( | void | ) | [inline] |
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 }
| const PointInterface< ValueTypeT, StorageInterfaceT >::VecInterface & osg::PointInterface< ValueTypeT, StorageInterfaceT >::subZero | ( | void | ) | const [inline] |
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 }
| PointInterface< ValueTypeT, StorageInterfaceT >::RealReturnType osg::PointInterface< ValueTypeT, StorageInterfaceT >::dist | ( | const PointInterface< ValueTypeT, StorageInterfaceT > & | vec | ) | const [inline] |
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] |
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 }
| PointInterface< ValueTypeT, StorageInterfaceT >::RealReturnType osg::PointInterface< ValueTypeT, StorageInterfaceT >::maxValue | ( | void | ) | const [inline] |
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] |
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] |
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] |
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] |
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 }
| PointInterface< ValueTypeT, StorageInterfaceT > osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator- | ( | const VecInterface & | vec | ) | const [inline] |
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* | ( | const ValueTypeT | rVal | ) | const [inline] |
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 }
| PointInterface< ValueTypeT, StorageInterfaceT > osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator- | ( | void | ) | [inline] |
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 }
| void osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator+= | ( | const VecInterface & | vec | ) | [inline] |
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] |
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] |
| const ValueTypeT & osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator[] | ( | const UInt32 | uiVal | ) | const [inline] |
| PointInterface< ValueTypeT, StorageInterfaceT > & osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator= | ( | const PointInterface< ValueTypeT, StorageInterfaceT > & | source | ) | [inline] |
Definition at line 1176 of file OSGVector.inl.
01178 { 01179 if(this == &source) 01180 return *this; 01181 01182 for(UInt32 i = 0; i < Self::_iSize; i++) 01183 { 01184 Self::_values[i] = source._values[i]; 01185 } 01186 01187 return *this; 01188 }
| PointInterface< ValueTypeT, StorageInterfaceT > & osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator= | ( | const VecInterface & | source | ) | [inline] |
Definition at line 1194 of file OSGVector.inl.
01195 { 01196 static PointInterface<ValueTypeT, StorageInterfaceT> dummy; 01197 PointInterface<ValueTypeT, 01198 StorageInterfaceT>::error_cannot_assign_vector; 01199 return dummy; 01200 }
| bool osg::PointInterface< ValueTypeT, StorageInterfaceT >::operator< | ( | const PointInterface< ValueTypeT, StorageInterfaceT > & | other | ) | const [inline] |
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] |
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] |
const PointInterface< ValueTypeT, StorageInterfaceT > osg::PointInterface< ValueTypeT, StorageInterfaceT >::Null [inline, static] |
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().
1.5.5