13 #ifndef HRPCOLLISION_COLDET_MODEL_H_INCLUDED 14 #define HRPCOLLISION_COLDET_MODEL_H_INCLUDED 35 Edge(
int vertexIndex1,
int vertexIndex2){
36 if(vertexIndex1 < vertexIndex2){
37 vertex[0] = vertexIndex1;
38 vertex[1] = vertexIndex2;
40 vertex[0] = vertexIndex2;
41 vertex[1] = vertexIndex1;
45 if(vertex[0] < rhs.
vertex[0]){
47 }
else if(vertex[0] == rhs.
vertex[0]){
48 return (vertex[1] < rhs.
vertex[1]);
93 const std::string&
name()
const {
return name_; }
99 void setNumVertices(
int n);
105 int getNumVertices()
const;
111 void setNumTriangles(
int n);
113 int getNumTriangles()
const;
122 void setVertex(
int index,
float x,
float y,
float z);
127 void addVertex(
float x,
float y,
float z);
136 void getVertex(
int index,
float& out_x,
float& out_y,
float& out_z)
const;
145 void setTriangle(
int index,
int v1,
int v2,
int v3);
150 void addTriangle(
int v1,
int v2,
int v3);
152 void getTriangle(
int index,
int& out_v1,
int& out_v2,
int& out_v3)
const;
179 void setPosition(
const double* R,
const double* p);
197 void setNumPrimitiveParams(
unsigned int nparam);
205 bool setPrimitiveParam(
unsigned int index,
float value);
213 bool getPrimitiveParam(
unsigned int index,
float &value)
const;
220 void setPrimitivePosition(
const double* R,
const double* p);
228 double computeDistanceWithRay(
const double *point,
const double *dir);
236 bool checkCollisionWithPointCloud(
const std::vector<Vector3> &i_cloud,
239 void getBoundingBoxData(
const int depth, std::vector<Vector3>& out_boxes);
241 int getAABBTreeDepth();
243 int numofBBtoDepth(
int minNumofBB);
251 void setNeighborTriangle(
int triangle,
int vertex0,
int vertex1,
int vertex2);
252 void initNeighbor(
int n);
262 bool setNeighborTriangleSub(
int triangle,
int vertex0,
int vertex1);
263 void setNeighbor(
int triangle0,
int triangle1);
EdgeToTriangleMap triangleMap
bool isValid() const
check if build() is already called or not
ColdetModelSharedDataSet * dataSet
png_infop png_charpp name
IceMaths::Matrix4x4 * transform
void setName(const std::string &name)
set name of this model
Edge(int vertexIndex1, int vertexIndex2)
bool operator<(const Edge &rhs) const
#define HRP_COLLISION_EXPORT
IceMaths::Matrix4x4 * pTransform
transform of primitive
ColdetModelSharedDataSet * getDataSet()
const std::string & name() const
get name of this model
boost::intrusive_ptr< ColdetModel > ColdetModelPtr
std::map< Edge, trianglePair > EdgeToTriangleMap