24#include <util/coExport.h>
84inline void packRGBA(
int *pc,
int pos,
float r,
float g,
float b,
float a)
90 chptr = (
unsigned char *)&pc[pos];
92 *chptr = (
unsigned char)(a * 255.0);
94 *chptr = (
unsigned char)(b * 255.0);
96 *chptr = (
unsigned char)(g * 255.0);
98 *chptr = (
unsigned char)(r * 255.0);
100 *chptr = (
unsigned char)(r * 255.0);
102 *chptr = (
unsigned char)(g * 255.0);
104 *chptr = (
unsigned char)(b * 255.0);
106 *chptr = (
unsigned char)(a * 255.0);
111inline void unpackRGBA(
const int *pc,
int pos,
float *r,
float *g,
float *b,
float *a)
115 const unsigned char *chptr;
117 chptr = (
const unsigned char *)&pc[pos];
119 *a = ((float)(*chptr)) / 255.0f;
121 *b = ((float)(*chptr)) / 255.0f;
123 *g = ((float)(*chptr)) / 255.0f;
125 *r = ((float)(*chptr)) / 255.0f;
127 *r = ((float)(*chptr)) / 255.0f;
129 *g = ((float)(*chptr)) / 255.0f;
131 *b = ((float)(*chptr)) / 255.0f;
133 *a = ((float)(*chptr)) / 255.0f;
170 virtual void getSize(
int &nx,
int &ny,
int &nz)
const = 0;
171 virtual float getMin(
int channel)
const = 0;
172 virtual float getMax(
int channel)
const = 0;
174 float &ymin,
float &ymax,
175 float &zmin,
float &zmax)
const = 0;
Definition: ARToolKit.h:33
void unpackRGBA(const int *pc, int pos, float *r, float *g, float *b, float *a)
Definition: RenderObject.h:111
void packRGBA(int *pc, int pos, float r, float g, float b, float a)
Definition: RenderObject.h:84
Definition: RenderObject.h:31
@ OverAll
Definition: RenderObject.h:37
@ PerFace
Definition: RenderObject.h:35
@ None
Definition: RenderObject.h:36
@ PerVertex
Definition: RenderObject.h:34
Definition: RenderObject.h:42
@ RGBA
Definition: RenderObject.h:46
@ None
Definition: RenderObject.h:45
@ Texture
Definition: RenderObject.h:47
@ Float
Definition: RenderObject.h:48
Definition: RenderObject.h:53
Id
Definition: RenderObject.h:55
@ Channel1
Definition: RenderObject.h:57
@ Red
Definition: RenderObject.h:68
@ Channel3
Definition: RenderObject.h:59
@ Z
Definition: RenderObject.h:67
@ Blue
Definition: RenderObject.h:70
@ Channel6
Definition: RenderObject.h:62
@ Connections
Definition: RenderObject.h:75
@ NumChannels
Definition: RenderObject.h:64
@ Y
Definition: RenderObject.h:66
@ ColorMap
Definition: RenderObject.h:77
@ RGBA
Definition: RenderObject.h:71
@ Channel7
Definition: RenderObject.h:63
@ Byte
Definition: RenderObject.h:72
@ Texture
Definition: RenderObject.h:73
@ Channel4
Definition: RenderObject.h:60
@ Channel2
Definition: RenderObject.h:58
@ Channel0
Definition: RenderObject.h:56
@ Elements
Definition: RenderObject.h:74
@ X
Definition: RenderObject.h:65
@ Channel5
Definition: RenderObject.h:61
@ Green
Definition: RenderObject.h:69
@ Types
Definition: RenderObject.h:76
base class for data received from visualization systems (e.g. COVISE or Vistle)
Definition: RenderObject.h:147
virtual void getSize(int &nx, int &ny, int &nz) const =0
virtual bool isUnstructuredGrid() const =0
virtual const unsigned char * getByte(Field::Id idx) const =0
virtual bool isSet() const =0
virtual bool isUniformGrid() const =0
virtual RenderObject * getTexture() const =0
virtual RenderObject * getGeometry() const =0
virtual RenderObject * getColorMap(int idx) const =0
virtual float getMax(int channel) const =0
virtual bool isVectors() const =0
virtual RenderObject * getColors() const =0
virtual float getMin(int channel) const =0
virtual const int * getInt(Field::Id idx) const =0
virtual bool isGeometry() const =0
virtual RenderObject * getElement(size_t idx) const =0
virtual RenderObject * getVertexAttribute() const =0
virtual const float * getFloat(Field::Id idx) const =0
virtual void getMinMax(float &xmin, float &xmax, float &ymin, float &ymax, float &zmin, float &zmax) const =0
virtual size_t getNumElements() const =0
virtual const char * getName() const =0
virtual const char * getAttribute(const char *) const =0
virtual RenderObject * getNormals() const =0