37 #ifndef GEOMETRIC_SHAPES_SHAPES_ 38 #define GEOMETRIC_SHAPES_SHAPES_ 136 size[0] = size[1] = size[2] = 0.0;
165 Mesh(
unsigned int vCount,
unsigned int tCount) :
Shape()
168 vertexCount = vCount;
169 vertices =
new double[vCount * 3];
170 triangleCount = tCount;
171 triangles =
new unsigned int[tCount * 3];
172 normals =
new double[tCount * 3];
218 a = pa; b = pb; c = pc;
d = pd;
A basic definition of a static shape. Static shapes do not have a pose.
Plane(double pa, double pb, double pc, double pd)
Definition of a cylinder.
double * normals
the normal to each triangle unit vector represented as (x,y,z)
ShapeType
A list of known shape types.
Definition of a plane with equation ax + by + cz + d = 0.
Mesh(unsigned int vCount, unsigned int tCount)
double * vertices
the position for each vertex vertex k has values at index (3k, 3k+1, 3k+2) = (x,y,z)
virtual ~StaticShape(void)
Shape * cloneShape(const Shape *shape)
Create a copy of a shape.
Mesh * createMeshFromBinaryStl(const char *filename)
Load a mesh from a binary STL file. Normals are recomputed and repeating vertices are identified...
Mesh * createMeshFromBinaryDAE(const char *filename)
Load a mesh from a binary DAE file. Normals are recomputed and repeating vertices are identified...
A basic definition of a shape. Shapes are considered centered at origin.
Cylinder(double r, double l)
TFSIMD_FORCE_INLINE tfScalar length(const Quaternion &q)
Mesh * createMeshFromBinaryStlData(const char *data, unsigned int size)
Load a mesh from a binary STL stream. Normals are recomputed and repeating vertices are identified...
unsigned int * triangles
the vertex indices for each triangle triangle k has vertices at index (3k, 3k+1, 3k+2) = (v1...
unsigned int vertexCount
the number of available vertices
unsigned int triangleCount
the number of triangles formed with the vertices
Box(double x, double y, double z)
Mesh * createMeshFromVertices(const std::vector< tf::Vector3 > &vertices, const std::vector< unsigned int > &triangles)
Load a mesh from a set of vertices. Triangles are constructed using index values from the triangles v...