Simox  2.3.74.0
VirtualRobot::TriMeshUtils Class Reference

Static Public Member Functions

static void CreateBoxTriangles (std::vector< TriMeshModel::triangle > &triangles, const Eigen::Matrix4f &globalPose, float width=50.f, float height=50.f, float depth=50.f)
 
static std::vector< TriMeshModel::triangleCreateBoxTriangles (const Eigen::Matrix4f &globalPose, float width=50.f, float height=50.f, float depth=50.f)
 
static TriMeshModelPtr CreateBox (const Eigen::Matrix4f &globalPose, float width=50.f, float height=50.f, float depth=50.f, const VisualizationFactory::Color &color=VisualizationFactory::Color::Gray(), const std::vector< VisualizationFactory::Color > &colors={})
 
static TriMeshModelPtr CreateSparseBoxGrid (const Eigen::Matrix4f &globalPose, const std::vector< Eigen::Vector3f > &positions, float width=50.f, float height=50.f, float depth=50.f, const VisualizationFactory::Color &color=VisualizationFactory::Color::Gray(), const std::vector< VisualizationFactory::Color > &colors={})
 
static std::optional< Eigen::Vector3f > sampleSurfacePoint (const std::vector< float > &cumulativeAreas, double totalArea, const VirtualRobot::TriMeshModel &tri)
 
static std::vector< Eigen::Vector3f > uniformSampling (const VirtualRobot::TriMeshModel &tri, unsigned int n=1000)
 Uniformly samples points on the surface of a trimesh model and can be used to create a point cloud of the model. More...
 

Member Function Documentation

◆ CreateBox()

TriMeshModelPtr VirtualRobot::TriMeshUtils::CreateBox ( const Eigen::Matrix4f &  globalPose,
float  width = 50.f,
float  height = 50.f,
float  depth = 50.f,
const VisualizationFactory::Color color = VisualizationFactory::Color::Gray(),
const std::vector< VisualizationFactory::Color > &  colors = {} 
)
static

◆ CreateBoxTriangles() [1/2]

void VirtualRobot::TriMeshUtils::CreateBoxTriangles ( std::vector< TriMeshModel::triangle > &  triangles,
const Eigen::Matrix4f &  globalPose,
float  width = 50.f,
float  height = 50.f,
float  depth = 50.f 
)
static

◆ CreateBoxTriangles() [2/2]

std::vector< TriMeshModel::triangle > VirtualRobot::TriMeshUtils::CreateBoxTriangles ( const Eigen::Matrix4f &  globalPose,
float  width = 50.f,
float  height = 50.f,
float  depth = 50.f 
)
static

◆ CreateSparseBoxGrid()

TriMeshModelPtr VirtualRobot::TriMeshUtils::CreateSparseBoxGrid ( const Eigen::Matrix4f &  globalPose,
const std::vector< Eigen::Vector3f > &  positions,
float  width = 50.f,
float  height = 50.f,
float  depth = 50.f,
const VisualizationFactory::Color color = VisualizationFactory::Color::Gray(),
const std::vector< VisualizationFactory::Color > &  colors = {} 
)
static

◆ sampleSurfacePoint()

std::optional< Eigen::Vector3f > VirtualRobot::TriMeshUtils::sampleSurfacePoint ( const std::vector< float > &  cumulativeAreas,
double  totalArea,
const VirtualRobot::TriMeshModel tri 
)
static

◆ uniformSampling()

std::vector< Eigen::Vector3f > VirtualRobot::TriMeshUtils::uniformSampling ( const VirtualRobot::TriMeshModel tri,
unsigned int  n = 1000 
)
static

Uniformly samples points on the surface of a trimesh model and can be used to create a point cloud of the model.