#include <shader_map.h>
Public Member Functions |
|
virtual void | release () const =0 |
deletes the object. |
|
virtual Map_status | reset () const =0 |
resets itself to point to the first element.
|
|
virtual Map_status | set_to (const miUint index) const =0 |
moves to the desired element. |
|
virtual Map_status | next () const =0 |
moves to the next element. |
|
virtual Map_status | previous () const =0 |
moves to the previous element. |
|
virtual Map_status | skip (const miUint amount) const =0 |
skips the desired number of elements.
|
|
virtual bool | at_end (Map_status *status=0) const =0 |
returns true if it's beyond the end.
|
|
virtual miUint | current (Map_status *status=0) const =0 |
returns the index of the element it points
to. |
|
virtual Map_status | get (Map_element &element) const =0 |
returns a copy of the current element.
|
|
virtual Map_status | get_position (float *position) const =0 |
retrieves the position of the current
element. |
|
virtual Map_status | get_position (miVector &position) const =0 |
retrieves the position of the current
element, 3D case. |
|
virtual Map_status | get (const Map_field_id field_id, float &value) const =0 |
retrieves the value of the desired field of
the current element. |
|
virtual Map_status | get (const Map_field_id field_id, int &value) const =0 |
retrieves the value of the desired field of
the current element. |
|
virtual Map_status | get (const Map_field_id field_id, miVector &value) const =0 |
retrieves the value of the desired field of
the current element. |
|
virtual Map_status | get (const Map_field_id field_id, miColor &value) const =0 |
retrieves the value of the desired field of
the current element. |
|
virtual Map_status | get (const Map_field_id field_id, miMatrix *value) const =0 |
retrieves the value of the desired field of
the current element. |
|
virtual Map_status | get (const Map_field_id field_id, float *value) const =0 |
retrieves the value of the desired field of
the current element. |
|
virtual Map_status | get (const Map_field_id field_id, int *value) const =0 |
retrieves the value of the desired field of
the current element. |
|
virtual Map_status | set (const Map_element &element)=0 |
sets the current element. |
|
virtual Map_status | set_position (const float *position)=0 |
sets the position of the current element.
|
|
virtual Map_status | set_position (const miVector &position)=0 |
sets the position of the current element, 3D
case. |
|
virtual Map_status | set (const Map_field_id field_id, const float value)=0 |
sets the value of the desired field of the
current element. |
|
virtual Map_status | set (const Map_field_id field_id, const int value)=0 |
sets the value of the desired field of the
current element. |
|
virtual Map_status | set (const Map_field_id field_id, const miVector &value)=0 |
sets the value of the desired field of the
current element. |
|
virtual Map_status | set (const Map_field_id field_id, const miColor &value)=0 |
sets the value of the desired field of the
current element. |
|
virtual Map_status | set (const Map_field_id field_id, const miMatrix *value)=0 |
sets the value of the desired field of the
current element. |
|
virtual Map_status | set (const Map_field_id field_id, const float *value)=0 |
sets the value of the desired field of the
current element. |
|
virtual Map_status | set (const Map_field_id field_id, const int *value)=0 |
sets the value of the desired field of the
current element. |
The Map_iterator_base class is an interface class which provides access to the elements of the map without having to copy them first. The constness of its methods refers actually to the constness of the map it's attached to, not to the constness of the iterator itself: for instance, the 'set' methods are non-const because they change the map, even if they don't change the iterator state; conversely, the 'reset' method is const even if it does change the state of the iterator, but the map itself is untouched. There are two wrapper classes which provide a convenient way to manage this class: the Access_map_iterator class (iterator with read-only access to a map) and the Edit_map_iterator class (iterator with read-write access to a map). For example, a shader might attach a map iterator to a map and use it in the following way:
// 'map' is a Access_map. 'it' is attached to the map, and it points // to the first element of the map Access_map_iterator it (map); for ( ; !it->at_end() ; it->next() ) { ... }
virtual Map_status mi::shader_v3::Map_iterator_base::reset | ( | ) | const [pure virtual] |
resets itself to point to the first element.
virtual Map_status mi::shader_v3::Map_iterator_base::set_to | ( | const miUint | index | ) | const [pure virtual] |
moves to the desired element.
index | is the index of the element to move to |
virtual Map_status mi::shader_v3::Map_iterator_base::next | ( | ) | const [pure virtual] |
moves to the next element.
virtual Map_status mi::shader_v3::Map_iterator_base::previous | ( | ) | const [pure virtual] |
moves to the previous element.
virtual Map_status mi::shader_v3::Map_iterator_base::skip | ( | const miUint | amount | ) | const [pure virtual] |
skips the desired number of elements.
amount | is the number of elements to skip |
virtual bool mi::shader_v3::Map_iterator_base::at_end | ( | Map_status * | status = 0 |
) | const [pure virtual] |
returns true if it's beyond the end.
status | is a status code |
virtual miUint mi::shader_v3::Map_iterator_base::current | ( | Map_status * | status = 0 |
) | const [pure virtual] |
returns the index of the element it points to.
status | is a status code |
virtual Map_status mi::shader_v3::Map_iterator_base::get | ( | Map_element & | element | ) | const [pure virtual] |
returns a copy of the current element.
element | is the element which will hold the copy |
virtual Map_status mi::shader_v3::Map_iterator_base::get_position | ( | float * | position | ) | const [pure virtual] |
retrieves the position of the current element.
position | is the output array |
Referenced by mi::shader_v3::Map_quad_distance< DIM >::operator()().
virtual Map_status mi::shader_v3::Map_iterator_base::get_position | ( | miVector & | position | ) | const [pure virtual] |
retrieves the position of the current element, 3D case.
position | is the output vector |
virtual Map_status mi::shader_v3::Map_iterator_base::get | ( | const Map_field_id | field_id, | |
float & | value | |||
) | const [pure virtual] |
retrieves the value of the desired field of the current element.
field_id | is the id of the desired field | |
value | is the float output value |
virtual Map_status mi::shader_v3::Map_iterator_base::get | ( | const Map_field_id | field_id, | |
int & | value | |||
) | const [pure virtual] |
retrieves the value of the desired field of the current element.
field_id | is the id of the desired field | |
value | is the integer output value |
virtual Map_status mi::shader_v3::Map_iterator_base::get | ( | const Map_field_id | field_id, | |
miVector & | value | |||
) | const [pure virtual] |
retrieves the value of the desired field of the current element.
field_id | is the id of the desired field | |
value | is the vector output value |
virtual Map_status mi::shader_v3::Map_iterator_base::get | ( | const Map_field_id | field_id, | |
miColor & | value | |||
) | const [pure virtual] |
retrieves the value of the desired field of the current element.
field_id | is the id of the desired field | |
value | is the color output value |
virtual Map_status mi::shader_v3::Map_iterator_base::get | ( | const Map_field_id | field_id, | |
miMatrix * | value | |||
) | const [pure virtual] |
retrieves the value of the desired field of the current element.
NOTE: 'value' is a pointer to a miMatrix.
field_id | is the id of the desired field | |
value | is the pointer to the transform output value |
virtual Map_status mi::shader_v3::Map_iterator_base::get | ( | const Map_field_id | field_id, | |
float * | value | |||
) | const [pure virtual] |
retrieves the value of the desired field of the current element.
field_id | is the id of the desired field | |
value | is the float array output value |
virtual Map_status mi::shader_v3::Map_iterator_base::get | ( | const Map_field_id | field_id, | |
int * | value | |||
) | const [pure virtual] |
retrieves the value of the desired field of the current element.
field_id | is the id of the desired field | |
value | is the integer array output value |
virtual Map_status mi::shader_v3::Map_iterator_base::set | ( | const Map_element & | element | ) | [pure virtual] |
sets the current element.
element | is the element to set |
virtual Map_status mi::shader_v3::Map_iterator_base::set_position | ( | const float * | position | ) | [pure virtual] |
sets the position of the current element.
position | is the input array |
virtual Map_status mi::shader_v3::Map_iterator_base::set_position | ( | const miVector & | position | ) | [pure virtual] |
sets the position of the current element, 3D case.
position | is the input vector |
virtual Map_status mi::shader_v3::Map_iterator_base::set | ( | const Map_field_id | field_id, | |
const float | value | |||
) | [pure virtual] |
sets the value of the desired field of the current element.
field_id | is the id of the desired field | |
value | is the float input value |
virtual Map_status mi::shader_v3::Map_iterator_base::set | ( | const Map_field_id | field_id, | |
const int | value | |||
) | [pure virtual] |
sets the value of the desired field of the current element.
field_id | is the id of the desired field | |
value | is the integer input value |
virtual Map_status mi::shader_v3::Map_iterator_base::set | ( | const Map_field_id | field_id, | |
const miVector & | value | |||
) | [pure virtual] |
sets the value of the desired field of the current element.
field_id | is the id of the desired field | |
value | is the vector input value |
virtual Map_status mi::shader_v3::Map_iterator_base::set | ( | const Map_field_id | field_id, | |
const miColor & | value | |||
) | [pure virtual] |
sets the value of the desired field of the current element.
field_id | is the id of the desired field | |
value | is the color input value |
virtual Map_status mi::shader_v3::Map_iterator_base::set | ( | const Map_field_id | field_id, | |
const miMatrix * | value | |||
) | [pure virtual] |
sets the value of the desired field of the current element.
NOTE: 'value' is a pointer to a miMatrix.
field_id | is the id of the desired field | |
value | is the pointer to the transform output value |
virtual Map_status mi::shader_v3::Map_iterator_base::set | ( | const Map_field_id | field_id, | |
const float * | value | |||
) | [pure virtual] |
sets the value of the desired field of the current element.
field_id | is the id of the desired field | |
value | is the float array input value |
virtual Map_status mi::shader_v3::Map_iterator_base::set | ( | const Map_field_id | field_id, | |
const int * | value | |||
) | [pure virtual] |
sets the value of the desired field of the current element.
field_id | is the id of the desired field | |
value | is the integer array input value |
Copyright © 1986-2010 by
mental images GmbH