|
rigComponent 0.1.1
RigKit pack API - rigComponent
|
Expands the parametric 3D primitives into local-space triangle vertices. More...
#include <glm/glm.hpp>#include <vector>#include "CSphere.h"Functions | |
| std::vector< glm::vec3 > | rigkit::ecs::verticesOf (const CSphere &shape) |
| Vertex expansion for the parametric 3D primitives. | |
Expands the parametric 3D primitives into local-space triangle vertices.
Subdivision is clamped, since face count grows as 20 * 4^n and Raspberry Pi pays for every triangle.
| std::vector< glm::vec3 > rigkit::ecs::verticesOf | ( | const CSphere & | shape | ) |
Vertex expansion for the parametric 3D primitives.
Mirrors PrimitiveVertices.h (2D): present, picking, and bounds all want the same points, so deriving them once here is what keeps a sphere the same sphere everywhere.
Loose (non-indexed) triangle soup for an icosphere, local space.
subdivisions clamped to 0..4 so a stray large value cannot blow the triangle count up (20 * 4^n faces); flat per-face shading does not need shared vertices, so faces are emitted independently.