mi::shader_v3::Map_distance< DIM > Class Template Reference

Map_distance<DIM> class. 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. More...

#include <shader_map.h>

Inheritance diagram for mi::shader_v3::Map_distance< DIM >:

mi::shader_v3::Map_distance_base mi::shader_v3::Map_quad_distance< DIM > List of all members.

Public Member Functions

 Map_distance ()
 empty constructor.
 Map_distance (const float *point)
 constructor.
const 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

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

Detailed Description

template<miUint DIM>
class mi::shader_v3::Map_distance< DIM >

Map_distance<DIM> class. 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.


Constructor & Destructor Documentation

template<miUint DIM>
mi::shader_v3::Map_distance< DIM >::Map_distance const float *  point  )  [inline]
 

constructor.

Parameters:
point is the search point


Member Function Documentation

template<miUint DIM>
const miUint mi::shader_v3::Map_distance< DIM >::get_dimension  )  const [inline, virtual]
 

returns the dimension of the functor.

Returns:
the dimension of the functor

Implements mi::shader_v3::Map_distance_base.

template<miUint DIM>
const float* mi::shader_v3::Map_distance< DIM >::get_point  )  const [inline, virtual]
 

returns the search point.

Returns:
a pointer to the search point

Implements mi::shader_v3::Map_distance_base.

template<miUint DIM>
virtual float mi::shader_v3::Map_distance< DIM >::operator() const Map_iterator_base element  )  const [pure virtual]
 

returns the quadratic distance from an element.

Parameters:
element is the current element
Returns:
the quadratic distance from the element

Implements mi::shader_v3::Map_distance_base.

Implemented in mi::shader_v3::Map_quad_distance< DIM >.

template<miUint DIM>
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.

Parameters:
min is the minimum point of the bounding box
max is the maximum point of the bounding box
Returns:
the quadratic distance from the bounding box

Implements mi::shader_v3::Map_distance_base.


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

Copyright © 1986-2008 by mental images GmbH