Candy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Attributes | List of all members
HVR::InterpolatedSamplesMapping Class Reference

This node provides mapping between a raw coordinates system and a calibrated system by lookup calibration, using samples of mapping between the two systes. More...

Inheritance diagram for HVR::InterpolatedSamplesMapping:
Inheritance graph
[legend]

Classes

struct  PositionError
 
struct  PositionTriangulation
 
struct  TriangulationCoordIndex
 

Public Member Functions

 InterpolatedSamplesMapping (H3D::Inst< H3D::SFNode > _metadata=0, H3D::Inst< H3D::MFVec3f > _sampledRawPosition=0, H3D::Inst< H3D::MFVec3f > _sampledCalibratedPosition=0, H3D::Inst< PositionError > _positionError=0, H3D::Inst< H3D::SFString > _interpolationMethod=0, H3D::Inst< H3D::SFFloat > _delaunayMaximumCellSize=0, H3D::Inst< H3D::SFFloat > _delaunayMaximumCircumcenterDistance=0, H3D::Inst< PositionTriangulation > _delaunayTriangulation=0, H3D::Inst< TriangulationCoordIndex > _delaunayTriangulationCoordIndex=0, H3D::Inst< H3D::SFInt32 > _hexahedronResolutionX=0, H3D::Inst< H3D::SFInt32 > _hexahedronResolutionY=0, H3D::Inst< H3D::SFInt32 > _hexahedronResolutionZ=0, H3D::Inst< H3D::SFBool > _hexahedronBumpScheme=0, H3D::Inst< H3D::SFFloat > _hexahedronBumpRMax=0, H3D::Inst< H3D::SFFloat > _shepardsExponent=0)
 
virtual void getMapping (const std::vector< H3D::Vec3f > &p_in, const std::vector< H3D::Rotation > &o_in, std::vector< H3D::Vec3f > &p_out, std::vector< H3D::Rotation > &o_out)
 This function maps a list of positions and orientations into new positions and orientations according to the node's specific principles. More...
 
- Public Member Functions inherited from HVR::HVRMappingNode
 HVRMappingNode (H3D::Inst< H3D::SFNode > _metadata=0)
 
virtual std::string defaultXMLContainerField ()
 

Public Attributes

std::auto_ptr< H3D::MFVec3fsampledRawPosition
  (input/output) A set of position samples in the source coordinate system that corresponds to the sampledCalibratedPosition field. More...
 
std::auto_ptr< H3D::MFVec3fsampledCalibratedPosition
  (input/output) A set of position samples in the target coordinate system that corresponds to the sampledRawPosition field. More...
 
std::auto_ptr< H3D::SFStringinterpolationMethod
  (input/output) ("DELAUNEY") The method to use to interpolate between the specified points. More...
 
std::auto_ptr
< TriangulationCoordIndex
delaunayTriangulationCoordIndex
  (output only) This MFInt32 field can be connected to an indexed line set, together with the sampled position points, to visualize the triangulation. More...
 
std::auto_ptr< H3D::SFFloatdelaunayMaximumCellSize
  (input/output) (inf) The maximum size of a valid cell in the triangulation, i e the largest distance between raw sample points that are considered adjacent. More...
 
std::auto_ptr< H3D::SFFloatdelaunayMaximumCircumcenterDistance
  (input/output) (inf) The maximum distance of the circumsphere center from the cell. More...
 
std::auto_ptr< H3D::SFInt32hexahedronResolutionX
  (input/output) When interpolationMethod is set to "HEXAHEDRON" this is the X resolution of the regular grid of samples. More...
 
std::auto_ptr< H3D::SFInt32hexahedronResolutionY
  (input/output) When interpolationMethod is set to "HEXAHEDRON" this is the Y resolution of the regular grid of samples. More...
 
std::auto_ptr< H3D::SFInt32hexahedronResolutionZ
  (input/output) When interpolationMethod is set to "HEXAHEDRON" this is the Z resolution of the regular grid of samples. More...
 
std::auto_ptr< H3D::SFBoolhexahedronBumpScheme
  (input/output) (false) When interpolationMethod is set to "HEXAHEDRON" this activates the bump scheme for interpolation. More...
 
std::auto_ptr< H3D::SFFloathexahedronBumpRMax
  (input/output) (0.1) When interpolationMethod is set to "HEXAHEDRON" and the bump scheme active, this will specify r_max, the distance from a sample at which that sample alone is considered. More...
 
std::auto_ptr< H3D::SFFloatshepardsExponent
  (input/output) (2) When interpolationMethod is set to "SHEPARDS", this field controls the distance exponent used in the inverse distance weighting. More...
 

Static Public Attributes

static H3D::H3DNodeDatabase database
 
- Static Public Attributes inherited from HVR::HVRMappingNode
static H3D::H3DNodeDatabase database
 

Protected Types

typedef H3D::SField
< Candy::DelaunayTriangulation::TriangulationSet > 
SFTriangulation
 

Protected Attributes

struct HVR_API PositionError
 
struct HVR_API PositionTriangulation
 
struct HVR_API TriangulationCoordIndex
 
std::auto_ptr< PositionErrorpositionError
 
std::auto_ptr
< PositionTriangulation
delaunayTriangulation
 

Detailed Description

This node provides mapping between a raw coordinates system and a calibrated system by lookup calibration, using samples of mapping between the two systes.

There are different interpolation methods implemented with different characteristics.

With Delaunay interpolation, the raw set of samples is triangulated using Delauney triangulation, which can be visualized using the coord index field. To find the calibrated position of a query, first the triangulation cell containing it is found and its barycentric coordinates identified. These coordinates are then used to interpolated between the corresponding points in the set of calibrated samples.

With hexahedron interpolation, the raw set is assumed to be approximately rectilinear grid. The data within a hexahedron cell is then interpolated using one of two schemes described by Bryson (1992).

With Shepard's interpolation, inverse distance weighting is used.

Member Function Documentation

virtual void HVR::InterpolatedSamplesMapping::getMapping ( const std::vector< H3D::Vec3f > &  p_in,
const std::vector< H3D::Rotation > &  o_in,
std::vector< H3D::Vec3f > &  p_out,
std::vector< H3D::Rotation > &  o_out 
)
virtual

This function maps a list of positions and orientations into new positions and orientations according to the node's specific principles.

Reimplemented from HVR::HVRMappingNode.

Member Data Documentation

std::auto_ptr< H3D::SFFloat > HVR::InterpolatedSamplesMapping::delaunayMaximumCellSize

(input/output) (inf) The maximum size of a valid cell in the triangulation, i e the largest distance between raw sample points that are considered adjacent.

std::auto_ptr< H3D::SFFloat > HVR::InterpolatedSamplesMapping::delaunayMaximumCircumcenterDistance

(input/output) (inf) The maximum distance of the circumsphere center from the cell.

std::auto_ptr< TriangulationCoordIndex > HVR::InterpolatedSamplesMapping::delaunayTriangulationCoordIndex

(output only) This MFInt32 field can be connected to an indexed line set, together with the sampled position points, to visualize the triangulation.

The triangulation is calculated from the raw samples, however the calibrated samples are probably better to visualize since they are in the world coordinates.

std::auto_ptr< H3D::SFFloat > HVR::InterpolatedSamplesMapping::hexahedronBumpRMax

(input/output) (0.1) When interpolationMethod is set to "HEXAHEDRON" and the bump scheme active, this will specify r_max, the distance from a sample at which that sample alone is considered.

This must be smaller than the shortest distance between any two raw samples.

std::auto_ptr< H3D::SFBool > HVR::InterpolatedSamplesMapping::hexahedronBumpScheme

(input/output) (false) When interpolationMethod is set to "HEXAHEDRON" this activates the bump scheme for interpolation.

Otherwise a linear scheme is applied.

std::auto_ptr< H3D::SFInt32 > HVR::InterpolatedSamplesMapping::hexahedronResolutionX

(input/output) When interpolationMethod is set to "HEXAHEDRON" this is the X resolution of the regular grid of samples.

std::auto_ptr< H3D::SFInt32 > HVR::InterpolatedSamplesMapping::hexahedronResolutionY

(input/output) When interpolationMethod is set to "HEXAHEDRON" this is the Y resolution of the regular grid of samples.

std::auto_ptr< H3D::SFInt32 > HVR::InterpolatedSamplesMapping::hexahedronResolutionZ

(input/output) When interpolationMethod is set to "HEXAHEDRON" this is the Z resolution of the regular grid of samples.

std::auto_ptr< H3D::SFString > HVR::InterpolatedSamplesMapping::interpolationMethod

(input/output) ("DELAUNEY") The method to use to interpolate between the specified points.

Different techniques are more or less suitable for different types of clouds. Accepted values: "DELAUNAY", "HEXAHEDRON" and "SHEPARDS".

std::auto_ptr< H3D::MFVec3f > HVR::InterpolatedSamplesMapping::sampledCalibratedPosition

(input/output) A set of position samples in the target coordinate system that corresponds to the sampledRawPosition field.

std::auto_ptr< H3D::MFVec3f > HVR::InterpolatedSamplesMapping::sampledRawPosition

(input/output) A set of position samples in the source coordinate system that corresponds to the sampledCalibratedPosition field.

std::auto_ptr< H3D::SFFloat > HVR::InterpolatedSamplesMapping::shepardsExponent

(input/output) (2) When interpolationMethod is set to "SHEPARDS", this field controls the distance exponent used in the inverse distance weighting.