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

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

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

References mi::shader_v3::Map_distance< DIM >::DIMENSION, and mi::shader_v3::Map_distance< DIM >::m_point.


Member Function Documentation

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

References mi::shader_v3::Map_distance< DIM >::DIMENSION.

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.

References mi::shader_v3::Map_distance< DIM >::m_point.

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.

References mi::shader_v3::Map_distance< DIM >::DIMENSION, and mi::shader_v3::Map_distance< DIM >::m_point.

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 >.

Copyright © 1986-2010 by mental images GmbH