Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

vuMCKeyVector Class Reference

Displays a key-value-pair where the value is a vector. More...

#include <vuMarchingCubes.h>

Inheritance diagram for vuMCKeyVector:

Inheritance graph
[legend]
Collaboration diagram for vuMCKeyVector:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuMCKeyVector ()
 wxWindows needs a default constructor so we define an empty one.
 vuMCKeyVector (wxWindow *p, const char *key, int size, const char *format)
 My default constructor.
virtual ~vuMCKeyVector ()
 Destructor.
void operator() (int n, GLfloat val)
 Vector value setter.
GLfloat Get (int i)
 operator const GLfloat * ()
 Vector getter.
void Inc (int n, GLfloat val)
 Imcrement component n of the vector by val.
vuMCKeyVectoroperator[] (int n)
 Selects a element of the vector.
virtual void operator= (GLfloat v)
 Set component _pos of the vector to v.
void operator+= (GLfloat val)
 Increment component _pos of the vector by val.
void operator-= (GLfloat val)
 Decrement component _pos of the vector by val.
 DECLARE_DYNAMIC_CLASS (vuMCKeyVector)
 DECLARE_EVENT_TABLE ()

Private Member Functions

void _updateLabel ()
 Construct the label from _vector.

Private Attributes

GLfloat _vector [VU_MCKV_MAX_SIZE]
int _size
 Actual size of the vector.
int _pos
 State for the operator[].
wxString _mylabel

Detailed Description

Displays a key-value-pair where the value is a vector.

This class makes use of the functionallity already implemented in vuMCKeyValue.

Internally the class calculates the string to be displayed and passes it to the label in vuMCKeyValue via vuMCKeyValue::Label().

Several operators are implemented to set the values of the vector. This is realized by implementing a state machine (member _pos). operator[] sets up the state machine while all other operators (the manipulating operators, such as operator=) us this state.

Definition at line 411 of file vuMarchingCubes.h.


Constructor & Destructor Documentation

vuMCKeyVector::vuMCKeyVector  )  [inline]
 

wxWindows needs a default constructor so we define an empty one.

Definition at line 433 of file vuMarchingCubes.h.

vuMCKeyVector::vuMCKeyVector wxWindow *  p,
const char *  key,
int  size,
const char *  format
 

My default constructor.

Definition at line 152 of file vuMarchingCubes.cpp.

References DEBUGC, and size.

vuMCKeyVector::~vuMCKeyVector  )  [virtual]
 

Destructor.

Definition at line 163 of file vuMarchingCubes.cpp.

References DEBUGD.


Member Function Documentation

void vuMCKeyVector::_updateLabel  )  [private]
 

Construct the label from _vector.

Definition at line 168 of file vuMarchingCubes.cpp.

References _vector, DEBUG0, DEBUG1, and vuMCKeyValue::Label().

Referenced by Inc(), operator()(), operator+=(), operator-=(), and operator=().

Here is the call graph for this function:

vuMCKeyVector::DECLARE_DYNAMIC_CLASS vuMCKeyVector   ) 
 

vuMCKeyVector::DECLARE_EVENT_TABLE  ) 
 

Reimplemented from vuMCKeyValue.

GLfloat vuMCKeyVector::Get int  i  ) 
 

Definition at line 187 of file vuMarchingCubes.cpp.

References _size, _vector, assert, DEBUG0, and GLfloat.

Referenced by vuMarchingCubes::glRender(), and vuMarchingCubes::onMouseLeftMoving().

void vuMCKeyVector::Inc int  n,
GLfloat  val
 

Imcrement component n of the vector by val.

Definition at line 200 of file vuMarchingCubes.cpp.

References _size, _updateLabel(), _vector, assert, DEBUG0, and GLfloat.

Here is the call graph for this function:

vuMCKeyVector::operator const GLfloat *  ) 
 

Vector getter.

Definition at line 194 of file vuMarchingCubes.cpp.

References DEBUG0.

void vuMCKeyVector::operator() int  n,
GLfloat  val
 

Vector value setter.

Definition at line 179 of file vuMarchingCubes.cpp.

References _size, _updateLabel(), _vector, assert, DEBUG0, and GLfloat.

Here is the call graph for this function:

void vuMCKeyVector::operator+= GLfloat  val  )  [virtual]
 

Increment component _pos of the vector by val.

Reimplemented from vuMCKeyValue.

Definition at line 227 of file vuMarchingCubes.cpp.

References _pos, _updateLabel(), _vector, assert, DEBUG0, and GLfloat.

Here is the call graph for this function:

void vuMCKeyVector::operator-= GLfloat  val  )  [virtual]
 

Decrement component _pos of the vector by val.

Reimplemented from vuMCKeyValue.

Definition at line 235 of file vuMarchingCubes.cpp.

References _pos, _updateLabel(), _vector, assert, DEBUG0, and GLfloat.

Here is the call graph for this function:

void vuMCKeyVector::operator= GLfloat  v  )  [virtual]
 

Set component _pos of the vector to v.

Reimplemented from vuMCKeyValue.

Definition at line 219 of file vuMarchingCubes.cpp.

References _pos, _updateLabel(), _vector, assert, DEBUG0, and GLfloat.

Here is the call graph for this function:

vuMCKeyVector & vuMCKeyVector::operator[] int  n  ) 
 

Selects a element of the vector.

This operator also sets up the state machine (_pos) which other operaters use to manipulate the vector.

Definition at line 211 of file vuMarchingCubes.cpp.

References _pos, _size, assert, and DEBUG0.


Member Data Documentation

wxString vuMCKeyVector::_mylabel [private]
 

Definition at line 425 of file vuMarchingCubes.h.

int vuMCKeyVector::_pos [private]
 

State for the operator[].

It is initialized with -1 which means "no position".

Definition at line 423 of file vuMarchingCubes.h.

Referenced by operator+=(), operator-=(), operator=(), and operator[]().

int vuMCKeyVector::_size [private]
 

Actual size of the vector.

Definition at line 418 of file vuMarchingCubes.h.

Referenced by Get(), Inc(), operator()(), and operator[]().

GLfloat vuMCKeyVector::_vector[VU_MCKV_MAX_SIZE] [private]
 

Definition at line 415 of file vuMarchingCubes.h.

Referenced by _updateLabel(), Get(), Inc(), operator()(), operator+=(), operator-=(), and operator=().


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 21:21:35 2004 for vuVolume by  doxygen 1.3.9.1