mi::shader_v3::Map_element_base Class Reference

Map_element_base class. More...

#include <shader_map.h>

List of all members.

Public Member Functions

virtual void release () const =0
 deletes the object.
virtual Map_status set_declaration (const Map_declaration &declaration)=0
 sets the declaration of the element.
virtual Map_status get_position (float *position) const =0
 retrieves the position of the element.
virtual Map_status get_position (miVector &position) const =0
 retrieves the position of the element, 3D case.
virtual Map_status get (const Map_field_id field_id, float &value) const =0
 retrieves the value of the desired field.
virtual Map_status get (const Map_field_id field_id, int &value) const =0
 retrieves the value of the desired field.
virtual Map_status get (const Map_field_id field_id, miVector &value) const =0
 retrieves the value of the desired field.
virtual Map_status get (const Map_field_id field_id, miColor &value) const =0
 retrieves the value of the desired field.
virtual Map_status get (const Map_field_id field_id, miMatrix *value) const =0
 retrieves the value of the desired field. NOTE: 'value' is a pointer to a miMatrix.
virtual Map_status get (const Map_field_id field_id, float *value) const =0
 retrieves the value of the desired field.
virtual Map_status get (const Map_field_id field_id, int *value) const =0
 retrieves the value of the desired field.
virtual Map_status set_position (const float *position)=0
 sets the position of the element.
virtual Map_status set_position (const miVector &position)=0
 sets the position of the element, 3D case.
virtual Map_status set (const Map_field_id field_id, const float value)=0
 sets the value of the desired field.
virtual Map_status set (const Map_field_id field_id, const int value)=0
 sets the value of the desired field.
virtual Map_status set (const Map_field_id field_id, const miVector &value)=0
 sets the value of the desired field.
virtual Map_status set (const Map_field_id field_id, const miColor &value)=0
 sets the value of the desired field.
virtual Map_status set (const Map_field_id field_id, const miMatrix *value)=0
 sets the value of the desired field. NOTE: 'value' is a pointer to a miMatrix.
virtual Map_status set (const Map_field_id field_id, const float *value)=0
 sets the value of the desired field.
virtual Map_status set (const Map_field_id field_id, const int *value)=0
 sets the value of the desired field.


Detailed Description

Map_element_base class.

The Map_element_base class is an interface class that represents a map element, which is an isolated and independent piece of data, made up by a declaration and a set of values for its fields. It provides ways to get/set the values of the fields. There is a wrapper class which provides a convenient way to manage this class, which is the Map_element class. For example, a shader might create and use a map element in the following way:

    // creates a map element which has the specified declaration
    Map_element element (declaration);
   
    miVector pos = ...;
    element->set_position (pos);
   
    miColor color = ...;
    element->set (color_field_id, color);
    ...


Member Function Documentation

virtual Map_status mi::shader_v3::Map_element_base::get const Map_field_id  field_id,
int *  value
const [pure virtual]
 

retrieves the value of the desired field.

Parameters:
field_id is the id of the desired field
value is the integer array output value
Returns:
a status code

virtual Map_status mi::shader_v3::Map_element_base::get const Map_field_id  field_id,
float *  value
const [pure virtual]
 

retrieves the value of the desired field.

Parameters:
field_id is the id of the desired field
value is the float array output value
Returns:
a status code

virtual Map_status mi::shader_v3::Map_element_base::get const Map_field_id  field_id,
miMatrix *  value
const [pure virtual]
 

retrieves the value of the desired field. NOTE: 'value' is a pointer to a miMatrix.

Parameters:
field_id is the id of the desired field
value is the pointer to the transform output value
Returns:
a status code

virtual Map_status mi::shader_v3::Map_element_base::get const Map_field_id  field_id,
miColor &  value
const [pure virtual]
 

retrieves the value of the desired field.

Parameters:
field_id is the id of the desired field
value is the color output value
Returns:
a status code

virtual Map_status mi::shader_v3::Map_element_base::get const Map_field_id  field_id,
miVector &  value
const [pure virtual]
 

retrieves the value of the desired field.

Parameters:
field_id is the id of the desired field
value is the vector output value
Returns:
a status code

virtual Map_status mi::shader_v3::Map_element_base::get const Map_field_id  field_id,
int &  value
const [pure virtual]
 

retrieves the value of the desired field.

Parameters:
field_id is the id of the desired field
value is the integer output value
Returns:
a status code

virtual Map_status mi::shader_v3::Map_element_base::get const Map_field_id  field_id,
float &  value
const [pure virtual]
 

retrieves the value of the desired field.

Parameters:
field_id is the id of the desired field
value is the float output value
Returns:
a status code

virtual Map_status mi::shader_v3::Map_element_base::get_position miVector &  position  )  const [pure virtual]
 

retrieves the position of the element, 3D case.

Parameters:
position is the output vector
Returns:
a status code

virtual Map_status mi::shader_v3::Map_element_base::get_position float *  position  )  const [pure virtual]
 

retrieves the position of the element.

Parameters:
position is the output array
Returns:
a status code

virtual Map_status mi::shader_v3::Map_element_base::set const Map_field_id  field_id,
const int *  value
[pure virtual]
 

sets the value of the desired field.

Parameters:
field_id is the id of the desired field
value is the integer array input value
Returns:
a status code

virtual Map_status mi::shader_v3::Map_element_base::set const Map_field_id  field_id,
const float *  value
[pure virtual]
 

sets the value of the desired field.

Parameters:
field_id is the id of the desired field
value is the float array input value
Returns:
a status code

virtual Map_status mi::shader_v3::Map_element_base::set const Map_field_id  field_id,
const miMatrix *  value
[pure virtual]
 

sets the value of the desired field. NOTE: 'value' is a pointer to a miMatrix.

Parameters:
field_id is the id of the desired field
value is the pointer to the transform input value
Returns:
a status code

virtual Map_status mi::shader_v3::Map_element_base::set const Map_field_id  field_id,
const miColor &  value
[pure virtual]
 

sets the value of the desired field.

Parameters:
field_id is the id of the desired field
value is the color input value
Returns:
a status code

virtual Map_status mi::shader_v3::Map_element_base::set const Map_field_id  field_id,
const miVector &  value
[pure virtual]
 

sets the value of the desired field.

Parameters:
field_id is the id of the desired field
value is the vector input value
Returns:
a status code

virtual Map_status mi::shader_v3::Map_element_base::set const Map_field_id  field_id,
const int  value
[pure virtual]
 

sets the value of the desired field.

Parameters:
field_id is the id of the desired field
value is the integer input value
Returns:
a status code

virtual Map_status mi::shader_v3::Map_element_base::set const Map_field_id  field_id,
const float  value
[pure virtual]
 

sets the value of the desired field.

Parameters:
field_id is the id of the desired field
value is the float input value
Returns:
a status code

virtual Map_status mi::shader_v3::Map_element_base::set_declaration const Map_declaration declaration  )  [pure virtual]
 

sets the declaration of the element.

Parameters:
declaration is the handle of the declaration
Returns:
a status code

virtual Map_status mi::shader_v3::Map_element_base::set_position const miVector &  position  )  [pure virtual]
 

sets the position of the element, 3D case.

Parameters:
position is the input vector
Returns:
a status code

virtual Map_status mi::shader_v3::Map_element_base::set_position const float *  position  )  [pure virtual]
 

sets the position of the element.

Parameters:
position is the input array
Returns:
a status code

Copyright © 1986-2009 by mental images GmbH