Skip to content

Joshua-Usi/Construct

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Construct

A C++ Primitive shape generator library

2D Primitives

Quad()

Generates a quad facing the -Z direction by default Quad Texture UV

Plane(unsigned int width, unsigned int height)

Generates a plane of width * height tiles facing the +Y direction by default Plane Texture UV

Polygon(unsigned int sides)

Generates a polygon facing the -Z direction by default. High side counts can be used for circles Polygon Texture UV

3D Primitives

Cube()

Generates a 24 vertex cube with correct normals and example texture shown below (Front facing -Z) Cube Texture UV

UVSphere(unsigned int rings, unsigned int segments)

Generates a UV sphere with a number of rings and segments. Useful for easy texturing UV Sphere Texture UV

Icosphere(unsigned int subdivisions)

Generates a subdivided icosphere. More organic looking due to it's uniformity. Useful for heightmapping. Generally keep subdivisions below 10, Number of triangles grows exponentially Icosphere Texture UV

Cylinder(unsigned int sides)

Generates a cylinder with a given number of sides. Low side counts can be used for prisms Cylinder Texture UV

Capsule()

Generates the classic capsule shape. Capsule Texture UV

Skyboxes

SkyboxCube()

Generates a Cube skybox Skybox Cube Texture UV

SkyboxSphere()

Generates a Sphere skybox Skybox Sphere Texture UV

About

A C++ Primitive shape generator library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages