t
|
The geometry of a cuboid (box). More...
#include <Box.hpp>
Public Member Functions | |
Box (double width, double height, double depth) | |
Creates a new box geometry with the specified width, height, and depth. | |
Public Member Functions inherited from t::Geometry | |
Geometry (const BufferAttribute< double > &_vertexPositions, const BufferAttribute< double > &_vertexNormals) | |
Creates a new 3D geometry with the specified vertex buffer and normal buffer. | |
void | setIndices (BufferAttribute< int > _faceIndices) |
Sets the index buffer of this geometry. | |
Additional Inherited Members | |
Public Attributes inherited from t::Geometry | |
BufferAttribute< double > | vertexPositions |
The vertex buffer. | |
std::optional< BufferAttribute< int > > | faceIndices |
The index buffer, which is optional. | |
BufferAttribute< double > | vertexNormals |
The normal buffer. | |
FrontFace | frontFace |
The vertex winding order which classifies the front face of a triangle. | |
The geometry of a cuboid (box).
On creation, the box is centered on the origin and is axis-aligned.
|
inline |
Creates a new box geometry with the specified width, height, and depth.
For lighting calculations, it may be assumed that the width, height, and depth are in meters.
width | The width of the box. |
height | The height of the box. |
depth | The depth of the box. |