NAP
Public Member Functions | Public Attributes | List of all members
SphereMesh Class Reference

#include <spheremesh.h>

Public Member Functions

 SphereMesh (Core &core)
 
virtual bool init (utility::ErrorState &errorState) override
 
virtual MeshInstancegetMeshInstance () override
 
virtual const MeshInstancegetMeshInstance () const override
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Public Attributes

float mRadius = 1.0f
 Property: 'Radius' of the sphere. More...
 
uint mRings = 50
 Property: 'Rings' number of rings. More...
 
uint mSectors = 50
 Property: 'Sectors' number of sectors. More...
 
EMemoryUsage mUsage = EMemoryUsage::Static
 Property: 'Usage' If the mesh is uploaded once or frequently updated. More...
 
ECullMode mCullMode = ECullMode::Back
 Property: 'CullMode' controls which triangles are culled, back facing, front facing etc. More...
 
EPolygonMode mPolygonMode = EPolygonMode::Fill
 Property: 'PolygonMode' Polygon rasterization mode (fill, line, points) More...
 
RGBAColorFloat mColor = { 1.0f, 1.0f, 1.0f, 1.0f }
 Property: 'Color' the vertex color of the sphere. More...
 
glm::vec3 mPosition = { 0.0, 0.0, 0.0 }
 Property: 'Position' center of the sphere. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

Predefined 3D spherical mesh.

Inheritance diagram for SphereMesh:
[legend]
Collaboration diagram for SphereMesh:
[legend]

Constructor & Destructor Documentation

◆ SphereMesh()

SphereMesh ( Core core)

Member Function Documentation

◆ getMeshInstance() [1/2]

virtual const MeshInstance& getMeshInstance ( ) const
overridevirtual
Returns
the mesh instance that can be rendered

Implements IMesh.

◆ getMeshInstance() [2/2]

virtual MeshInstance& getMeshInstance ( )
overridevirtual
Returns
the mesh instance that can be rendered

Implements IMesh.

◆ init()

virtual bool init ( utility::ErrorState errorState)
overridevirtual

Creates the mesh.

Parameters
errorStatecontains the error if the mesh can't be created.
Returns
if the mesh was created successfully.

Reimplemented from Object.

Member Data Documentation

◆ mColor

RGBAColorFloat mColor = { 1.0f, 1.0f, 1.0f, 1.0f }

Property: 'Color' the vertex color of the sphere.

◆ mCullMode

Property: 'CullMode' controls which triangles are culled, back facing, front facing etc.

◆ mPolygonMode

Property: 'PolygonMode' Polygon rasterization mode (fill, line, points)

◆ mPosition

glm::vec3 mPosition = { 0.0, 0.0, 0.0 }

Property: 'Position' center of the sphere.

◆ mRadius

float mRadius = 1.0f

Property: 'Radius' of the sphere.

◆ mRings

uint mRings = 50

Property: 'Rings' number of rings.

◆ mSectors

uint mSectors = 50

Property: 'Sectors' number of sectors.

◆ mUsage

Property: 'Usage' If the mesh is uploaded once or frequently updated.