1#include "geometries/Geometry.hpp"
16#define halfWidth width / 2
17#define halfHeight height / 2
18#define halfDepth depth / 2
21#define vertexBuffer { \
23 halfWidth, halfHeight, halfDepth, \
24 halfWidth, halfHeight, halfDepth, \
25 halfWidth, halfHeight, halfDepth, \
28 -halfWidth, halfHeight, halfDepth, \
29 -halfWidth, halfHeight, halfDepth, \
30 -halfWidth, halfHeight, halfDepth, \
33 -halfWidth, halfHeight, -halfDepth, \
34 -halfWidth, halfHeight, -halfDepth, \
35 -halfWidth, halfHeight, -halfDepth, \
38 halfWidth, halfHeight, -halfDepth, \
39 halfWidth, halfHeight, -halfDepth, \
40 halfWidth, halfHeight, -halfDepth, \
43 halfWidth, -halfHeight, halfDepth, \
44 halfWidth, -halfHeight, halfDepth, \
45 halfWidth, -halfHeight, halfDepth, \
48 -halfWidth, -halfHeight, halfDepth, \
49 -halfWidth, -halfHeight, halfDepth, \
50 -halfWidth, -halfHeight, halfDepth, \
53 -halfWidth, -halfHeight, -halfDepth, \
54 -halfWidth, -halfHeight, -halfDepth, \
55 -halfWidth, -halfHeight, -halfDepth, \
58 halfWidth, -halfHeight, -halfDepth, \
59 halfWidth, -halfHeight, -halfDepth, \
60 halfWidth, -halfHeight, -halfDepth, \
63#define indexBuffer { \
64 0, 12, 21, 21, 9, 0, \
66 2, 5, 14, 14, 5, 17, \
67 3, 6, 18, 18, 15, 3, \
68 16, 19, 13, 13, 19, 22, \
69 8, 11, 20, 20, 11, 23, \
72#define normalBuffer { \
74 1, 0, 0, 0, 1, 0, 0, 0, 1, \
75 -1, 0, 0, 0, 1, 0, 0, 0, 1, \
76 -1, 0, 0, 0, 1, 0, 0, 0, -1, \
77 1, 0, 0, 0, 1, 0, 0, 0, -1, \
78 1, 0, 0, 0, -1, 0, 0, 0, 1, \
79 -1, 0, 0, 0, -1, 0, 0, 0, 1, \
80 -1, 0, 0, 0, -1, 0, 0, 0, -1, \
81 1, 0, 0, 0, -1, 0, 0, 0, -1, \
104 Box(
double width,
double height,
double depth)
The geometry of a cuboid (box).
Definition Box.hpp:92
Box(double width, double height, double depth)
Creates a new box geometry with the specified width, height, and depth.
Definition Box.hpp:104
A class representing attributes, such as vertex positions, face indices, and vertex normals.
Definition BufferAttribute.hpp:27
The base 3D geometry class.
Definition Geometry.hpp:37
void setIndices(BufferAttribute< int > _faceIndices)
Sets the index buffer of this geometry.
Definition Geometry.hpp:93
The t software 3D graphics library namespace.
Definition algorithms.hpp:12