47 result =
new Sphere(static_cast<const Sphere*>(shape)->radius);
50 result =
new Cylinder(static_cast<const Cylinder*>(shape)->radius, static_cast<const Cylinder*>(shape)->
length);
53 result =
new Box(static_cast<const Box*>(shape)->size[0], static_cast<const Box*>(shape)->size[1], static_cast<const Box*>(shape)->size[2]);
57 const Mesh *src =
static_cast<const Mesh*
>(shape);
60 for (
unsigned int i = 0 ; i < n ; ++i)
63 for (
unsigned int i = 0 ; i < n ; ++i)
83 result =
new Plane(static_cast<const Plane*>(shape)->a, static_cast<const Plane*>(shape)->b,
84 static_cast<const Plane*>(shape)->c, static_cast<const Plane*>(shape)->
d);
A basic definition of a static shape. Static shapes do not have a pose.
Definition of a cylinder.
double * normals
the normal to each triangle unit vector represented as (x,y,z)
Definition of a plane with equation ax + by + cz + d = 0.
double * vertices
the position for each vertex vertex k has values at index (3k, 3k+1, 3k+2) = (x,y,z)
Shape * cloneShape(const Shape *shape)
Create a copy of a shape.
A basic definition of a shape. Shapes are considered centered at origin.
TFSIMD_FORCE_INLINE tfScalar length(const Quaternion &q)
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