Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cPoint3T< TYPE > Class Template Reference

#include <cPoint3.h>

Inheritance diagram for GrayLib::cPoint3T< TYPE >:
GrayLib::cVecT3< float > GrayLib::cVecTC< float, 3, cVecT3< float > >

Public Member Functions

 cPoint3T ()
 
 cPoint3T (const SUPER_t &ptVal)
 
 cPoint3T (TYPE x, TYPE y, TYPE z=0)
 
 cPoint3T (const cVariant &vVal, int iArrayIndexStart=0)
 
void InitInvalid ()
 
bool IsValid2d () const
 
bool IsValid () const
 
void Set (POINT pt)
 
void Set (POINTS pt)
 
POINT get_POINT () const
 
 operator POINT () const
 
POINTS get_POINTS () const
 
 operator POINTS () const
 
cVecT2< TYPEget_Point2 () const
 
void MoveDir (DIR_TYPE eDir)
 
void MoveDirN (DIR_TYPE eDir, float nSteps)
 
TYPE GetDirZ (const SUPER_t &pt) const
 
cVecT2< TYPE > & get_Point2f ()
 
ITERATE_t v_SetPoint (const cVariant &vVal, ITERATE_t iArrayIndexStart=0)
 
ITERATE_t v_AddPoint (OUT cVariant &vVal) const
 
cString get_StringI3 () const
 
bool put_MapCoord (cString sVal)
 
HASHCODE_t get_HashCode2 () const
 
- Public Member Functions inherited from GrayLib::cVecT3< float >
 cVecT3 () noexcept
 
 cVecT3 (const SUPER_t &v) noexcept
 
 cVecT3 (const float *pVals) noexcept
 
 cVecT3 (float n0, float n1, float n2=0) noexcept
 
float get_X () const noexcept
 
float get_Y () const noexcept
 
float get_Z () const noexcept
 
const cVecT2< float > & get_V2 () const noexcept
 
bool IsSame2D (const THIS_t &pt) const noexcept
 
float GetDist2DSq (float nX, float nY) const
 
float GetDist2DSq (const THIS_t &pt) const
 
float GetDist2D (const THIS_t &pt) const
 
void InitCross (const THIS_t &rA, const THIS_t &rB)
 
THIS_t GetCross (const THIS_t &rB) const
 
void SetCross (const THIS_t &v2)
 
- Public Member Functions inherited from GrayLib::cVecTC< float, 3, cVecT3< float > >
float * get_T () noexcept
 
const float * get_CT () const noexcept
 
const cVecT3< float > & get_CR () const noexcept
 
 operator const float * () const noexcept
 
float GetElem (int i) const noexcept
 
float operator[] (int i) const noexcept
 
float & operator[] (int i)
 
bool isZero () const noexcept
 
COMPARE_t Compare (const THIS_t &v2) const noexcept
 
bool operator== (const THIS_t &v2) const noexcept
 
bool operator!= (const THIS_t &v2) const noexcept
 
bool IsNear (const THIS_t &v2, float fDist=(float) k_FLT_MIN2) const
 
float get_MagnitudeSq () const noexcept
 
float get_Magnitude () const noexcept
 
cVecT3< float > operator- () const
 
cVecT3< float > operator- (const THIS_t &v2) const
 
cVecT3< float > get_Abs () const
 
cVecT3< float > GetSum (const THIS_t &v2) const
 
cVecT3< float > operator+ (const THIS_t &v2) const
 
cVecT3< float > GetDiff (const THIS_t &v2) const
 
cVecT3< float > GetScaled (float nScale) const
 
cVecT3< float > operator* (float nScale) const
 
cVecT3< float > operator/ (float nScale) const
 
cVecT3< float > GetMul (const THIS_t &v2) const
 
cVecT3< float > GetDiv (const THIS_t &v2) const
 
float GetDistSq (const THIS_t &v2) const
 
float GetDist (const THIS_t &v2) const
 
float GetDot (const THIS_t &v2) const
 
cVecT3< float > get_Normalized () const
 
 operator float * ()
 
float & RefElem (int i) noexcept
 
void Set (const THIS_t &v)
 
void SetZero () noexcept
 
float SetNormalized (void) noexcept
 
bool put_Magnitude (float nLength)
 
void SetLerp (const THIS_t &a, const THIS_t &b, DVALUE_t t)
 
const cVecT3< float > & operator+= (const THIS_t &v2)
 
const cVecT3< float > & operator+= (float n)
 
const cVecT3< float > & operator-= (const THIS_t &v2) noexcept
 
const cVecT3< float > & operator-= (float n) noexcept
 
void DoScale (float n) noexcept
 
const cVecT3< float > & operator*= (float nScale) noexcept
 
cVecT3< float > & operator*= (const THIS_t &v2) noexcept
 
const cVecT3< float > & operator/= (float nScale)
 
cVecT3< float > & operator/= (const THIS_t &v2)
 
void DoMul (const THIS_t &v2) noexcept
 
void DoDiv (const THIS_t &v2)
 

Additional Inherited Members

- Public Types inherited from GrayLib::cVecT3< float >
typedef cVecT3< float > THIS_t
 
typedef cVecTC< float, k_nDim, THIS_tSUPER_t
 
- Public Types inherited from GrayLib::cVecTC< float, 3, cVecT3< float > >
typedef float DVALUE_t
 Dimension value type. More...
 
typedef cVecTC< float, _IQTY, cVecT3< float > > THIS_t
 
- Static Public Member Functions inherited from GrayLib::cVecT3< float >
static THIS_t GetCross (const THIS_t &rA, const THIS_t &rB)
 
- Static Public Member Functions inherited from GrayLib::cVecTC< float, 3, cVecT3< float > >
static float GetDot (const THIS_t &v1, const THIS_t &v2)
 
- Public Attributes inherited from GrayLib::cVecT3< float >
float m_a [k_nDim]
 
float m_x
 
float m_y
 
float m_z
 
float x
 
float y
 
float z
 
float r
 
float g
 
float b
 
union {
   TYPE   m_a [k_nDim]
 
   struct {
      TYPE   m_x
 
      TYPE   m_y
 
      TYPE   m_z
 
   } 
 
   struct {
      TYPE   x
 
      TYPE   y
 
      TYPE   z
 
   } 
 
   struct {
      TYPE   r
 
      TYPE   g
 
      TYPE   b
 
   } 
 
}; 
 
- Static Public Attributes inherited from GrayLib::cVecTC< float, 3, cVecT3< float > >
static const int k_nDim
 
- Protected Member Functions inherited from GrayLib::cVecTC< float, 3, cVecT3< float > >
 cVecTC ()
 

Detailed Description

template<typename TYPE = float>
class GrayLib::cPoint3T< TYPE >

A float 3d point in the virtual world space. (in meters). e.g. HLSL = float3 z = up/down

Note
Assume any compared point is on the same map!
Assume any compared point has the same units.
Assume xyz have the same units
DO NOT use cVector3f as a base, it will/may have different units ! force me to convert.

Constructor & Destructor Documentation

◆ cPoint3T() [1/4]

template<typename TYPE = float>
GrayLib::cPoint3T< TYPE >::cPoint3T ( )
inline

◆ cPoint3T() [2/4]

template<typename TYPE = float>
GrayLib::cPoint3T< TYPE >::cPoint3T ( const SUPER_t ptVal)
inline

◆ cPoint3T() [3/4]

template<typename TYPE = float>
GrayLib::cPoint3T< TYPE >::cPoint3T ( TYPE  x,
TYPE  y,
TYPE  z = 0 
)
inline

◆ cPoint3T() [4/4]

template<typename TYPE = float>
GrayLib::cPoint3T< TYPE >::cPoint3T ( const cVariant vVal,
int  iArrayIndexStart = 0 
)
inline

Member Function Documentation

◆ get_HashCode2()

template<typename TYPE = float>
HASHCODE_t GrayLib::cPoint3T< TYPE >::get_HashCode2 ( ) const
inline

◆ get_POINT()

template<typename TYPE = float>
POINT GrayLib::cPoint3T< TYPE >::get_POINT ( ) const
inline

◆ get_Point2()

template<typename TYPE = float>
cVecT2<TYPE> GrayLib::cPoint3T< TYPE >::get_Point2 ( ) const
inline

◆ get_Point2f()

template<typename TYPE = float>
cVecT2<TYPE>& GrayLib::cPoint3T< TYPE >::get_Point2f ( )
inline

◆ get_POINTS()

template<typename TYPE = float>
POINTS GrayLib::cPoint3T< TYPE >::get_POINTS ( ) const
inline

Short form of POINT

◆ get_StringI3()

template<typename TYPE >
cString GrayLib::cPoint3T< TYPE >::get_StringI3

◆ GetDirZ()

template<typename TYPE = float>
TYPE GrayLib::cPoint3T< TYPE >::GetDirZ ( const SUPER_t pt) const
inline

Get the 2d dir to this point. Radians

◆ InitInvalid()

template<typename TYPE = float>
void GrayLib::cPoint3T< TYPE >::InitInvalid ( )
inline

◆ IsValid()

template<typename TYPE = float>
bool GrayLib::cPoint3T< TYPE >::IsValid ( ) const
inline

◆ IsValid2d()

template<typename TYPE = float>
bool GrayLib::cPoint3T< TYPE >::IsValid2d ( ) const
inline

◆ MoveDir()

template<typename TYPE = float>
void GrayLib::cPoint3T< TYPE >::MoveDir ( DIR_TYPE  eDir)
inline

Move a point in a direction.

◆ MoveDirN()

template<typename TYPE = float>
void GrayLib::cPoint3T< TYPE >::MoveDirN ( DIR_TYPE  eDir,
float  nSteps 
)
inline

< Move a point in a direction.

◆ operator POINT()

template<typename TYPE = float>
GrayLib::cPoint3T< TYPE >::operator POINT ( ) const
inline

◆ operator POINTS()

template<typename TYPE = float>
GrayLib::cPoint3T< TYPE >::operator POINTS ( ) const
inline

◆ put_MapCoord()

template<typename TYPE >
bool GrayLib::cPoint3T< TYPE >::put_MapCoord ( cString  sVal)

Convert a string in map coords to a x,y,z map position. EXAMPLE: sVal="Z53\O36"

◆ Set() [1/2]

template<typename TYPE = float>
void GrayLib::cPoint3T< TYPE >::Set ( POINT  pt)
inline

◆ Set() [2/2]

template<typename TYPE = float>
void GrayLib::cPoint3T< TYPE >::Set ( POINTS  pt)
inline

◆ v_AddPoint()

template<typename TYPE >
ITERATE_t GrayLib::cPoint3T< TYPE >::v_AddPoint ( OUT cVariant vVal) const

Get the variant from the point. append to variant. VARTYPE_Vector3 ???

◆ v_SetPoint()

template<typename TYPE >
ITERATE_t GrayLib::cPoint3T< TYPE >::v_SetPoint ( const cVariant vVal,
ITERATE_t  iArrayIndexStart = 0 
)

set the point from the variant

Returns
Number of elements in the array used.

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