OSG::Point< ValueTypeT, SizeI > Class Template Reference
[Base, Objects, libOSGBase]
#include <OSGVector.h>
Public Types | |
| typedef SelectVecStorage < ValueTypeT, SizeI > | Inherited |
| Parent type, one of the VecStorage{1,2,3,4} types. | |
| typedef Point< ValueTypeT, SizeI > | Self |
| typedef SelectVecStorage < ValueTypeT, SizeI > | StorageInterface |
| typedef ValueTypeT | ValueType |
| Value type. | |
| typedef TypeTraits< ValueTypeT > ::RealReturnType | RealReturnType |
| Used type if the returnvalue must be a real value. | |
| typedef Point< ValueTypeT, SizeI > | PointType |
| Own type. | |
| typedef Vector< ValueTypeT, SizeI > | VectorType |
| Type of the corresponding vector of the same size and value type. | |
Public Member Functions | |
Constructors | |
| Point (void) | |
| Point (const ValueType *pVals) | |
| Constructor which takes a const value array. | |
| Point (ValueType *pVals) | |
| Constructor which takes a value array. | |
| template<class ValueType2T , UInt32 Size2I> | |
| Point (const Point< ValueType2T, Size2I > &pnt) | |
| template<class ValueType2T , UInt32 Size2I> | |
| Point (const Vector< ValueType2T, Size2I > &vec) | |
| Point (const Point &source) | |
| Point (const ValueType rVal1) | |
| Point (const ValueType rVal1, const ValueType rVal2) | |
| Constructor which takes two values, remaining entries will be zero. | |
| Point (const ValueType rVal1, const ValueType rVal2, const ValueType rVal3) | |
| Constructor which takes three values, remaining entries will be zero. | |
| Point (const ValueType rVal1, const ValueType rVal2, const ValueType rVal3, const ValueType rVal4) | |
| Constructor which takes four values, remaining entries will be zero. | |
Destructor | |
| ~Point (void) | |
Set Values | |
| void | setNull (void) |
| template<class ValueType2T , UInt32 Size2I> | |
| void | setValue (const Point< ValueType2T, Size2I > &pnt) |
| void | setValue (const Point &pnt) |
| void | setValue (const ValueType *pVals) |
| void | setValue (ValueType *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 | |
| ValueType * | getValues (void) |
| Get a pointer to the value storage. | |
| const ValueType * | 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 Point &pnt, const ValueType tolerance) const |
| Returns true iff the two points are eual within a given tolerance. | |
| VectorType & | subZero (void) |
| Returns the corrosponding vector by subtracting zero. | |
| const VectorType & | subZero (void) const |
| Returns the corrosponding vector by subtracting zero. | |
| RealReturnType | dist (const Point &pnt) const |
| Returns the distance between the two points. | |
| RealReturnType | dist2 (const Point &pnt) const |
| Returns the distance between the two points, squared. | |
| RealReturnType | maxValue (void) const |
| Returns the maximum value of the vector. | |
Math | |
| void | operator*= (const ValueType val) |
| Component wise scalar multiplication. | |
| void | operator/= (const ValueType val) |
| Component wise scalar division. | |
| VectorType | operator- (const Point &pnt) const |
| Point substraction, returns a new vector. | |
| Point | operator+ (const VectorType &vec) const |
| Component wise binary vector addition operator. | |
| Point | operator- (const VectorType &vec) const |
| Component wise binary vector addition operator. | |
| Point | operator* (const ValueType val) const |
| Component wise binary scalar multiplication. | |
| Point | operator- (void) |
| Nondestructive unary negation, returns new point. | |
| void | operator+= (const VectorType &vec) |
| Component wise vector addition. | |
| void | operator-= (const VectorType &vec) |
| Component wise vector substraction. | |
Element Access | |
| ValueType & | operator[] (const UInt32 uiVal) |
| const ValueType & | operator[] (const UInt32 uiVal) const |
Assignment | |
| Point & | operator= (const Point &source) |
| Point & | operator= (const VectorType &source) |
Comparison | |
| bool | operator< (const Point &other) const |
| bool | operator== (const Point &other) const |
| Equal operator, using Eps as the tolerance. | |
| bool | operator!= (const Point &other) const |
| Not equal operator, using Eps as the tolerance. | |
Static Public Attributes | |
| static const Point | Null |
Related Functions | |
(Note that these are not member functions.) | |
Point Types | |
| typedef OSG::Point< OSG::UInt8, 1 > | Pnt1ub |
| typedef OSG::Pnt1ub * | Pnt1ubP |
| typedef OSG::Point< OSG::Int8, 1 > | Pnt1b |
| typedef OSG::Pnt1b * | Pnt1bP |
| typedef OSG::Point < OSG::UInt16, 1 > | Pnt1us |
| typedef OSG::Pnt1us * | Pnt1usP |
| typedef OSG::Point< OSG::Int16, 1 > | Pnt1s |
| typedef OSG::Pnt1s * | Pnt1sP |
| typedef OSG::Point < OSG::Real32, 1 > | Pnt1f |
| typedef OSG::Pnt1f * | Pnt1fP |
| typedef OSG::Point< Fixed32, 1 > | Pnt1fx |
| typedef OSG::Pnt1fx * | Pnt1fxP |
| typedef OSG::Point < OSG::Real64, 1 > | Pnt1d |
| typedef OSG::Pnt1d * | Pnt1dP |
| typedef OSG::Point < OSG::Real128, 1 > | Pnt1ld |
| typedef OSG::Pnt1ld * | Pnt1ldP |
| typedef OSG::Point< OSG::UInt8, 2 > | Pnt2ub |
| typedef OSG::Pnt2ub * | Pnt2ubP |
| typedef OSG::Point< OSG::Int8, 2 > | Pnt2b |
| typedef OSG::Pnt2b * | Pnt2bP |
| typedef OSG::Point < OSG::UInt16, 2 > | Pnt2us |
| typedef OSG::Pnt2us * | Pnt2usP |
| typedef OSG::Point< OSG::Int16, 2 > | Pnt2s |
| typedef OSG::Pnt2s * | Pnt2sP |
| typedef OSG::Point< OSG::Int32, 2 > | Pnt2i |
| typedef OSG::Pnt2i * | Pnt2iP |
| typedef OSG::Point < OSG::Real32, 2 > | Pnt2f |
| typedef OSG::Pnt2f * | Pnt2fP |
| typedef OSG::Point< Fixed32, 2 > | Pnt2fx |
| typedef OSG::Pnt2fx * | Pnt2fxP |
| typedef OSG::Point < OSG::Real64, 2 > | Pnt2d |
| typedef OSG::Pnt2d * | Pnt2dP |
| typedef OSG::Point < OSG::Real128, 2 > | Pnt2ld |
| typedef OSG::Pnt2ld * | Pnt2ldP |
| typedef OSG::Point< OSG::UInt8, 3 > | Pnt3ub |
| typedef OSG::Pnt3ub * | Pnt3ubP |
| typedef OSG::Point< OSG::Int8, 3 > | Pnt3b |
| typedef OSG::Pnt3b * | Pnt3bP |
| typedef OSG::Point < OSG::UInt16, 3 > | Pnt3us |
| typedef OSG::Pnt3us * | Pnt3usP |
| typedef OSG::Point< OSG::Int16, 3 > | Pnt3s |
| typedef OSG::Pnt3s * | Pnt3sP |
| typedef OSG::Point < OSG::Real32, 3 > | Pnt3f |
| typedef OSG::Pnt3f * | Pnt3fP |
| typedef OSG::Point< Fixed32, 3 > | Pnt3fx |
| typedef OSG::Pnt3fx * | Pnt3fxP |
| typedef OSG::Point < OSG::Real64, 3 > | Pnt3d |
| typedef OSG::Pnt3d * | Pnt3dP |
| typedef OSG::Point < OSG::Real128, 3 > | Pnt3ld |
| typedef OSG::Pnt3ld * | Pnt3ldP |
| typedef OSG::Point< OSG::UInt8, 4 > | Pnt4ub |
| typedef OSG::Pnt4ub * | Pnt4ubP |
| typedef OSG::Point< OSG::Int8, 4 > | Pnt4b |
| typedef OSG::Pnt4b * | Pnt4bP |
| typedef OSG::Point < OSG::UInt16, 4 > | Pnt4us |
| typedef OSG::Pnt4us * | Pnt4usP |
| typedef OSG::Point< OSG::Int16, 4 > | Pnt4s |
| typedef OSG::Pnt4s * | Pnt4sP |
| typedef OSG::Point < OSG::Real32, 4 > | Pnt4f |
| typedef OSG::Pnt4f * | Pnt4fP |
| typedef OSG::Point< Fixed32, 4 > | Pnt4fx |
| typedef OSG::Pnt4fx * | Pnt4fxP |
| typedef OSG::Point < OSG::Real64, 4 > | Pnt4d |
| typedef OSG::Pnt4d * | Pnt4dP |
| typedef OSG::Point < OSG::Real128, 4 > | Pnt4ld |
| typedef OSG::Pnt4ld * | Pnt4ldP |
Vector/Point Profile Types | |
| typedef OSG::Pnt2f | Pnt2r |
| typedef OSG::Pnt3f | Pnt3r |
| typedef OSG::Pnt4f | Pnt4r |
Detailed Description
template<class ValueTypeT, UInt32 SizeI>
class OSG::Point< ValueTypeT, SizeI >
Point Interface, for details about how vectors, points and matrices are actually build see .
Definition at line 376 of file OSGVector.h.
Member Typedef Documentation
| OSG::Point< ValueTypeT, SizeI >::Inherited |
Reimplemented in OSG::Color3< ValueTypeT >, OSG::Color4< ValueTypeT >, OSG::Vector< ValueTypeT, SizeI >, OSG::Color4< OSG::Real32 >, OSG::Vector< OSG::Real64, 2 >, OSG::Vector< ValueTypeT, 3 >, OSG::Vector< OSG::Real64, 3 >, OSG::Vector< ValueTypeT, 4 >, OSG::Vector< OSG::Real32, 2 >, OSG::Vector< OSG::Int32, 2 >, OSG::Vector< OSG::Real32, 3 >, OSG::Vector< OSG::Real32, 4 >, and OSG::Vector< OSG::UInt32, 2 >.
Definition at line 383 of file OSGVector.h.
| typedef Point<ValueTypeT, SizeI > OSG::Point< ValueTypeT, SizeI >::Self |
Reimplemented in OSG::Vector< ValueTypeT, SizeI >, OSG::Vector< OSG::Real64, 2 >, OSG::Vector< ValueTypeT, 3 >, OSG::Vector< OSG::Real64, 3 >, OSG::Vector< ValueTypeT, 4 >, OSG::Vector< OSG::Real32, 2 >, OSG::Vector< OSG::Int32, 2 >, OSG::Vector< OSG::Real32, 3 >, OSG::Vector< OSG::Real32, 4 >, and OSG::Vector< OSG::UInt32, 2 >.
Definition at line 385 of file OSGVector.h.
| typedef SelectVecStorage<ValueTypeT, SizeI > OSG::Point< ValueTypeT, SizeI >::StorageInterface |
Definition at line 387 of file OSGVector.h.
| OSG::Point< ValueTypeT, SizeI >::ValueType |
Reimplemented in OSG::Color3< ValueTypeT >, OSG::Color4< ValueTypeT >, OSG::Vector< ValueTypeT, SizeI >, OSG::Color4< OSG::Real32 >, OSG::Vector< OSG::Real64, 2 >, OSG::Vector< ValueTypeT, 3 >, OSG::Vector< OSG::Real64, 3 >, OSG::Vector< ValueTypeT, 4 >, OSG::Vector< OSG::Real32, 2 >, OSG::Vector< OSG::Int32, 2 >, OSG::Vector< OSG::Real32, 3 >, OSG::Vector< OSG::Real32, 4 >, and OSG::Vector< OSG::UInt32, 2 >.
Definition at line 389 of file OSGVector.h.
| OSG::Point< ValueTypeT, SizeI >::RealReturnType |
Reimplemented in OSG::Vector< ValueTypeT, SizeI >, OSG::Vector< OSG::Real64, 2 >, OSG::Vector< ValueTypeT, 3 >, OSG::Vector< OSG::Real64, 3 >, OSG::Vector< ValueTypeT, 4 >, OSG::Vector< OSG::Real32, 2 >, OSG::Vector< OSG::Int32, 2 >, OSG::Vector< OSG::Real32, 3 >, OSG::Vector< OSG::Real32, 4 >, and OSG::Vector< OSG::UInt32, 2 >.
Definition at line 390 of file OSGVector.h.
| OSG::Point< ValueTypeT, SizeI >::PointType |
Reimplemented in OSG::Vector< ValueTypeT, SizeI >, OSG::Vector< OSG::Real64, 2 >, OSG::Vector< ValueTypeT, 3 >, OSG::Vector< OSG::Real64, 3 >, OSG::Vector< ValueTypeT, 4 >, OSG::Vector< OSG::Real32, 2 >, OSG::Vector< OSG::Int32, 2 >, OSG::Vector< OSG::Real32, 3 >, OSG::Vector< OSG::Real32, 4 >, and OSG::Vector< OSG::UInt32, 2 >.
Definition at line 393 of file OSGVector.h.
| OSG::Point< ValueTypeT, SizeI >::VectorType |
Reimplemented in OSG::Vector< ValueTypeT, SizeI >, OSG::Vector< OSG::Real64, 2 >, OSG::Vector< ValueTypeT, 3 >, OSG::Vector< OSG::Real64, 3 >, OSG::Vector< ValueTypeT, 4 >, OSG::Vector< OSG::Real32, 2 >, OSG::Vector< OSG::Int32, 2 >, OSG::Vector< OSG::Real32, 3 >, OSG::Vector< OSG::Real32, 4 >, and OSG::Vector< OSG::UInt32, 2 >.
Definition at line 395 of file OSGVector.h.
Constructor & Destructor Documentation
| OSG::Point< ValueTypeT, SizeI >::Point | ( | void | ) | [inline] |
Definition at line 367 of file OSGVector.inl.
00367 : 00368 Inherited() 00369 { 00370 }
| OSG::Point< ValueTypeT, SizeI >::Point | ( | const ValueType * | pVals | ) | [inline, explicit] |
- Warning:
- Make sure the array size is at least as large as the vector size.
Definition at line 379 of file OSGVector.inl.
00379 : 00380 Inherited() 00381 { 00382 if(pVals == NULL) 00383 { 00384 for(UInt32 i = 0; i < Self::_uiSize; i++) 00385 { 00386 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 00387 } 00388 } 00389 else 00390 { 00391 for(UInt32 i = 0; i < Self::_uiSize; i++) 00392 { 00393 Self::_values[i] = pVals[i]; 00394 } 00395 } 00396 }
| OSG::Point< ValueTypeT, SizeI >::Point | ( | ValueType * | pVals | ) | [inline, explicit] |
Be shure the array size at least as large as the vector size.
Definition at line 405 of file OSGVector.inl.
00405 : 00406 Inherited() 00407 { 00408 if(pVals == NULL) 00409 { 00410 for(UInt32 i = 0; i < Self::_uiSize; i++) 00411 { 00412 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 00413 } 00414 } 00415 else 00416 { 00417 for(UInt32 i = 0; i < Self::_uiSize; i++) 00418 { 00419 Self::_values[i] = pVals[i]; 00420 } 00421 } 00422 }
| OSG::Point< ValueTypeT, SizeI >::Point | ( | const Point< ValueType2T, Size2I > & | pnt | ) | [inline, explicit] |
Definition at line 428 of file OSGVector.inl.
References OSG::Point< ValueTypeT, SizeI >::getValues().
00429 { 00430 typedef Point<ValueType2T, Size2I> Point2T; 00431 00432 if(Self::_uiSize <= Point2T::_uiSize) 00433 { 00434 for(UInt32 i = 0; i < Self::_uiSize; i++) 00435 { 00436 Self::_values[i] = pnt.getValues()[i]; 00437 } 00438 } 00439 else 00440 { 00441 UInt32 i; 00442 for(i = 0; i < Point2T::_uiSize; i++) 00443 { 00444 Self::_values[i] = pnt.getValues()[i]; 00445 } 00446 for(i = Point2T::_uiSize; i < Self::_uiSize; i++) 00447 { 00448 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 00449 } 00450 } 00451 }
| OSG::Point< ValueTypeT, SizeI >::Point | ( | const Vector< ValueType2T, Size2I > & | vec | ) | [inline, explicit] |
Definition at line 457 of file OSGVector.inl.
References OSG::Point< ValueTypeT, SizeI >::getValues().
00458 { 00459 typedef Vector<ValueType2T, Size2I> Vector2T; 00460 00461 if(Self::_uiSize <= Vector2T::_uiSize) 00462 { 00463 for(UInt32 i = 0; i < Self::_uiSize; i++) 00464 { 00465 Self::_values[i] = vec.getValues()[i]; 00466 } 00467 } 00468 else 00469 { 00470 UInt32 i; 00471 for(i = 0; i < Vector2T::_uiSize; i++) 00472 { 00473 Self::_values[i] = vec.getValues()[i]; 00474 } 00475 for(i = Vector2T::_uiSize; i < Self::_uiSize; i++) 00476 { 00477 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 00478 } 00479 } 00480 }
| OSG::Point< ValueTypeT, SizeI >::Point | ( | const Point< ValueTypeT, SizeI > & | source | ) |
| OSG::Point< ValueTypeT, SizeI >::Point | ( | const ValueType | rVal1 | ) | [inline] |
Definition at line 499 of file OSGVector.inl.
| OSG::Point< ValueTypeT, SizeI >::Point | ( | const ValueType | rVal1, | |
| const ValueType | rVal2 | |||
| ) | [inline] |
Definition at line 521 of file OSGVector.inl.
00522 : 00523 Inherited() 00524 { 00525 Self::_values[0] = rVal1; 00526 00527 if(Self::_uiSize == 2) 00528 { 00529 Self::_values[1] = rVal2; 00530 } 00531 else if(Self::_uiSize >= 3) 00532 { 00533 Self::_values[1] = rVal2; 00534 00535 for(UInt32 i = 2; i < Self::_uiSize; i++) 00536 { 00537 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 00538 } 00539 } 00540 }
| OSG::Point< ValueTypeT, SizeI >::Point | ( | const ValueType | rVal1, | |
| const ValueType | rVal2, | |||
| const ValueType | rVal3 | |||
| ) | [inline] |
Definition at line 552 of file OSGVector.inl.
00554 : 00555 Inherited() 00556 { 00557 Self::_values[0] = rVal1; 00558 00559 if(Self::_uiSize == 2) 00560 { 00561 Self::_values[1] = rVal2; 00562 } 00563 else if(Self::_uiSize == 3) 00564 { 00565 Self::_values[1] = rVal2; 00566 Self::_values[2] = rVal3; 00567 } 00568 else if(Self::_uiSize >= 4) 00569 { 00570 Self::_values[1] = rVal2; 00571 Self::_values[2] = rVal3; 00572 00573 for(UInt32 i = 3; i < Self::_uiSize; i++) 00574 { 00575 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 00576 } 00577 } 00578 }
| OSG::Point< ValueTypeT, SizeI >::Point | ( | const ValueType | rVal1, | |
| const ValueType | rVal2, | |||
| const ValueType | rVal3, | |||
| const ValueType | rVal4 | |||
| ) | [inline] |
Definition at line 590 of file OSGVector.inl.
00593 : 00594 Inherited() 00595 { 00596 Self::_values[0] = rVal1; 00597 00598 if(Self::_uiSize == 2) 00599 { 00600 Self::_values[1] = rVal2; 00601 } 00602 else if(Self::_uiSize == 3) 00603 { 00604 Self::_values[1] = rVal2; 00605 Self::_values[2] = rVal3; 00606 } 00607 else if(Self::_uiSize == 4) 00608 { 00609 Self::_values[1] = rVal2; 00610 Self::_values[2] = rVal3; 00611 Self::_values[3] = rVal4; 00612 } 00613 else if(Self::_uiSize >= 5) 00614 { 00615 Self::_values[1] = rVal2; 00616 Self::_values[2] = rVal3; 00617 Self::_values[3] = rVal4; 00618 00619 for(UInt32 i = 4; i < Self::_uiSize; i++) 00620 { 00621 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 00622 } 00623 } 00624 }
| OSG::Point< ValueTypeT, SizeI >::~Point | ( | void | ) | [inline] |
Definition at line 635 of file OSGVector.inl.
Member Function Documentation
| void OSG::Point< ValueTypeT, SizeI >::setNull | ( | void | ) | [inline] |
Definition at line 644 of file OSGVector.inl.
Referenced by OSG::Vector< ValueTypeT, SizeI >::projectTo(), and OSG::TransformationMatrix< ValueTypeT >::setIdentity().
| void OSG::Point< ValueTypeT, SizeI >::setValue | ( | const Point< ValueType2T, Size2I > & | pnt | ) | [inline] |
Definition at line 654 of file OSGVector.inl.
Referenced by OSG::Billboard::calcMatrix(), OSG::QuadTreeTerrain::changed(), OSG::QuadTreeTerrain::createNormalMap(), OSG::QuadTreeTerrain::getVertex(), OSG::InterpolationHelper< KeyFieldT, KeyValueFieldT, ValueFieldT >::lerp(), OSG::MergeGraphOp::processTransformations(), OSG::TransformationMatrix< ValueTypeT >::setTranslate(), OSG::TransformationMatrix< ValueTypeT >::setValue(), OSG::Point< ValueTypeT, SizeI >::setValue(), and OSG::TransformationMatrix< ValueTypeT >::TransformationMatrix().
| void OSG::Point< ValueTypeT, SizeI >::setValue | ( | const Point< ValueTypeT, SizeI > & | pnt | ) |
| void OSG::Point< ValueTypeT, SizeI >::setValue | ( | const ValueType * | pVals | ) | [inline] |
Definition at line 681 of file OSGVector.inl.
| void OSG::Point< ValueTypeT, SizeI >::setValue | ( | ValueType * | pVals | ) | [inline] |
Definition at line 693 of file OSGVector.inl.
References OSG::Point< ValueTypeT, SizeI >::setValue().
00694 { 00695 setValue(static_cast<const ValueType *>(pVals)); 00696 }
| void OSG::Point< ValueTypeT, SizeI >::setValueFromCString | ( | const Char8 * | szString | ) | [inline] |
Definition at line 704 of file OSGVector.inl.
Referenced by OSG::Color3< ValueTypeT >::setValue(), OSG::Point< ValueTypeT, SizeI >::setValue(), OSG::Color4< ValueTypeT >::setValue(), and OSG::Point< ValueTypeT, SizeI >::setValueFromCString().
00705 { 00706 UInt32 i; 00707 UInt32 numOfToken = Self::_uiSize; 00708 00709 Char8 *c = const_cast<Char8 *>(szString); 00710 Char8 *tokenC = 0; 00711 00712 Char8 token[256]; 00713 00714 if(szString == NULL || (*szString) == '\0') 00715 { 00716 for(i = 0; i < Self::_uiSize; i++) 00717 Self::_values[i] = TypeTraits<ValueTypeT>::getZeroElement(); 00718 00719 return; 00720 } 00721 00722 for (i = 0; i < numOfToken; c++) 00723 { 00724 switch (*c) 00725 { 00726 case '\0': 00727 if(tokenC) 00728 { 00729 *tokenC = 0; 00730 Self::_values[i++] = 00731 TypeTraits<ValueTypeT>::getFromCString(token); 00732 } 00733 00734 while (i < numOfToken) 00735 { 00736 Self::_values[i++] = 00737 TypeTraits<ValueTypeT>::getZeroElement(); 00738 } 00739 break; 00740 00741 case ' ' : 00742 case '\t': 00743 case '\n': 00744 case ',': 00745 if(tokenC) 00746 { 00747 *tokenC = 0; 00748 Self::_values[i++] = 00749 TypeTraits<ValueTypeT>::getFromCString(token); 00750 tokenC = 0; 00751 } 00752 break; 00753 default: 00754 if(!tokenC) 00755 { 00756 tokenC = token; 00757 } 00758 *tokenC++ = *c; 00759 break; 00760 } 00761 } 00762 }
| void OSG::Point< ValueTypeT, SizeI >::setValueFromCString | ( | Char8 * | szString | ) | [inline] |
Definition at line 770 of file OSGVector.inl.
References OSG::Point< ValueTypeT, SizeI >::setValueFromCString().
00771 { 00772 setValueFromCString(static_cast<const Char8 *>(szString)); 00773 }
| void OSG::Point< ValueTypeT, SizeI >::setValue | ( | const Char8 * | szString | ) | [inline] |
Reimplemented in OSG::Color3< ValueTypeT >, OSG::Color4< ValueTypeT >, and OSG::Color4< OSG::Real32 >.
Definition at line 778 of file OSGVector.inl.
References OSG::Point< ValueTypeT, SizeI >::setValueFromCString().
00779 { 00780 setValueFromCString(szString); 00781 }
| void OSG::Point< ValueTypeT, SizeI >::setValue | ( | Char8 * | szString | ) | [inline] |
Definition at line 785 of file OSGVector.inl.
References OSG::Point< ValueTypeT, SizeI >::setValueFromCString().
00786 { 00787 setValueFromCString(szString); 00788 }
| ValueTypeT * OSG::Point< ValueTypeT, SizeI >::getValues | ( | void | ) | [inline] |
Definition at line 798 of file OSGVector.inl.
Referenced by changeGenFunc(), OSG::Window::doFrameInit(), GeoTraitRectangle::draw(), drawShaderQuads< posTrait, secPosTrait, colTrait, texTrait, sizeTrait, normalTrait >::draw(), GeoTraitArrow::draw(), drawShaderStrips< posTrait, secPosTrait, colTrait, texTrait, sizeTrait, normalTrait >::draw(), OSG::SkyBackground::drawFace(), drawShaderQuads< posTrait, secPosTrait, colTrait, texTrait, sizeTrait, normalTrait >::drawIndexed(), drawShaderStrips< posTrait, secPosTrait, colTrait, texTrait, sizeTrait, normalTrait >::drawIndexed(), OSG::ShaderVariableOSG::evaluate(), OSG::TransformationMatrix< ValueTypeT >::getValues(), OSG::Color3< ValueTypeT >::getValuesHSV(), OSG::Color4< ValueTypeT >::getValuesHSV(), OSG::Color3< ValueTypeT >::getValuesRGB(), OSG::Color4< ValueTypeT >::getValuesRGBA(), OSG::ProgramChunk::handleGL(), NormalTraitGeneric3f::normal(), NormalTraitGeneric::normal(), OSG::Point< ValueTypeT, SizeI >::Point(), setGenFunc(), OSG::Color3< ValueTypeT >::setValuesHSV(), OSG::Color4< ValueTypeT >::setValuesHSV(), and PosTraitGeneric::vertex().
| const ValueTypeT * OSG::Point< ValueTypeT, SizeI >::getValues | ( | void | ) | const [inline] |
Definition at line 807 of file OSGVector.inl.
| bool OSG::Point< ValueTypeT, SizeI >::isZero | ( | void | ) | const [inline] |
Definition at line 819 of file OSGVector.inl.
References OSG::Eps.
Referenced by OSG::Vector< ValueTypeT, SizeI >::enclosedAngle(), OSG::Line::getClosestPoints(), OSG::BoxVolume::setBoundsByCenterAndSize(), and OSG::ProjectionCameraDecorator::updateData().
| void OSG::Point< ValueTypeT, SizeI >::negate | ( | void | ) | [inline] |
Definition at line 836 of file OSGVector.inl.
Referenced by OSG::ShadowStage::updateLights().
| bool OSG::Point< ValueTypeT, SizeI >::equals | ( | const Point< ValueTypeT, SizeI > & | pnt, | |
| const ValueType | tolerance | |||
| ) | const [inline] |
Definition at line 848 of file OSGVector.inl.
Referenced by OSG::TransformationMatrix< ValueTypeT >::equals(), OSG::LightChunk::operator==(), OSG::Vector< ValueTypeT, SizeI >::operator==(), OSG::Point< ValueTypeT, SizeI >::operator==(), OSG::MaterialChunk::operator==(), and OSG::DSLightChunk::operator==().
| Point< ValueTypeT, SizeI >::VectorType & OSG::Point< ValueTypeT, SizeI >::subZero | ( | void | ) | [inline] |
Reimplemented in OSG::Vector< ValueTypeT, SizeI >, OSG::Vector< OSG::Real64, 2 >, OSG::Vector< ValueTypeT, 3 >, OSG::Vector< OSG::Real64, 3 >, OSG::Vector< ValueTypeT, 4 >, OSG::Vector< OSG::Real32, 2 >, OSG::Vector< OSG::Int32, 2 >, OSG::Vector< OSG::Real32, 3 >, OSG::Vector< OSG::Real32, 4 >, and OSG::Vector< OSG::UInt32, 2 >.
Definition at line 869 of file OSGVector.inl.
Referenced by OSG::TrapezoidalShadowMapEngine::calcTrapezoidalTransform(), OSG::FrustumVolume::getCenter(), OSG::FrustumVolume::getScalarVolume(), OSG::TrapezoidalShadowMapEngine::intersectFrusta(), and OSG::InterpolationHelper< KeyFieldT, KeyValueFieldT, ValueFieldT >::lerp().
00870 { 00871 return *(static_cast<VectorType *>(this)); 00872 }
| const Point< ValueTypeT, SizeI >::VectorType & OSG::Point< ValueTypeT, SizeI >::subZero | ( | void | ) | const [inline] |
Reimplemented in OSG::Vector< ValueTypeT, SizeI >, OSG::Vector< OSG::Real64, 2 >, OSG::Vector< ValueTypeT, 3 >, OSG::Vector< OSG::Real64, 3 >, OSG::Vector< ValueTypeT, 4 >, OSG::Vector< OSG::Real32, 2 >, OSG::Vector< OSG::Int32, 2 >, OSG::Vector< OSG::Real32, 3 >, OSG::Vector< OSG::Real32, 4 >, and OSG::Vector< OSG::UInt32, 2 >.
Definition at line 879 of file OSGVector.inl.
00880 { 00881 return *(static_cast<const VectorType *>(this)); 00882 }
| Point< ValueTypeT, SizeI >::RealReturnType OSG::Point< ValueTypeT, SizeI >::dist | ( | const Point< ValueTypeT, SizeI > & | pnt | ) | const [inline] |
Definition at line 890 of file OSGVector.inl.
References OSG::Point< ValueTypeT, SizeI >::dist2(), and OSG::osgSqrt().
Referenced by OSG::Surface::getDesiredError(), OSG::Geometry::intersect(), OSG::DistanceLOD::render(), and OSG::RangeLOD::render().
| Point< ValueTypeT, SizeI >::RealReturnType OSG::Point< ValueTypeT, SizeI >::dist2 | ( | const Point< ValueTypeT, SizeI > & | pnt | ) | const [inline] |
Definition at line 900 of file OSGVector.inl.
Referenced by OSG::Particles::calcIndex(), OSG::Point< ValueTypeT, SizeI >::dist(), OSG::BezierCurve2D::homogeniousDistanceSquared(), and OSG::Geometry::intersect().
00902 { 00903 RealReturnType returnValue = 0; 00904 RealReturnType tmp; 00905 00906 for(UInt32 i = 0; i < Self::_uiSize; i++) 00907 { 00908 tmp = Self::_values[i] - pnt._values[i]; 00909 00910 returnValue += tmp * tmp; 00911 } 00912 00913 return returnValue; 00914 }
| Point< ValueTypeT, SizeI >::RealReturnType OSG::Point< ValueTypeT, SizeI >::maxValue | ( | void | ) | const [inline] |
Definition at line 921 of file OSGVector.inl.
Referenced by OSG::Billboard::adjustVolume().
00922 { 00923 RealReturnType returnValue = TypeTraits<RealReturnType>::getMin(); 00924 00925 for(UInt32 i = 0; i < Self::_uiSize; i++) 00926 { 00927 if(Self::_values[i] > returnValue) 00928 returnValue = Self::_values[i]; 00929 } 00930 00931 return returnValue; 00932 }
| void OSG::Point< ValueTypeT, SizeI >::operator*= | ( | const ValueType | val | ) | [inline] |
Definition at line 941 of file OSGVector.inl.
| void OSG::Point< ValueTypeT, SizeI >::operator/= | ( | const ValueType | val | ) | [inline] |
Definition at line 953 of file OSGVector.inl.
| Point< ValueTypeT, SizeI >::VectorType OSG::Point< ValueTypeT, SizeI >::operator- | ( | const Point< ValueTypeT, SizeI > & | pnt | ) | const [inline] |
Reimplemented in OSG::Vector< ValueTypeT, SizeI >.
Definition at line 967 of file OSGVector.inl.
00968 { 00969 VectorType returnValue(*this); 00970 00971 for(UInt32 i = 0; i < Self::_uiSize; i++) 00972 { 00973 returnValue[i] -= pnt[i]; 00974 } 00975 00976 return returnValue; 00977 }
| Point< ValueTypeT, SizeI > OSG::Point< ValueTypeT, SizeI >::operator+ | ( | const VectorType & | vec | ) | const [inline] |
Definition at line 984 of file OSGVector.inl.
| Point< ValueTypeT, SizeI > OSG::Point< ValueTypeT, SizeI >::operator- | ( | const VectorType & | vec | ) | const [inline] |
Definition at line 1001 of file OSGVector.inl.
| Point< ValueTypeT, SizeI > OSG::Point< ValueTypeT, SizeI >::operator* | ( | const ValueType | val | ) | const [inline] |
Reimplemented in OSG::Vector< ValueTypeT, SizeI >, OSG::Vector< OSG::Real64, 2 >, OSG::Vector< ValueTypeT, 3 >, OSG::Vector< OSG::Real64, 3 >, OSG::Vector< ValueTypeT, 4 >, OSG::Vector< OSG::Real32, 2 >, OSG::Vector< OSG::Int32, 2 >, OSG::Vector< OSG::Real32, 3 >, OSG::Vector< OSG::Real32, 4 >, and OSG::Vector< OSG::UInt32, 2 >.
Definition at line 1018 of file OSGVector.inl.
| Point< ValueTypeT, SizeI > OSG::Point< ValueTypeT, SizeI >::operator- | ( | void | ) | [inline] |
Definition at line 1035 of file OSGVector.inl.
| void OSG::Point< ValueTypeT, SizeI >::operator+= | ( | const VectorType & | vec | ) | [inline] |
Definition at line 1051 of file OSGVector.inl.
| void OSG::Point< ValueTypeT, SizeI >::operator-= | ( | const VectorType & | vec | ) | [inline] |
Definition at line 1063 of file OSGVector.inl.
| ValueTypeT & OSG::Point< ValueTypeT, SizeI >::operator[] | ( | const UInt32 | uiVal | ) | [inline] |
Definition at line 1076 of file OSGVector.inl.
| const ValueTypeT & OSG::Point< ValueTypeT, SizeI >::operator[] | ( | const UInt32 | uiVal | ) | const [inline] |
Definition at line 1084 of file OSGVector.inl.
| Point< ValueTypeT, SizeI > & OSG::Point< ValueTypeT, SizeI >::operator= | ( | const Point< ValueTypeT, SizeI > & | source | ) | [inline] |
Reimplemented in OSG::Vector< ValueTypeT, SizeI >.
Definition at line 1095 of file OSGVector.inl.
| Point< ValueTypeT, SizeI > & OSG::Point< ValueTypeT, SizeI >::operator= | ( | const VectorType & | source | ) | [inline] |
Definition at line 1111 of file OSGVector.inl.
| bool OSG::Point< ValueTypeT, SizeI >::operator< | ( | const Point< ValueTypeT, SizeI > & | other | ) | const [inline] |
Reimplemented in OSG::Vector< ValueTypeT, SizeI >.
Definition at line 1123 of file OSGVector.inl.
01124 { 01125 bool ret = false; 01126 01127 for(UInt32 i = 0; i < Self::_uiSize; i++) 01128 { 01129 if(Self::_values[i] > other._values[i]) 01130 { 01131 break; 01132 } 01133 01134 if(Self::_values[i] < other._values[i]) 01135 { 01136 ret = true; 01137 break; 01138 } 01139 } 01140 01141 return ret; 01142 }
| bool OSG::Point< ValueTypeT, SizeI >::operator== | ( | const Point< ValueTypeT, SizeI > & | other | ) | const [inline] |
Reimplemented in OSG::Vector< ValueTypeT, SizeI >.
Definition at line 1148 of file OSGVector.inl.
References OSG::Eps, and OSG::Point< ValueTypeT, SizeI >::equals().
01149 { 01150 return Self::equals(other, ValueTypeT(Eps)); 01151 }
| bool OSG::Point< ValueTypeT, SizeI >::operator!= | ( | const Point< ValueTypeT, SizeI > & | other | ) | const [inline] |
Reimplemented in OSG::Vector< ValueTypeT, SizeI >.
Definition at line 1157 of file OSGVector.inl.
Member Data Documentation
const Point< ValueTypeT, SizeI > OSG::Point< ValueTypeT, SizeI >::Null [inline, static] |
Reimplemented in OSG::Color3< ValueTypeT >, OSG::Color4< ValueTypeT >, OSG::Vector< ValueTypeT, SizeI >, OSG::Color4< OSG::Real32 >, OSG::Vector< OSG::Real64, 2 >, OSG::Vector< ValueTypeT, 3 >, OSG::Vector< OSG::Real64, 3 >, OSG::Vector< ValueTypeT, 4 >, OSG::Vector< OSG::Real32, 2 >, OSG::Vector< OSG::Int32, 2 >, OSG::Vector< OSG::Real32, 3 >, OSG::Vector< OSG::Real32, 4 >, and OSG::Vector< OSG::UInt32, 2 >.
Definition at line 398 of file OSGVector.h.
The documentation for this class was generated from the following files:
