Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cVector4f Class Reference

#include <cVector.h>

Inheritance diagram for GrayLib::cVector4f:
GrayLib::cVecT4< float > GrayLib::cVecTC< float, 4, cVecT4< float > > GrayLib::cPlanef

Public Member Functions

 cVector4f ()
 
 cVector4f (const DVALUE_t *pVals)
 
 cVector4f (const SUPER_t &v)
 
 cVector4f (DVALUE_t _x, DVALUE_t _y, DVALUE_t _z=0, DVALUE_t _w=0) noexcept
 
 cVector4f (const cVecT3< DVALUE_t > &v, DVALUE_t w)
 
void InitCross4 (const cVector4f &v1, const cVector4f &v2, const cVector4f &v3)
 
- Public Member Functions inherited from GrayLib::cVecT4< float >
 cVecT4 () noexcept
 
 cVecT4 (const SUPER_t &v) noexcept
 
 cVecT4 (const float *pVals) noexcept
 
 cVecT4 (float n0, float n1, float n2=0, float n3=0) noexcept
 
 cVecT4 (const cVecT3< float > &v2, float _w=0)
 
const float & get_X () const noexcept
 
const float & get_Y () const noexcept
 
const float & get_Z () const noexcept
 
const float & get_W () const noexcept
 
const cVecT3< float > & get_V3 () const noexcept
 
cVecT3< float > & ref_V3 () noexcept
 
void InitCross (const THIS_t &v1, const THIS_t &v2, const THIS_t &v3)
 
- Public Member Functions inherited from GrayLib::cVecTC< float, 4, cVecT4< float > >
float * get_T () noexcept
 
const float * get_CT () const noexcept
 
const cVecT4< 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
 
cVecT4< float > operator- () const
 
cVecT4< float > operator- (const THIS_t &v2) const
 
cVecT4< float > get_Abs () const
 
cVecT4< float > GetSum (const THIS_t &v2) const
 
cVecT4< float > operator+ (const THIS_t &v2) const
 
cVecT4< float > GetDiff (const THIS_t &v2) const
 
cVecT4< float > GetScaled (float nScale) const
 
cVecT4< float > operator* (float nScale) const
 
cVecT4< float > operator/ (float nScale) const
 
cVecT4< float > GetMul (const THIS_t &v2) const
 
cVecT4< 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
 
cVecT4< 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 cVecT4< float > & operator+= (const THIS_t &v2)
 
const cVecT4< float > & operator+= (float n)
 
const cVecT4< float > & operator-= (const THIS_t &v2) noexcept
 
const cVecT4< float > & operator-= (float n) noexcept
 
void DoScale (float n) noexcept
 
const cVecT4< float > & operator*= (float nScale) noexcept
 
cVecT4< float > & operator*= (const THIS_t &v2) noexcept
 
const cVecT4< float > & operator/= (float nScale)
 
cVecT4< 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::cVecTC< float, 4, cVecT4< float > >
typedef float DVALUE_t
 Dimension value type. More...
 
typedef cVecTC< float, _IQTY, cVecT4< float > > THIS_t
 
- Static Public Member Functions inherited from GrayLib::cVecTC< float, 4, cVecT4< float > >
static float GetDot (const THIS_t &v1, const THIS_t &v2)
 
- Public Attributes inherited from GrayLib::cVecT4< float >
float m_a [4]
 
float m_x
 
float m_y
 
float m_z
 
float m_w
 
float x
 
float y
 
float z
 
float w
 
float r
 
float g
 
float b
 
float a
 
union {
   TYPE   m_a [4]
 
   struct {
      TYPE   m_x
 
      TYPE   m_y
 
      TYPE   m_z
 
      TYPE   m_w
 
   } 
 
   struct {
      TYPE   x
 
      TYPE   y
 
      TYPE   z
 
      TYPE   w
 
   } 
 
   struct {
      TYPE   r
 
      TYPE   g
 
      TYPE   b
 
      TYPE   a
 
   } 
 
}; 
 
- Static Public Attributes inherited from GrayLib::cVecTC< float, 4, cVecT4< float > >
static const int k_nDim
 
- Protected Member Functions inherited from GrayLib::cVecTC< float, 4, cVecT4< float > >
 cVecTC ()
 

Detailed Description

like XMFLOAT4 4 float vector. used to pass data to shaders and hold one row of a 4x4 matrix.

Constructor & Destructor Documentation

◆ cVector4f() [1/5]

GrayLib::cVector4f::cVector4f ( )
inline

ASSUME XMFLOAT4 is un-init

◆ cVector4f() [2/5]

GrayLib::cVector4f::cVector4f ( const DVALUE_t pVals)
inline

◆ cVector4f() [3/5]

GrayLib::cVector4f::cVector4f ( const SUPER_t v)
inline

◆ cVector4f() [4/5]

GrayLib::cVector4f::cVector4f ( DVALUE_t  _x,
DVALUE_t  _y,
DVALUE_t  _z = 0,
DVALUE_t  _w = 0 
)
inlinenoexcept

◆ cVector4f() [5/5]

GrayLib::cVector4f::cVector4f ( const cVecT3< DVALUE_t > &  v,
DVALUE_t  w 
)
inline

Member Function Documentation

◆ InitCross4()

void GrayLib::cVector4f::InitCross4 ( const cVector4f v1,
const cVector4f v2,
const cVector4f v3 
)
inline

cVector4f cross product. like cVecT3::InitCross()


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