DDraceNetwork Docs
color4_base< DerivedT > Class Template Reference

#include <color.h>

Public Member Functions

 color4_base ()
 
 color4_base (const vec4 &v4)
 
 color4_base (const vec3 &v3)
 
 color4_base (float nx, float ny, float nz, float na)
 
 color4_base (float nx, float ny, float nz)
 
 color4_base (unsigned col, bool alpha=false)
 
vec4 v4 () const
 
 operator vec4 () const
 
float & operator[] (int index)
 
bool operator== (const color4_base &col) const
 
bool operator!= (const color4_base &col) const
 
unsigned Pack (bool Alpha=true) const
 
unsigned PackAlphaLast (bool Alpha=true) const
 
DerivedT WithAlpha (float alpha) const
 
DerivedT WithMultipliedAlpha (float alpha) const
 
DerivedT Multiply (const DerivedT &Other) const
 

Static Public Member Functions

template<typename UnpackT >
static UnpackT UnpackAlphaLast (unsigned Color, bool Alpha=true)
 

Public Attributes

union {
   float   x
 
   float   r
 
   float   h
 
}; 
 
union {
   float   y
 
   float   g
 
   float   s
 
}; 
 
union {
   float   z
 
   float   b
 
   float   l
 
   float   v
 
}; 
 
union {
   float   w
 
   float   a
 
}; 
 

Constructor & Destructor Documentation

◆ color4_base() [1/6]

template<typename DerivedT >
color4_base< DerivedT >::color4_base ( )
inline

◆ color4_base() [2/6]

template<typename DerivedT >
color4_base< DerivedT >::color4_base ( const vec4 v4)
inline

◆ color4_base() [3/6]

template<typename DerivedT >
color4_base< DerivedT >::color4_base ( const vec3 v3)
inline

◆ color4_base() [4/6]

template<typename DerivedT >
color4_base< DerivedT >::color4_base ( float  nx,
float  ny,
float  nz,
float  na 
)
inline

◆ color4_base() [5/6]

template<typename DerivedT >
color4_base< DerivedT >::color4_base ( float  nx,
float  ny,
float  nz 
)
inline

◆ color4_base() [6/6]

template<typename DerivedT >
color4_base< DerivedT >::color4_base ( unsigned  col,
bool  alpha = false 
)
inline

Member Function Documentation

◆ Multiply()

template<typename DerivedT >
DerivedT color4_base< DerivedT >::Multiply ( const DerivedT &  Other) const
inline

◆ operator vec4()

template<typename DerivedT >
color4_base< DerivedT >::operator vec4 ( ) const
inline

◆ operator!=()

template<typename DerivedT >
bool color4_base< DerivedT >::operator!= ( const color4_base< DerivedT > &  col) const
inline

◆ operator==()

template<typename DerivedT >
bool color4_base< DerivedT >::operator== ( const color4_base< DerivedT > &  col) const
inline

◆ operator[]()

template<typename DerivedT >
float & color4_base< DerivedT >::operator[] ( int  index)
inline

◆ Pack()

template<typename DerivedT >
unsigned color4_base< DerivedT >::Pack ( bool  Alpha = true) const
inline

◆ PackAlphaLast()

template<typename DerivedT >
unsigned color4_base< DerivedT >::PackAlphaLast ( bool  Alpha = true) const
inline

◆ UnpackAlphaLast()

template<typename DerivedT >
template<typename UnpackT >
static UnpackT color4_base< DerivedT >::UnpackAlphaLast ( unsigned  Color,
bool  Alpha = true 
)
inlinestatic

◆ v4()

template<typename DerivedT >
vec4 color4_base< DerivedT >::v4 ( ) const
inline

◆ WithAlpha()

template<typename DerivedT >
DerivedT color4_base< DerivedT >::WithAlpha ( float  alpha) const
inline

◆ WithMultipliedAlpha()

template<typename DerivedT >
DerivedT color4_base< DerivedT >::WithMultipliedAlpha ( float  alpha) const
inline

Member Data Documentation

◆ 

union { ... } color4_base< DerivedT >::@3

◆ 

union { ... } color4_base< DerivedT >::@5

◆ 

union { ... } color4_base< DerivedT >::@7

◆ 

union { ... } color4_base< DerivedT >::@9

◆ a

template<typename DerivedT >
float color4_base< DerivedT >::a

◆ b

template<typename DerivedT >
float color4_base< DerivedT >::b

◆ g

template<typename DerivedT >
float color4_base< DerivedT >::g

◆ h

template<typename DerivedT >
float color4_base< DerivedT >::h

◆ l

template<typename DerivedT >
float color4_base< DerivedT >::l

◆ r

template<typename DerivedT >
float color4_base< DerivedT >::r

◆ s

template<typename DerivedT >
float color4_base< DerivedT >::s

◆ v

template<typename DerivedT >
float color4_base< DerivedT >::v

◆ w

template<typename DerivedT >
float color4_base< DerivedT >::w

◆ x

template<typename DerivedT >
float color4_base< DerivedT >::x

◆ y

template<typename DerivedT >
float color4_base< DerivedT >::y

◆ z

template<typename DerivedT >
float color4_base< DerivedT >::z

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