45 result =
new Sphere(static_cast<const Sphere*>(shape)->radius);
48 result =
new Cylinder(static_cast<const Cylinder*>(shape)->radius, static_cast<const Cylinder*>(shape)->
length);
51 result =
new Box(static_cast<const Box*>(shape)->size[0], static_cast<const Box*>(shape)->size[1], static_cast<const Box*>(shape)->size[2]);
55 const Mesh *src =
static_cast<const Mesh*
>(shape);
58 for (
unsigned int i = 0 ; i < n ; ++i)
61 for (
unsigned int i = 0 ; i < n ; ++i)
81 result =
new Plane(static_cast<const Plane*>(shape)->a, static_cast<const Plane*>(shape)->b,
82 static_cast<const Plane*>(shape)->c, static_cast<const Plane*>(shape)->
d);
Definition of a cylinder.
unsigned int * triangles
the vertex indices for each triangle triangle k has vertices at index (3k, 3k+1, 3k+2) = (v1...
Definition of a plane with equation ax + by + cz + d = 0.
unsigned int triangleCount
the number of triangles formed with the vertices
A basic definition of a static shape. Static shapes do not have a pose.
A basic definition of a shape. Shapes are considered centered at origin.
unsigned int vertexCount
the number of available vertices
double * vertices
the position for each vertex vertex k has values at index (3k, 3k+1, 3k+2) = (x,y,z)
TFSIMD_FORCE_INLINE tfScalar length(const Quaternion &q)
double * normals
the normal to each triangle unit vector represented as (x,y,z)
Shape * cloneShape(const Shape *shape)
Create a copy of a shape.