ConeGeometry
ConeGeometry ⟵ CylinderGeometry ⟵ BufferGeometry
A geometry class for a cone with given radius and height.
ConeGeometry creates a cone geometry that is centered on the origin,
with the cone axis aligned along the Y axis. The cone has a circular
base and tapers to a point at the top.
Methods
ConeGeometry(f32 radius, f32 height, u32 radialSegments, u32 heightSegments, bool openEnded, f32 thetaStart, f32 thetaLength, const Color& color)
Universal constructor - covers all cases with smart defaults
| radius | Radius of the cone base | 1.0f |
| height | Height of the cone | 1.0f |
| radialSegments | Number of segments around circumference | 32 |
| heightSegments | Number of segments along height | 1 |
| openEnded | Whether base is open (true) or capped (false) | false |
| thetaStart | Start angle for first segment in radians | 0.0f |
| thetaLength | Central angle of circular sector in radians | 2π |
| color | RGBA color for all vertices | 0xFFFFFFFF |
ConeGeometry* clone(bool recursive = false) const
Creates a copy of this geometry
| recursive | Whether to clone descendants as well |
void copy(const ConeGeometry& geometry)
Copies properties from another geometry
| geometry | Source geometry to copy from |
void buildCone()
Builds the cone geometry with vertices, indices, and colors
Properties
| color | Color | RGBA color for all vertices |
| height | f32 | Height of the cone |
| heightSegments | u32 | Number of segments along height |
| openEnded | bool | Whether base is open or capped |
| radialSegments | u32 | Number of segments around circumference |
| radius | f32 | Radius of the cone base |
| thetaLength | f32 | Central angle in radians |
| thetaStart | f32 | Start angle in radians |