#include <OSGVector.h>
Inheritance diagram for osg::PointInterface< ValueTypeT, StorageInterfaceT >:


Public Types | |
| typedef StorageInterfaceT | Inherited |
| Parent type. | |
| typedef TypeConstants< 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 |
Public Methods | |
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 VectorT> | PointInterface (const VectorT &vec) |
| Constructor which take a lot of types as it's argument :-). | |
| PointInterface (const PointInterface &source) | |
| 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 VectorT> void | setValue (const VectorT &vec) |
| Set function which take a lot of types as it's argument :-). | |
| void | setValue (const ValueTypeT *pVals) |
| Set value from a given array, be sure to match sizes. | |
| void | setValue (const Char8 *szString) |
| Extract values from given string, where both (const and not const) must be present, otherwise the compiler strikes back :-) (GV). | |
| void | setValue (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. | |
| 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 scalar multiplication. | |
| void | operator-= (const VecInterface &vec) |
| Component wise scalar multiplication. | |
Element Access | |
| ValueTypeT & | operator[] (const UInt32 uiVal) |
| const ValueTypeT & | operator[] (const UInt32 uiVal) const |
Assignment | |
| PointInterface & | operator= (const PointInterface &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 | |
| const PointInterface | Null |
|
|||||
|
|||||
|
Used type if the returnvalue must be a real value.
Reimplemented in osg::VectorInterface< ValueTypeT, StorageInterfaceT >, osg::VectorInterface< UInt16, VecStorage2 >, osg::VectorInterface< Real32, VecStorage3 >, osg::VectorInterface< Real32, VecStorage2 >, osg::VectorInterface< Real32, VecStorage4 >, and osg::VectorInterface< UInt8, VecStorage4 >. |
|
|||||
|
|||||
|
|
|
|||||
|
||||||||||
|
|
|
||||||||||
|
Constructor which takes a const value array. Be shure the array size at least as large as the vector size. |
|
||||||||||
|
Constructor which takes a value array. Be shure the array size at least as large as the vector size. |
|
||||||||||||||
|
Constructor which take a lot of types as it's argument :-). The argument type must provide a _iSize enum entry, a *getValueRef(void) function and the value types must be convertable to the current one. The main problem is that through the constructor VecBase(const ValueTypeT *pVals); and the following cast operator const ValueTypeT *(void); you are able to to the following : void foo(void)
{
ClassWithValueTypeT_*_Cast v2f;
Vec4f v4f(v2f);
}
Thanks to that ****** MS Compiler the code must be included within the header file, but at least it seems work ;-) (GV) |
|
||||||||||
|
|
|
||||||||||||||||
|
Constructor which takes two values, remaining entries will be zero.
|
|
||||||||||||||||||||
|
Constructor which takes three values, remaining entries will be zero.
|
|
||||||||||||||||||||||||
|
Constructor which takes four values, remaining entries will be zero.
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||||||
|
Set function which take a lot of types as it's argument :-). The argument type must provide a _iSize enum entry, a *getValues(void) function and the value types must be convertable to the current one. The main problem is that through the set function void setValue(const ValueTypeT *pVals); and the following cast operator const ValueTypeT *(void); you are able to to the following : void foo(void)
{
ClassWithValueTypeT_*_Cast v2f;
Vec4f v4f;
v4f.setValue(v2f);
}
Thanks to that ****** MS Compiler the code must be included within the header file, but at least it seems to work ;-) (GV) |
|
||||||||||
|
Set value from a given array, be sure to match sizes.
|
|
||||||||||
|
Extract values from given string, where both (const and not const) must be present, otherwise the compiler strikes back :-) (GV).
|
|
||||||||||
|
Extract values from given string, where both (const and not const) must be present, otherwise the compiler strikes back :-) (GV).
|
|
||||||||||
|
Get a pointer to the value storage.
|
|
||||||||||
|
Get a const pointer to the value storage.
|
|
||||||||||
|
Returns true iff the norm of each value is less than Eps.
|
|
||||||||||
|
Negates each value of the point in place.
|
|
||||||||||||||||
|
Returns true iff the two points are eual within a given tolerance.
|
|
||||||||||
|
Returns the corrosponding vector by subtracting zero.
|
|
||||||||||
|
Returns the corrosponding vector by subtracting zero.
|
|
||||||||||
|
Returns the distance between the two points.
|
|
||||||||||
|
Returns the distance between the two points, squared.
|
|
||||||||||
|
Returns the maximum value of the vector.
|
|
||||||||||
|
Component wise scalar multiplication.
|
|
||||||||||
|
Component wise scalar division.
|
|
||||||||||
|
Point substraction, returns a new vector.
|
|
||||||||||
|
Component wise binary vector addition operator.
|
|
||||||||||
|
Component wise binary vector addition operator.
|
|
||||||||||
|
Component wise binary scalar multiplication.
Reimplemented in osg::VectorInterface< ValueTypeT, StorageInterfaceT >, osg::VectorInterface< UInt16, VecStorage2 >, osg::VectorInterface< Real32, VecStorage3 >, osg::VectorInterface< Real32, VecStorage2 >, osg::VectorInterface< Real32, VecStorage4 >, and osg::VectorInterface< UInt8, VecStorage4 >. |
|
||||||||||
|
Nondestructive unary negation, returns new point.
|
|
||||||||||
|
Component wise scalar multiplication.
|
|
||||||||||
|
Component wise scalar multiplication.
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
Equal operator, using Eps as the tolerance.
|
|
||||||||||
|
Not equal operator, using Eps as the tolerance.
|
|
|||||
1.2.16