This page has been translated automatically.
编程
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
应用程序接口
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
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

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: ()