OMToolkit  1.0
The polygonal mesh processing tool.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | List of all members
OMToolkit::OMProjector< Mesh, Matrix > Class Template Reference

#include <OMProjector.h>

Public Member Functions

 OMProjector (MeshT *mesh, OpenMesh::VPropHandleT< MatrixT > propertyHandle)
 
bool ComputeMatrices (ScalarT length, ScalarT resolution, int zDir=ZDIR_Z, bool lengthRelative=false, int xdirection=XDIR_CURVATURE)
 
void rasterizeVertex (OMTransformationSolver< PointT > &solver, VertexHandleT vertex)
 
void rasterizeOnMatrixT (OMTransformationSolver< PointT > &solver, FaceHandleT face, MatrixT &MatrixT)
 

Public Attributes

ScalarT m_length
 
Rect< PointTm_MatrixTDelim
 
MeshTm_mesh
 
ScalarT m_resolution
 
int m_zDir
 
OpenMesh::VPropHandleT< MatrixTm_propertyHandle
 
OMTriBSPTree tree
 

Static Public Attributes

static const int XDIR_CURVATURE = 0
 
static const int XDIR_DO_NOT_CHECK = 2
 
static const int ZDIR_Z = 0
 
static const int ZDIR_CURVATURE = 2
 
static const int ZDIR_NORMAL = 4
 

Protected Types

typedef Matrix MatrixT
 
typedef MatrixT::Scalar ScalarT
 
typedef Mesh MeshT
 
typedef MeshT::Point PointT
 
typedef MeshT::VertexHandle VertexHandleT
 
typedef MeshT::FaceHandle FaceHandleT
 
typedef MeshT::Normal VectorT
 

Detailed Description

template<class Mesh, class Matrix>
class OMToolkit::OMProjector< Mesh, Matrix >

Class computing projections on tangent planes in each of the vertices

Template Parameters
MeshType of mesh to work with
MatrixType of vertex matrix on a mesh

Member Typedef Documentation

template<class Mesh , class Matrix >
typedef MeshT::FaceHandle OMToolkit::OMProjector< Mesh, Matrix >::FaceHandleT
protected

Mesh face handle typename

template<class Mesh , class Matrix >
typedef Matrix OMToolkit::OMProjector< Mesh, Matrix >::MatrixT
protected

Matrix typename

template<class Mesh , class Matrix >
typedef Mesh OMToolkit::OMProjector< Mesh, Matrix >::MeshT
protected

Mesh typename

template<class Mesh , class Matrix >
typedef MeshT::Point OMToolkit::OMProjector< Mesh, Matrix >::PointT
protected

Mesh point typename (coordinate)

template<class Mesh , class Matrix >
typedef MatrixT::Scalar OMToolkit::OMProjector< Mesh, Matrix >::ScalarT
protected

Matrix scalar typename

template<class Mesh , class Matrix >
typedef MeshT::Normal OMToolkit::OMProjector< Mesh, Matrix >::VectorT
protected

Mesh normal typename (vector)

template<class Mesh , class Matrix >
typedef MeshT::VertexHandle OMToolkit::OMProjector< Mesh, Matrix >::VertexHandleT
protected

Mesh vertex handle typename

Constructor & Destructor Documentation

template<class Mesh , class Matrix >
OMProjector::OMProjector ( MeshT mesh,
OpenMesh::VPropHandleT< MatrixT propertyHandle 
)

Constructor - initializes vital variables

Parameters
meshPointer to a mesh to work with
propertyHandleHandle to a vertex MatrixT property

Member Function Documentation

template<class Mesh , class Matrix >
bool OMProjector::ComputeMatrices ( ScalarT  length,
ScalarT  resolution,
int  zDir = ZDIR_Z,
bool  lengthRelative = false,
int  xdirection = XDIR_CURVATURE 
)

Method computes tangent rasters on all the vertices

Parameters
lengthLength of a square raster (real length in mesh space)
resolutionNumber of pixels on MatrixT edge
zDirUse ZDIR consts for choose which component will be used as Z direction
xdirectionDirection of X axis on MatrixT (for ex. Maximum curvature direction)
lengthRelativeIf true, length is computed as % of median edges lengths, if not, length is static
Returns
True, if computation ended successfully, false otherwise
template<class Mesh , class Matrix >
void OMProjector::rasterizeOnMatrixT ( OMTransformationSolver< PointT > &  solver,
FaceHandleT  face,
MatrixT MatrixT 
)
inline

Function rasterizes one triangle given by face handle on a MatrixT with use of transformation MatrixT

Parameters
solverOMTransformationSolver with saved transformation MatrixT
faceFace handle of a triangle
MatrixTMatrixT on which we will rasterize a face
template<class Mesh , class Matrix >
void OMProjector::rasterizeVertex ( OMTransformationSolver< PointT > &  solver,
VertexHandleT  vertex 
)

Function rasterizes neighbourhood of a vertex into a raster given by transformation solver Result is saved in MatrixT property of a vertex

Parameters
solverTransformation solver with saved transformation MatrixT
vertexVertex on which we compute a tangent raster

Member Data Documentation

template<class Mesh , class Matrix >
ScalarT OMToolkit::OMProjector< Mesh, Matrix >::m_length
template<class Mesh , class Matrix >
Rect<PointT> OMToolkit::OMProjector< Mesh, Matrix >::m_MatrixTDelim

Current MatrixT rectangle (size)

template<class Mesh , class Matrix >
MeshT* OMToolkit::OMProjector< Mesh, Matrix >::m_mesh

Mesh with we do computations

template<class Mesh , class Matrix >
OpenMesh::VPropHandleT<MatrixT> OMToolkit::OMProjector< Mesh, Matrix >::m_propertyHandle

MatrixT property handle

template<class Mesh , class Matrix >
ScalarT OMToolkit::OMProjector< Mesh, Matrix >::m_resolution

Square MatrixT dimension (resolution)

template<class Mesh , class Matrix >
int OMToolkit::OMProjector< Mesh, Matrix >::m_zDir

Compute z from curvature

template<class Mesh , class Matrix >
OMTriBSPTree OMToolkit::OMProjector< Mesh, Matrix >::tree

BSP Tree for Ray casting

template<class Mesh , class Matrix >
const int OMToolkit::OMProjector< Mesh, Matrix >::XDIR_CURVATURE = 0
static

Curvature direction flag

template<class Mesh , class Matrix >
const int OMToolkit::OMProjector< Mesh, Matrix >::XDIR_DO_NOT_CHECK = 2
static

Do not check X direction flag

template<class Mesh , class Matrix >
const int OMToolkit::OMProjector< Mesh, Matrix >::ZDIR_CURVATURE = 2
static

Compute Z direction as projected curvature

template<class Mesh , class Matrix >
const int OMToolkit::OMProjector< Mesh, Matrix >::ZDIR_NORMAL = 4
static

Compute Z direction as sine of normals angle

template<class Mesh , class Matrix >
const int OMToolkit::OMProjector< Mesh, Matrix >::ZDIR_Z = 0
static

Compute Z direction as real Z direction


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