VoxelEngine
 
Loading...
Searching...
No Matches
engine::Geometry Class Reference

Public Member Functions

 Geometry (std::vector< Face > faces)
 Creates a geometry with given faces, and computes the AABB of them.
 
 Geometry (std::vector< Face > faces, const AABB &aabb)
 Creates a geometry with given faces and AABB.
 
unsigned int getID () const
 
const std::vector< Face > & faces () const
 
const AABBaabb () const
 
void rotate (glm::vec3 axis, float angle)
 

Static Public Member Functions

static Geometry Cube ()
 Returns the geometry for basic cube. (1x1x1)
 
static Geometry Cylinder ()
 
static Geometry Box (glm::vec3 start, glm::vec3 end)
 

Constructor & Destructor Documentation

◆ Geometry()

Geometry::Geometry ( std::vector< Face faces)

Creates a geometry with given faces, and computes the AABB of them.

Note
It calculates the AABB using AABB::fromGeometry static method.

The documentation for this class was generated from the following files: