Circle Struct
Basic Circle Shape (2D, in XY plane). More...
Declaration
Base struct
| struct | Shape |
|
Struct representing geometric primitives and indices for various shapes. provides immutable, shared access to vertices and indices of the represented geometric shape. More... | |
Public Constructors Index
| Circle () | |
|
Creates a default circle (radius 1.0, 64 segments). More... | |
| Circle (float radius, unsigned int segments) | |
|
Creates a circle with a specific radius and segment count. More... | |
Public Member Functions Index
| helios::rendering::model::config::PrimitiveType | primitiveType () const noexcept override |
Private Static Functions Index
| static std::vector< Vertex > | generateVertices (float radius, unsigned int segments) |
|
Dynamically creates the vertex list for a circle. Generates one center vertex (Index 0) and 'segments' vertices on the circumference. More... | |
| static std::vector< unsigned int > | generateIndices (unsigned int segments) |
|
Creates the index list for a `Triangle Fan` (for GL_TRIANGLES). Each triangle consists of (center, point_i, point_i+1). More... | |
Description
Basic Circle Shape (2D, in XY plane).
Generates a 2D circle mesh, centered at the origin on the XY plane (Z=0). The normals point in the positive Z direction. The indices are arranged as a Triangle Fan (for GL_TRIANGLES).
Definition at line 29 of file Circle.ixx.
Public Constructors
Circle()
| inline |
Circle()
| inline explicit |
Creates a circle with a specific radius and segment count.
- Parameters
-
radius The radius of the circle (from center to circumference).
segments The number of triangle segments that make up the circle. (More segments = smoother circle).
Definition at line 103 of file Circle.ixx.
Public Member Functions
primitiveType()
| inline nodiscard noexcept virtual |
Returns the intended PrimitiveType for this Shape.
This method returns the intended PrimitiveType for the Shape represented by this instance. This information can be used to properly set up the MeshConfig wrapping this Shape.
- Returns
The intended PrimitiveType of this Shape.
Definition at line 109 of file Circle.ixx.
Reference helios::rendering::model::config::Triangles.
Private Static Functions
generateIndices()
| inline static |
Creates the index list for a `Triangle Fan` (for GL_TRIANGLES). Each triangle consists of (center, point_i, point_i+1).
Definition at line 73 of file Circle.ixx.
generateVertices()
| inline static |
Dynamically creates the vertex list for a circle. Generates one center vertex (Index 0) and 'segments' vertices on the circumference.
Definition at line 36 of file Circle.ixx.
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.