Simox  2.3.49
VirtualRobot::SphereApproximator Class Reference

Data Structures

struct  FaceIndex
struct  SphereApproximation
 A data structure that represents a sphere. More...

Public Types

enum  EPolyhedronType { eTetrahedron, eOctahedron, eIcosahedron }

Public Member Functions

 ~SphereApproximator ()
void generateGraph (SphereApproximation &storeResult, EPolyhedronType baseType, int levels, float radius)
TriMeshModelPtr generateTriMesh (const SphereApproximation &a)
int findVertex (const Eigen::Vector3f &position, float epsilon, std::vector< Eigen::Vector3f > &vertices)
float AngleVecVec (const Eigen::Vector3f &vector1, const Eigen::Vector3f &vector2)
bool check_intersect_tri (const Eigen::Vector3f &pt1, const Eigen::Vector3f &pt2, const Eigen::Vector3f &pt3, const Eigen::Vector3f &linept, const Eigen::Vector3f &vect, Eigen::Vector3f &storeIntersection)

Detailed Description

This class can be used to generate an approximated sphere representation. The sphere is represented by a set of uniformly sized triangles.

You can use the method generateGraph to fill the data structure SphereApproximation.

Member Enumeration Documentation


Constructor & Destructor Documentation

EIGEN_MAKE_ALIGNED_OPERATOR_NEW VirtualRobot::SphereApproximator::SphereApproximator ( )
VirtualRobot::SphereApproximator::~SphereApproximator ( )

Member Function Documentation

float VirtualRobot::SphereApproximator::AngleVecVec ( const Eigen::Vector3f &  vector1,
const Eigen::Vector3f &  vector2 
bool VirtualRobot::SphereApproximator::check_intersect_tri ( const Eigen::Vector3f &  pt1,
const Eigen::Vector3f &  pt2,
const Eigen::Vector3f &  pt3,
const Eigen::Vector3f &  linept,
const Eigen::Vector3f &  vect,
Eigen::Vector3f &  storeIntersection 
int VirtualRobot::SphereApproximator::findVertex ( const Eigen::Vector3f &  position,
float  epsilon,
std::vector< Eigen::Vector3f > &  vertices 
void VirtualRobot::SphereApproximator::generateGraph ( SphereApproximation storeResult,
EPolyhedronType  baseType,
int  levels,
float  radius 

Generates a sphere representation and fills the data structure storeResult with the result.

VirtualRobot::TriMeshModelPtr VirtualRobot::SphereApproximator::generateTriMesh ( const SphereApproximation a)