DDraceNetwork Docs
color4_base< DerivedT > Class Template Reference

#include <color.h>

Public Member Functions

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

Static Public Member Functions

template<typename UnpackT >
static constexpr 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 >
constexpr color4_base< DerivedT >::color4_base ( )
inlineconstexpr

◆ color4_base() [2/6]

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

◆ color4_base() [3/6]

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

◆ color4_base() [4/6]

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

◆ color4_base() [5/6]

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

◆ color4_base() [6/6]

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

Member Function Documentation

◆ Multiply()

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

◆ operator vec4()

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

◆ operator!=()

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

◆ operator==()

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

◆ operator[]()

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

◆ Pack()

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

◆ PackAlphaLast()

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

◆ UnpackAlphaLast()

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

◆ v4()

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

◆ WithAlpha()

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

◆ WithMultipliedAlpha()

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

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: