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

#include <shaderballmesh.h>

Public Member Functions

 ShaderBallMesh (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

EMemoryUsage mUsage = EMemoryUsage::Static
 Property: 'Usage' If the mesh is uploaded once or frequently updated. More...
 
EPolygonMode mPolygonMode = EPolygonMode::Fill
 Property: 'PolygonMode' Mesh polygon mode (fill, wires, points) More...
 
ECullMode mCullMode = ECullMode::Back
 Property: 'CullMode' controls which triangles are culled, back facing, front facing etc. 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

3D shaderball mesh, located at the origin with a height of 1. This mesh is typically used to preview shaders.

The mesh has position, uv, normal and color vertex attributes. The color attribute can be broken up into 3 channels, where Red(0) is the center, Green(1) is the enclosing shape around it and Blue(2) is the base.

The UV coordinates of this mesh extend beyond the 0–1 range and require tiling. To ensure proper texture repetition, set both the 'AddressModeHorizontal' and 'AddressModeVertical' in your sampler to 'Repeat'.

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

Constructor & Destructor Documentation

◆ ShaderBallMesh()

ShaderBallMesh ( Core core)

Member Function Documentation

◆ getMeshInstance() [1/2]

virtual const MeshInstance& getMeshInstance ( ) const
overridevirtual
Returns
the humanoid mesh instance

Implements IMesh.

◆ getMeshInstance() [2/2]

virtual MeshInstance& getMeshInstance ( )
overridevirtual
Returns
the humanoid mesh instance

Implements IMesh.

◆ init()

virtual bool init ( utility::ErrorState errorState)
overridevirtual

Load mesh and upload to GPU.

Parameters
errorStatethe error message when initialization fails
Returns
if initialization succeeded

Reimplemented from Object.

Member Data Documentation

◆ mCullMode

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

◆ mPolygonMode

Property: 'PolygonMode' Mesh polygon mode (fill, wires, points)

◆ mUsage

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