Data Class Reference

#include <MapExtractorInterface.h>

Class Description

This structure represents the data which is calculated by the samplers, and passed to the utilizers.

This is usually a single color, but can be any of the types enumerated below...

+ Examples:

Definition at line 175 of file MapExtractorInterface.h.

Public Member Functions

 Data (void)
 
 Data (int r)
 
 Data (float r)
 
 Data (double r)
 
 Data (const mudbox::Color &r)
 
 Data (const mudbox::Vector &r)
 
 Data (const mudbox::DblVector &r)
 
 Data (const mudbox::Vector4 &r)
 
 Data (const mudbox::Quaternion &r)
 
 Data (const mudbox::Matrix &r)
 
bool IsValid (void) const
 
int As_int () const
 
float As_float () const
 
double As_double () const
 
mudbox::Color As_Color () const
 
mudbox::Vector As_Vector () const
 
mudbox::DblVector As_DblVector () const
 
mudbox::Vector4 As_Vector4 () const
 
mudbox::Quaternion As_Quaternion () const
 
mudbox::Matrix As_Matrix () const
 

Public Attributes

union {
   int   m_int [16]
 
   float   m_float [16]
 
   double   m_double [8]
 
}; 
 
bool m_valid
 

Constructor & Destructor Documentation

Data ( void  )
inline

Definition at line 186 of file MapExtractorInterface.h.

186 { m_valid = false; };
Data ( int  r)
inline

Definition at line 187 of file MapExtractorInterface.h.

187 { m_int[0] = r; m_valid = true; }
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
Data ( float  r)
inline

Definition at line 188 of file MapExtractorInterface.h.

188 { m_float[0] = r; m_float[1] = m_float[2] = 0; m_float[3] = 1; m_valid = true; }
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
Data ( double  r)
inline

Definition at line 189 of file MapExtractorInterface.h.

189 { m_double[0] = r; m_valid = true; }
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
Data ( const mudbox::Color r)
inline

Definition at line 190 of file MapExtractorInterface.h.

190  { m_float[0] = r.m_fRed; m_float[1] = r.m_fGreen;
191  m_float[2] = r.m_fBlue; m_float[3] = r.m_fAlpha; m_valid = true; }
float m_fRed
Definition: math.h:782
float m_fBlue
Definition: math.h:782
float m_fGreen
Definition: math.h:782
float m_fAlpha
Definition: math.h:782
Data ( const mudbox::Vector r)
inline

Definition at line 192 of file MapExtractorInterface.h.

192 { m_float[0] = r.x; m_float[1] = r.y; m_float[2] = r.z; m_float[3] = 1; m_valid = true; }
float z
Definition: math.h:340
float y
Definition: math.h:340
float x
Definition: math.h:340
Data ( const mudbox::DblVector r)
inline

Definition at line 193 of file MapExtractorInterface.h.

193 { m_double[0] = r.x; m_double[1] = r.y; m_double[2] = r.z; m_double[3] = 1; m_valid = true; }
double y
Definition: math.h:568
double x
Definition: math.h:568
double z
Definition: math.h:568
Data ( const mudbox::Vector4 r)
inline

Definition at line 194 of file MapExtractorInterface.h.

194  { m_float[0] = r.x; m_float[1] = r.y;
195  m_float[2] = r.z; m_float[3] = r.w; m_valid = true; }
float z
Definition: math.h:632
float y
Definition: math.h:632
float w
Definition: math.h:632
float x
Definition: math.h:632
Data ( const mudbox::Quaternion r)
inline

Definition at line 196 of file MapExtractorInterface.h.

196 { memcpy(m_float, &r.m_fW, sizeof(float) * 4); m_valid = true; }
float m_fW
Content of the quaternion represented by four scalar values.
Definition: math.h:1405
Data ( const mudbox::Matrix r)
inline

Definition at line 197 of file MapExtractorInterface.h.

197 { memcpy(m_float, r.m_fData, sizeof(float) * 16); m_valid = true; }
float m_fData[16]
Definition: math.h:1278

Member Function Documentation

bool IsValid ( void  ) const
inline

Definition at line 198 of file MapExtractorInterface.h.

int As_int ( ) const
inline

Definition at line 200 of file MapExtractorInterface.h.

200 { return m_int[0]; }
float As_float ( ) const
inline

Definition at line 201 of file MapExtractorInterface.h.

201 { return m_float[0]; }
double As_double ( ) const
inline

Definition at line 202 of file MapExtractorInterface.h.

202 { return m_double[0]; }
mudbox::Color As_Color ( ) const
inline

Definition at line 203 of file MapExtractorInterface.h.

203 { return mudbox::Color(m_float[0], m_float[1], m_float[2], m_float[3]); }
Represents a color with four components: red, green, blue, alpha.
Definition: math.h:674
mudbox::Vector As_Vector ( ) const
inline

Definition at line 204 of file MapExtractorInterface.h.

204 { return mudbox::Vector(m_float[0], m_float[1], m_float[2]); }
Represents a 3D vector or point with S23E8 floating point elements.
Definition: math.h:35
mudbox::DblVector As_DblVector ( ) const
inline

Definition at line 205 of file MapExtractorInterface.h.

205 { return mudbox::DblVector(m_double[0], m_double[1], m_double[2]); }
Represents a 3D vector or point with S56E11 floating point elements.
Definition: math.h:348
mudbox::Vector4 As_Vector4 ( ) const
inline

Definition at line 206 of file MapExtractorInterface.h.

206 { return mudbox::Vector4(m_float[0], m_float[1], m_float[2], m_float[3]); }
A four dimensionsional vector (X, Y, Z, and W)
Definition: math.h:617
mudbox::Quaternion As_Quaternion ( ) const
inline

Definition at line 207 of file MapExtractorInterface.h.

207 { mudbox::Quaternion q; memcpy(&q.m_fW, m_float, sizeof(float) * 4); return q; }
The Quaternion class is used to represent rotations in most cases.
Definition: math.h:1300
float m_fW
Content of the quaternion represented by four scalar values.
Definition: math.h:1405
GLdouble GLdouble GLdouble GLdouble q
Definition: GLee.h:1197
mudbox::Matrix As_Matrix ( ) const
inline

Definition at line 208 of file MapExtractorInterface.h.

208 { mudbox::Matrix m; memcpy(m.m_fData, m_float, sizeof(float) * 16); return m; }
float m_fData[16]
Definition: math.h:1278
This class represents a 4x4 transformation matrix.
Definition: math.h:1122

Member Data Documentation

int m_int[16]

Definition at line 179 of file MapExtractorInterface.h.

float m_float[16]

Definition at line 180 of file MapExtractorInterface.h.

double m_double[8]

Definition at line 181 of file MapExtractorInterface.h.

union { ... }
bool m_valid

Definition at line 184 of file MapExtractorInterface.h.


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