Simox  2.3.74.0
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

EIGEN_MAKE_ALIGNED_OPERATOR_NEW SphereApproximator ()
 
 ~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

◆ EPolyhedronType

Enumerator
eTetrahedron 
eOctahedron 
eIcosahedron 

Constructor & Destructor Documentation

◆ SphereApproximator()

EIGEN_MAKE_ALIGNED_OPERATOR_NEW VirtualRobot::SphereApproximator::SphereApproximator ( )
inline

◆ ~SphereApproximator()

VirtualRobot::SphereApproximator::~SphereApproximator ( )
inline

Member Function Documentation

◆ AngleVecVec()

float VirtualRobot::SphereApproximator::AngleVecVec ( const Eigen::Vector3f &  vector1,
const Eigen::Vector3f &  vector2 
)

◆ check_intersect_tri()

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 
)

◆ findVertex()

int VirtualRobot::SphereApproximator::findVertex ( const Eigen::Vector3f &  position,
float  epsilon,
std::vector< Eigen::Vector3f > &  vertices 
)

◆ generateGraph()

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.

◆ generateTriMesh()

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