Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
mvsim::CollisionShapeCache Class Reference

#include <CollisionShapeCache.h>

Classes

struct  Entry
 

Public Member Functions

void clear ()
 
Shape2p5 get (mrpt::opengl::CRenderizable &obj, float zMin, float zMax, const mrpt::poses::CPose3D &modelPose, const float modelScale, const std::optional< std::string > &modelFile=std::nullopt)
 

Static Public Member Functions

static CollisionShapeCacheInstance ()
 

Private Member Functions

 CollisionShapeCache ()=default
 
Shape2p5 processCylinderLike (const size_t actualEdgeCount, double actualRadius, float zMin, float zMax, const mrpt::poses::CPose3D &modelPose, const float modelScale)
 
Shape2p5 processGenericGeometry (mrpt::opengl::CRenderizable &obj, float zMin, float zMax, const mrpt::poses::CPose3D &modelPose, const float modelScale)
 
std::optional< Shape2p5processSimpleGeometries (const mrpt::opengl::CRenderizable &obj, float zMin, float zMax, const mrpt::poses::CPose3D &modelPose, const float modelScale)
 
 ~CollisionShapeCache ()=default
 

Private Attributes

std::map< std::string, Entrycache
 

Detailed Description

Definition at line 19 of file CollisionShapeCache.h.

Constructor & Destructor Documentation

◆ CollisionShapeCache()

mvsim::CollisionShapeCache::CollisionShapeCache ( )
privatedefault

◆ ~CollisionShapeCache()

mvsim::CollisionShapeCache::~CollisionShapeCache ( )
privatedefault

Member Function Documentation

◆ clear()

void mvsim::CollisionShapeCache::clear ( )
inline

Definition at line 30 of file CollisionShapeCache.h.

◆ get()

Shape2p5 CollisionShapeCache::get ( mrpt::opengl::CRenderizable &  obj,
float  zMin,
float  zMax,
const mrpt::poses::CPose3D &  modelPose,
const float  modelScale,
const std::optional< std::string > &  modelFile = std::nullopt 
)

Computes the convex hull of a given model, or gets it from the cache

Definition at line 26 of file CollisionShapeCache.cpp.

◆ Instance()

CollisionShapeCache & CollisionShapeCache::Instance ( )
static

Definition at line 20 of file CollisionShapeCache.cpp.

◆ processCylinderLike()

Shape2p5 CollisionShapeCache::processCylinderLike ( const size_t  actualEdgeCount,
double  actualRadius,
float  zMin,
float  zMax,
const mrpt::poses::CPose3D &  modelPose,
const float  modelScale 
)
private

Definition at line 294 of file CollisionShapeCache.cpp.

◆ processGenericGeometry()

Shape2p5 CollisionShapeCache::processGenericGeometry ( mrpt::opengl::CRenderizable &  obj,
float  zMin,
float  zMax,
const mrpt::poses::CPose3D &  modelPose,
const float  modelScale 
)
private

Definition at line 159 of file CollisionShapeCache.cpp.

◆ processSimpleGeometries()

std::optional< Shape2p5 > CollisionShapeCache::processSimpleGeometries ( const mrpt::opengl::CRenderizable &  obj,
float  zMin,
float  zMax,
const mrpt::poses::CPose3D &  modelPose,
const float  modelScale 
)
private

Returns a valid shape if the geometry is recognized and shape already filled in.

Definition at line 78 of file CollisionShapeCache.cpp.

Member Data Documentation

◆ cache

std::map<std::string, Entry> mvsim::CollisionShapeCache::cache
private

Definition at line 41 of file CollisionShapeCache.h.


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


mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:23