#include <planemesh.h>
Public Member Functions | |
PlaneMesh (Core &core) | |
virtual bool | init (utility::ErrorState &errorState) override |
bool | setup (utility::ErrorState &error) |
virtual MeshInstance & | getMeshInstance () override |
virtual const MeshInstance & | getMeshInstance () const override |
const math::Rect & | getRect () |
![]() | |
Resource () | |
![]() | |
Object () | |
virtual | ~Object () |
virtual void | onDestroy () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
Public Attributes | |
glm::vec2 | mSize = { 1.0, 1.0 } |
Property: 'Size' the size of the plane in units. More... | |
glm::vec2 | mPosition = { 0.0,0.0 } |
Property: 'Position' where the plane is positioned in object space. More... | |
RGBAColorFloat | mColor = { 1.0f, 1.0f, 1.0f, 1.0f } |
Property: 'Color' color of the plane. More... | |
uint | mRows = 1 |
Property: 'Rows' number of rows. More... | |
uint | mColumns = 1 |
Property: 'Columns' number of columns. More... | |
EMemoryUsage | mUsage = EMemoryUsage::Static |
Property: 'Usage' If the plane is uploaded once or frequently updated. More... | |
ECullMode | mCullMode = ECullMode::None |
Property: 'CullMode' Plane cull mode, defaults to no culling. More... | |
EPolygonMode | mPolygonMode = EPolygonMode::Fill |
Property: 'PolygonMode' Polygon rasterization mode (fill, line, points) More... | |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Additional Inherited Members | |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Predefined rectangular mesh with a specific size centered at the origin on the xy axis. When there is no size given the mesh is a uniform 1m2. The UV coordinates are always 0-1. By default the plane has 1 row and 1 column.
|
overridevirtual |
Implements IMesh.
|
overridevirtual |
Implements IMesh.
const math::Rect& getRect | ( | ) |
|
overridevirtual |
Sets up, initializes and uploads the plane to the GPU based on the provided parameters.
errorState | contains the error message if the mesh could not be created. |
Reimplemented from Object.
bool setup | ( | utility::ErrorState & | error | ) |
Creates and prepares the mesh instance but doesn't initialize it. Call this when you want to prepare a grid without creating the GPU representation. You have to manually call init() on the mesh instance afterwards.
error | contains the error code if setup fails |
RGBAColorFloat mColor = { 1.0f, 1.0f, 1.0f, 1.0f } |
Property: 'Color' color of the plane.
uint mColumns = 1 |
Property: 'Columns' number of columns.
ECullMode mCullMode = ECullMode::None |
Property: 'CullMode' Plane cull mode, defaults to no culling.
EPolygonMode mPolygonMode = EPolygonMode::Fill |
Property: 'PolygonMode' Polygon rasterization mode (fill, line, points)
glm::vec2 mPosition = { 0.0,0.0 } |
Property: 'Position' where the plane is positioned in object space.
uint mRows = 1 |
Property: 'Rows' number of rows.
glm::vec2 mSize = { 1.0, 1.0 } |
Property: 'Size' the size of the plane in units.
EMemoryUsage mUsage = EMemoryUsage::Static |
Property: 'Usage' If the plane is uploaded once or frequently updated.