Primitives Class
Primitives Class
Members
void addSphereSurface(ObjectMeshDynamic & object, float radius, mat4 transform, int stacks = 16, int slices = 32)
Appends a sphere surface to the dynamic mesh. The stacks and slices specify the surface's subdivision.Arguments
- ObjectMeshDynamic & object - A dynamic object to which a surface should be added.
- float radius - The sphere radius.
- mat4 transform - Surface transformation matrix.
- int stacks - Number of stacks that divide the sphere radially.
- int slices - Number of slices that divide the sphere horizontally.
void addPlaneSurface(ObjectMeshDynamic & object, float width, float height, float step, mat4 transform)
Appends a plane surface to the dynamic mesh. The plane is divided into equal squares, size of which is defined by the given step.Arguments
- ObjectMeshDynamic & object - A dynamic object to which a surface should be added.
- float width - Width of the plane.
- float height - Height of the plane.
- float step - Step of surface subdivision (vertical and horizontal).
- mat4 transform - Plane transformation matrix.
ObjectMeshDynamic createPlane(float width, float height, float step)
Arguments
- float width
- float height
- float step
void addIcosahedronSurface(ObjectMeshDynamic & object, float radius, mat4 transform)
Arguments
- ObjectMeshDynamic & object - A dynamic object to which a surface should be added.
- float radius
- mat4 transform
void addCylinderSurface(ObjectMeshDynamic & object, float radius, float height, mat4 transform, int stacks = 1, int slices = 32)
Arguments
- ObjectMeshDynamic & object
- float radius
- float height
- mat4 transform
- int stacks
- int slices
void addBoxSurface(ObjectMeshDynamic & object, vec3 size, mat4 transform)
Arguments
- ObjectMeshDynamic & object
- vec3 size
- mat4 transform
void addPrismSurface(ObjectMeshDynamic & object, float size_0, float size_1, float height, mat4 transform, int sides = 8)
Arguments
- ObjectMeshDynamic & object
- float size_0
- float size_1
- float height
- mat4 transform
- int sides
void addCapsuleSurface(ObjectMeshDynamic & object, float radius, float height, mat4 transform, int stacks = 16, int slices = 32)
Arguments
- ObjectMeshDynamic & object
- float radius
- float height
- mat4 transform
- int stacks
- int slices
ObjectMeshDynamic createCylinder(float radius, float height, int stacks = 1, int slices = 32)
Arguments
- float radius
- float height
- int stacks
- int slices
ObjectMeshDynamic createPrism(float size_0, float size_1, float height, int sides = 8)
Arguments
- float size_0
- float size_1
- float height
- int sides
ObjectMeshDynamic createDodecahedron(float radius)
Arguments
- float radius
void addDodecahedronSurface(ObjectMeshDynamic & object, float radius, mat4 transform)
Arguments
- ObjectMeshDynamic & object
- float radius
- mat4 transform
ObjectMeshDynamic createCapsule(float radius, float height, int stacks = 16, int slices = 32)
Arguments
- float radius
- float height
- int stacks
- int slices
ObjectMeshDynamic createSphere(float radius, int stacks = 16, int slices = 32)
Arguments
- float radius
- int stacks
- int slices
ObjectMeshDynamic createIcosahedron(float radius)
Arguments
- float radius
ObjectMeshDynamic createBox(vec3 size)
Arguments
- vec3 size
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)