t
Loading...
Searching...
No Matches
t::Box Class Reference

The geometry of a cuboid (box). More...

#include <Box.hpp>

Inheritance diagram for t::Box:
t::Geometry

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.
 

Detailed Description

The geometry of a cuboid (box).

On creation, the box is centered on the origin and is axis-aligned.

Constructor & Destructor Documentation

◆ Box()

t::Box::Box ( double width,
double height,
double depth )
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.

Parameters
widthThe width of the box.
heightThe height of the box.
depthThe depth of the box.

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