5 #ifndef CNOID_COLDET_MODEL_H_INCLUDED 6 #define CNOID_COLDET_MODEL_H_INCLUDED 8 #include <cnoid/EigenTypes> 9 #include <boost/shared_ptr.hpp> 47 virtual ColdetModelPtr clone()
const;
49 void cloneInternalModel();
55 void setName(
const std::string& name) { name_ = name; }
61 const std::string&
name()
const {
return name_; }
67 void setNumVertices(
int n);
73 int getNumVertices()
const;
79 void setNumTriangles(
int n);
81 int getNumTriangles()
const;
90 void setVertex(
int index,
float x,
float y,
float z);
95 void addVertex(
float x,
float y,
float z);
104 void getVertex(
int index,
float& out_x,
float& out_y,
float& out_z)
const;
113 void setTriangle(
int index,
int v1,
int v2,
int v3);
118 void addTriangle(
int v1,
int v2,
int v3);
120 void getTriangle(
int index,
int& out_v1,
int& out_v2,
int& out_v3)
const;
135 #ifdef CNOID_BACKWARD_COMPATIBILITY 143 void setPosition(
const Position& T);
150 void setPosition(
const double* R,
const double* p);
168 void setNumPrimitiveParams(
unsigned int nparam);
176 bool setPrimitiveParam(
unsigned int index,
float value);
184 bool getPrimitiveParam(
unsigned int index,
float &value)
const;
191 void setPrimitivePosition(
const double* R,
const double* p);
199 double computeDistanceWithRay(
const double *point,
const double *
dir);
207 bool checkCollisionWithPointCloud(
const std::vector<Vector3> &i_cloud,
210 void getBoundingBoxData(
const int depth, std::vector<Vector3>& out_boxes);
212 int getAABBTreeDepth();
214 int numofBBtoDepth(
int minNumofBB);
220 IceMaths::Matrix4x4* transform;
221 IceMaths::Matrix4x4* pTransform;
PrimitiveType
Definition: ColdetModel.h:28
Definition: ColdetModelInternalModel.h:14
Definition: ColdetModel.h:28
Definition: ColdetModel.h:25
Eigen::Transform< double, 3, Eigen::AffineCompact > Position
Definition: EigenTypes.h:73
Definition: ColdetModelPair.h:15
bool isValid() const
check if build() is already called or not
Definition: ColdetModel.h:133
Defines the minimum processing for performing pasing file for STL.
Definition: AbstractSceneLoader.h:9
boost::shared_ptr< ColdetModel > ColdetModelPtr
Definition: ColdetModel.h:20
void setName(const std::string &name)
set name of this model
Definition: ColdetModel.h:55
Eigen::Vector3d Vector3
Definition: EigenTypes.h:58
Definition: ColdetModel.h:14
#define CNOID_EXPORT
Definition: Util/exportdecl.h:37
PROPERTIES INSTALL_RPATH lib dir
Definition: OpenRTMPlugin/CMakeLists.txt:139
const std::string & name() const
get name of this model
Definition: ColdetModel.h:61
Eigen::Matrix3d Matrix3
Definition: EigenTypes.h:57