This page has been translated automatically.
Programming
Fundamentals
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine::Primitives Class

Header:#include <UniginePrimitives.h>

Primitives Class

Members


void addSphereSurface(Ptr<ObjectMeshDynamic> & object, float radius, const Math::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

  • Ptr<ObjectMeshDynamic> & object - A dynamic object to which a surface should be added.
  • float radius - The sphere radius.
  • const Math::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(Ptr<ObjectMeshDynamic> & object, float width, float height, float step, const Math::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

  • Ptr<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).
  • const Math::mat4 & transform - Plane transformation matrix.

Ptr<ObjectMeshDynamic> createPlane(float width, float height, float step)

Arguments

  • float width
  • float height
  • float step

void addIcosahedronSurface(Ptr<ObjectMeshDynamic> & object, float radius, const Math::mat4 & transform)

Arguments

  • Ptr<ObjectMeshDynamic> & object - A dynamic object to which a surface should be added.
  • float radius
  • const Math::mat4 & transform

void addCylinderSurface(Ptr<ObjectMeshDynamic> & object, float radius, float height, const Math::mat4 & transform, int stacks = 1, int slices = 32)

Arguments

  • Ptr<ObjectMeshDynamic> & object
  • float radius
  • float height
  • const Math::mat4 & transform
  • int stacks
  • int slices

void addBoxSurface(Ptr<ObjectMeshDynamic> & object, const Math::vec3 & size, const Math::mat4 & transform)

Arguments

  • Ptr<ObjectMeshDynamic> & object
  • const Math::vec3 & size
  • const Math::mat4 & transform

void addPrismSurface(Ptr<ObjectMeshDynamic> & object, float size_0, float size_1, float height, const Math::mat4 & transform, int sides = 8)

Arguments

  • Ptr<ObjectMeshDynamic> & object
  • float size_0
  • float size_1
  • float height
  • const Math::mat4 & transform
  • int sides

void addCapsuleSurface(Ptr<ObjectMeshDynamic> & object, float radius, float height, const Math::mat4 & transform, int stacks = 16, int slices = 32)

Arguments

  • Ptr<ObjectMeshDynamic> & object
  • float radius
  • float height
  • const Math::mat4 & transform
  • int stacks
  • int slices

Ptr<ObjectMeshDynamic> createCylinder(float radius, float height, int stacks = 1, int slices = 32)

Arguments

  • float radius
  • float height
  • int stacks
  • int slices

Ptr<ObjectMeshDynamic> createPrism(float size_0, float size_1, float height, int sides = 8)

Arguments

  • float size_0
  • float size_1
  • float height
  • int sides

Ptr<ObjectMeshDynamic> createDodecahedron(float radius)

Arguments

  • float radius

void addDodecahedronSurface(Ptr<ObjectMeshDynamic> & object, float radius, const Math::mat4 & transform)

Arguments

  • Ptr<ObjectMeshDynamic> & object
  • float radius
  • const Math::mat4 & transform

Ptr<ObjectMeshDynamic> createCapsule(float radius, float height, int stacks = 16, int slices = 32)

Arguments

  • float radius
  • float height
  • int stacks
  • int slices

Ptr<ObjectMeshDynamic> createSphere(float radius, int stacks = 16, int slices = 32)

Arguments

  • float radius
  • int stacks
  • int slices

Ptr<ObjectMeshDynamic> createIcosahedron(float radius)

Arguments

  • float radius

Ptr<ObjectMeshDynamic> createBox(const Math::vec3 & size)

Arguments

  • const Math::vec3 & size
Last update: 2017-07-03
Build: ()