mi::shader::Map_lookup Class Reference

Map lookup. More...

#include <shader_map.h>

List of all members.

Public Member Functions

virtual void release () const =0
 deletes the object
virtual miUint size () const =0
 returns the number of elements in the lookup
virtual bool is_empty () const =0
 returns true if the lookup is empty
virtual Map_status reset ()=0
 resets itself to point to the first element
virtual Map_status next ()=0
 moves to the next element
virtual bool at_end (Map_status *status=0) const =0
 returns true if it's beyond the end
virtual Map_status sort ()=0
 sorts the elements in ascending order of distance
virtual Map_status sort_descending ()=0
 sorts the elements in descending order of distance
virtual Map_lookup_entry get (miUint n, Map_status *status=0) const =0
 returns the nth entry of the lookup
virtual Map_lookup_entry get (Map_status *status=0) const =0
 returns the current lookup entry
virtual miUint get_index (Map_status *status=0) const =0
 returns the index in the map of the current element
virtual float get_distance (Map_status *status=0) const =0
 returns the distance of the current element
virtual Map_status get (Map_element_handle &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 search (const Map_distance_base &distance_functor, const miUint max_elements=1, const float max_search_dist=miHUGE_SCALAR) const =0
 searches for the closest elements to a given point
virtual Map_status search (const miVector &point, const miUint max_elements=1, const float max_search_dist=miHUGE_SCALAR) const =0
 searches for the closest elements to a given point, specialized case of the above for a simple quadratic distance in 3D


Detailed Description

Map lookup.

The Map lookup is an abstract class which provides access to elements which are the result of a lookup inside a map. It provides iterator functionalities over these elements


Member Function Documentation

virtual bool mi::shader::Map_lookup::at_end Map_status status = 0  )  const [pure virtual]
 

returns true if it's beyond the end

Parameters:
status is a status code

virtual Map_status mi::shader::Map_lookup::get const Map_field_id  field_id,
int *  value
const [pure virtual]
 

retrieves the value of the desired field of the current element

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::Map_lookup::get const Map_field_id  field_id,
float *  value
const [pure virtual]
 

retrieves the value of the desired field of the current element

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::Map_lookup::get const Map_field_id  field_id,
miMatrix &  value
const [pure virtual]
 

retrieves the value of the desired field of the current element

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

virtual Map_status mi::shader::Map_lookup::get const Map_field_id  field_id,
miColor &  value
const [pure virtual]
 

retrieves the value of the desired field of the current element

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::Map_lookup::get const Map_field_id  field_id,
miVector &  value
const [pure virtual]
 

retrieves the value of the desired field of the current element

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::Map_lookup::get const Map_field_id  field_id,
int &  value
const [pure virtual]
 

retrieves the value of the desired field of the current element

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::Map_lookup::get const Map_field_id  field_id,
float &  value
const [pure virtual]
 

retrieves the value of the desired field of the current element

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::Map_lookup::get Map_element_handle element  )  const [pure virtual]
 

returns a copy of the current element

Parameters:
element is the handle of the copied element
Returns:
a status code

virtual Map_lookup_entry mi::shader::Map_lookup::get Map_status status = 0  )  const [pure virtual]
 

returns the current lookup entry

Parameters:
status is a status code

virtual Map_lookup_entry mi::shader::Map_lookup::get miUint  n,
Map_status status = 0
const [pure virtual]
 

returns the nth entry of the lookup

Parameters:
n is the index of the desired entry
status is a status code

virtual float mi::shader::Map_lookup::get_distance Map_status status = 0  )  const [pure virtual]
 

returns the distance of the current element

Parameters:
status is a status code
Returns:
the distance of the current element

virtual miUint mi::shader::Map_lookup::get_index Map_status status = 0  )  const [pure virtual]
 

returns the index in the map of the current element

Parameters:
status is a status code
Returns:
the index in the map of the current element

virtual Map_status mi::shader::Map_lookup::get_position miVector &  position  )  const [pure virtual]
 

retrieves the position of the current element, 3D case

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

virtual Map_status mi::shader::Map_lookup::get_position float *  position  )  const [pure virtual]
 

retrieves the position of the current element

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

virtual Map_status mi::shader::Map_lookup::next  )  [pure virtual]
 

moves to the next element

Returns:
a status code

virtual Map_status mi::shader::Map_lookup::reset  )  [pure virtual]
 

resets itself to point to the first element

Returns:
a status code

virtual Map_status mi::shader::Map_lookup::search const miVector &  point,
const miUint  max_elements = 1,
const float  max_search_dist = miHUGE_SCALAR
const [pure virtual]
 

searches for the closest elements to a given point, specialized case of the above for a simple quadratic distance in 3D

Parameters:
point is the three dimensional search point
max_elements max num of elements to return
max_search_dist is the max search distance from point, in the quadratic metric
Returns:
a status code

virtual Map_status mi::shader::Map_lookup::search const Map_distance_base distance_functor,
const miUint  max_elements = 1,
const float  max_search_dist = miHUGE_SCALAR
const [pure virtual]
 

searches for the closest elements to a given point

Parameters:
distance_functor provides search point and distances
max_elements max num of elements to return
max_search_dist is the max search distance from point, in the same metric as the distance functor
Returns:
a status code

virtual Map_status mi::shader::Map_lookup::sort  )  [pure virtual]
 

sorts the elements in ascending order of distance

Returns:
a status code

virtual Map_status mi::shader::Map_lookup::sort_descending  )  [pure virtual]
 

sorts the elements in descending order of distance

Returns:
a status code


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

Copyright © 1986-2008 by mental images GmbH