HyperspaceExplorer 0.7.1
Functions | Variables
DepthCueUtil Namespace Reference

Functions used for calculating four-dimensional depth cue. More...

Functions

void checkMinimum (const VecMath::Vector< 4, double > &, const VecMath::Vector< 4, double > &xtrans)
void resetMin ()
void findMinimumW (Displayable *object)
void checkMaximum (const VecMath::Vector< 4, double > &, const VecMath::Vector< 4, double > &xtrans)
void resetMax ()
void findMaximumW (Displayable *object)
void determineExtrema (Displayable *object)
 Scans all vertices of the object, setting the upper and lower boundaries in all dimensions.
VecMath::Vector< 4 > getMax ()
 The upper boundary of the transformed object in all dimensions.
VecMath::Vector< 4 > getMin ()
 The lower boundary of the transformed object in all dimensions.
void setDepthCueColor (const VecMath::Vector< 4, double > &x, const VecMath::Vector< 4, double > &xtrans)
 Sets the 4D depth cue for a single transformed vertex xtrans.
float getColorComponent (unsigned i, const VecMath::Vector< 4, double > &x)
 A value between 0 and 1, how far component i of vector x lies between the extrema in the i th dimension.
void calibrateColor3D (const VecMath::Vector< 4, double > &x)
 Default calibration of the ColorManager for a single vertex x.
void calibrateColorForSurface (const VecMath::Vector< 4, double > &x)
 Color calibration function used in class Surface.

Variables

static Vector< 4 > min
static Vector< 4 > max

Detailed Description

Functions used for calculating four-dimensional depth cue.

Because these functions are parameters to Displayable::for_each_vertex(), they need to be global to fit the signature.

namespace DepthCueUtil can and will be added to in other source files to define functions supplied to VertexHolder<N,P,NUM>::calibrateColor(). Example:

  namespace DepthCueUtil {

    void calibrateColorForSomething(const VecMath::Vector<4, double> &x) {
      // ...
      ColMgrMgr::Instance().calibrateColor(x, Color(r, g, b));
    }
   
  }
  Something::Something():
    VertexHolder<4, 2, double>(ParameterMap()) {
    setColorCalibrationFunction(DepthCueUtil::calibrateColorForSomething);
  }

Function Documentation

void DepthCueUtil::calibrateColor3D ( const VecMath::Vector< 4, double > &  x)

Default calibration of the ColorManager for a single vertex x.

Each component of the color (r, g, b, a) is calculated by how far the corresponding component of the vector (x, y, z, w) lies between the min and max values for that dimension.

References getColorComponent(), and Loki::SingletonHolder< T, CreationPolicy >::Instance().

Here is the call graph for this function:

void DepthCueUtil::checkMaximum ( const VecMath::Vector< 4, double > &  ,
const VecMath::Vector< 4, double > &  xtrans 
)

Tests whether xtrans is inside the upper boundary of the transformed object and resets any component of the upper boundary if not.

Referenced by findMaximumW().

Here is the caller graph for this function:

void DepthCueUtil::checkMinimum ( const VecMath::Vector< 4, double > &  ,
const VecMath::Vector< 4, double > &  xtrans 
)

Tests whether xtrans is inside the lower boundary of the transformed object and resets any component of the lower boundary if not.

Parameters:
xtransthe vertex to check

Referenced by findMinimumW().

Here is the caller graph for this function:

void DepthCueUtil::determineExtrema ( Displayable object)

Scans all vertices of the object, setting the upper and lower boundaries in all dimensions.

Parameters:
objectObject whose boundaries are found

References findMaximumW(), and findMinimumW().

Here is the call graph for this function:

void DepthCueUtil::findMaximumW ( Displayable object)

Find the upper boundary of the space the transformed object occupies.

Parameters:
objectObject whose upper boundary is found

References checkMaximum(), and resetMax().

Referenced by determineExtrema().

Here is the call graph for this function:

Here is the caller graph for this function:

void DepthCueUtil::findMinimumW ( Displayable object)

Find the lower boundary of the space the transformed object occupies.

Parameters:
objectObject whose lower boundary is found

References checkMinimum(), and resetMin().

Referenced by determineExtrema().

Here is the call graph for this function:

Here is the caller graph for this function:

void DepthCueUtil::resetMax ( )

Reset the upper boundary of the transformed object before running a full scan to determine it.

Referenced by findMaximumW().

Here is the caller graph for this function:

void DepthCueUtil::resetMin ( )

Reset the lower boundary of the transformed object before running a full scan to determine it.

Referenced by findMinimumW().

Here is the caller graph for this function:

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends

Generated on Mon Apr 9 2012 20:25:19 for HyperspaceExplorer 0.7.1 by doxygen 1.7.4  -  Hosted bySourceForge.net Logo