Static wireframe sphere mesh definition. More...
Declaration
struct helios::engine::rendering::mesh::assets::WireframeSphere { ... }
Public Static Functions Index
Private Static Functions Index
Public Static Attributes Index
Description
Static wireframe sphere mesh definition.
The sphere is centered at the origin and has radius 0.5. It is rendered as latitude and longitude line segments.
Definition at line 31 of file WireframeSphere.ixx.
Public Static Functions
boundsData()
| helios::math::aabbf helios::engine::rendering::mesh::assets::WireframeSphere::boundsData () |
|
inline
static
|
Returns the local bounds of this mesh.
- Returns
local bounds as aabb
Definition at line 155 of file WireframeSphere.ixx.
156 return helios::math::aabbf{
159 };
160 }
Reference Radius.
meshData()
| MeshData helios::engine::rendering::mesh::assets::WireframeSphere::meshData () |
|
inline
static
|
Private Static Functions
makeIndices()
| std::array< unsigned int, IndexCount > helios::engine::rendering::mesh::assets::WireframeSphere::makeIndices () |
|
inline
static
|
Definition at line 93 of file WireframeSphere.ixx.
93 static std::array<unsigned int, IndexCount> makeIndices() {
94 std::array<unsigned int, IndexCount> result{};
96
97
98 for (std::size_t stack = 1; stack < Stacks; ++stack) {
102
105 }
106 }
107
108
110 for (std::size_t stack = 0; stack < Stacks; ++stack) {
112 const auto next = vertexIndex(stack + 1, slice);
113
116 }
117 }
118
120 }
makeVertices()
| std::array< Vertex, VertexCount > helios::engine::rendering::mesh::assets::WireframeSphere::makeVertices () |
|
inline
static
|
Definition at line 59 of file WireframeSphere.ixx.
59 static std::array<Vertex, VertexCount> makeVertices() {
60 std::array<Vertex, VertexCount> result{};
61
62 constexpr float pi = std::numbers::pi_v<float>;
63
64 for (std::size_t stack = 0; stack <= Stacks; ++stack) {
65 const float v = static_cast<float>(stack) / static_cast<float>(Stacks);
67
70
72 const float u = static_cast<float>(slice) / static_cast<float>(Slices);
73 const float phi = u * 2.0f * pi;
74
77
81
86 };
87 }
88 }
89
91 }
vertexIndex()
| std::size_t helios::engine::rendering::mesh::assets::WireframeSphere::vertexIndex (const std::size_t stack, const std::size_t slice) |
|
inline
noexcept
static
|
Definition at line 52 of file WireframeSphere.ixx.
52 static std::size_t vertexIndex(
53 const std::size_t stack,
54 const std::size_t slice
55 ) noexcept {
57 }
Public Static Attributes
HorizontalEdgeCount
| constexpr std::size_t helios::engine::rendering::mesh::assets::WireframeSphere::HorizontalEdgeCount |
|
constexpr
static
|
IndexCount
| constexpr std::size_t helios::engine::rendering::mesh::assets::WireframeSphere::IndexCount |
|
constexpr
static
|
indices
| const std::array<unsigned int, IndexCount> helios::engine::rendering::mesh::assets::WireframeSphere::indices = makeIndices() |
|
static
|
primitiveType
| constexpr PrimitiveType helios::engine::rendering::mesh::assets::WireframeSphere::primitiveType = PrimitiveType::Lines |
|
constexpr
static
|
Radius
| constexpr float helios::engine::rendering::mesh::assets::WireframeSphere::Radius = 0.5f |
|
constexpr
static
|
Slices
| constexpr std::size_t helios::engine::rendering::mesh::assets::WireframeSphere::Slices = 24 |
|
constexpr
static
|
Stacks
| constexpr std::size_t helios::engine::rendering::mesh::assets::WireframeSphere::Stacks = 12 |
|
constexpr
static
|
VertexCount
| constexpr std::size_t helios::engine::rendering::mesh::assets::WireframeSphere::VertexCount |
|
constexpr
static
|
VerticalEdgeCount
| constexpr std::size_t helios::engine::rendering::mesh::assets::WireframeSphere::VerticalEdgeCount |
|
constexpr
static
|
vertices
| const std::array<Vertex, VertexCount> helios::engine::rendering::mesh::assets::WireframeSphere::vertices = makeVertices() |
|
static
|
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.