#include <shader_map.h>

| Public Member Functions | |
| Map_distance () | |
| empty constructor. | |
| Map_distance (const float *point) | |
| constructor. | |
| miUint | get_dimension () const | 
| returns the dimension of the functor. | |
| const float * | get_point () const | 
| returns the search point. | |
| float | operator() (const float *min, const float *max) const | 
| returns the quadratic distance from a
bounding box. | |
| virtual float | operator() (const Map_iterator_base *element) const =0 | 
| returns the quadratic distance from an
element. | |
| Static Public Attributes | |
| static const miUint | DIMENSION = DIM | 
| DIMENSION of the distance functor, same of
the map. | |
| Protected Attributes | |
| float | m_point [DIM] | 
| m_point is the search point | |
The Map_distance class is an interface template class, which defines all the virtual methods of Map_distance_base class except the distance from an element. The distance from a bounding box is quadratic.
| mi::shader_v3::Map_distance< DIM >::Map_distance | ( | const float * | point | ) | [inline] | 
constructor.
| point | is the search point | 
References mi::shader_v3::Map_distance< DIM >::DIMENSION, and mi::shader_v3::Map_distance< DIM >::m_point.
| miUint mi::shader_v3::Map_distance< DIM >::get_dimension | ( | ) | const [inline, virtual] | 
returns the dimension of the functor.
Implements mi::shader_v3::Map_distance_base.
References mi::shader_v3::Map_distance< DIM >::DIMENSION.
| const float* mi::shader_v3::Map_distance< DIM >::get_point | ( | ) | const [inline, virtual] | 
returns the search point.
Implements mi::shader_v3::Map_distance_base.
References mi::shader_v3::Map_distance< DIM >::m_point.
| float mi::shader_v3::Map_distance< DIM >::operator() | ( | const float * | min, | |
| const float * | max | |||
| ) | const [inline, virtual] | 
returns the quadratic distance from a bounding box.
| min | is the minimum point of the bounding box | |
| max | is the maximum point of the bounding box | 
Implements mi::shader_v3::Map_distance_base.
References mi::shader_v3::Map_distance< DIM >::DIMENSION, and mi::shader_v3::Map_distance< DIM >::m_point.
| virtual float mi::shader_v3::Map_distance< DIM >::operator() | ( | const Map_iterator_base * | element | ) | const [pure virtual] | 
returns the quadratic distance from an element.
| element | is the current element | 
Implements mi::shader_v3::Map_distance_base.
Implemented in mi::shader_v3::Map_quad_distance< DIM >.
Copyright © 1986-2010 by
mental images GmbH