GUInity
Public Member Functions | List of all members
FontMesh Class Reference

#include <FontMesh.hpp>

Inheritance diagram for FontMesh:
MeshComponent Component

Public Member Functions

 FontMesh ()
 
virtual ~FontMesh ()
 
void setFont (shared_ptr< Font > font)
 
shared_ptr< FontgetFont ()
 
void setText (string text)
 
string getText ()
 
void createMesh ()
 
virtual shared_ptr< Componentclone () override
 
virtual shared_ptr< ComponentDescriptiongetComponentDescription () override
 
virtual void deserialize (shared_ptr< ComponentDescription > desc) override
 
- Public Member Functions inherited from MeshComponent
 MeshComponent ()
 
virtual ~MeshComponent ()
 
void setMesh (shared_ptr< Mesh > mesh)
 
shared_ptr< MeshgetMesh ()
 
void getBoxSize (shared_ptr< Actor > actor, PxVec3 &boxSize, PxVec3 &center)
 
void getSphereSize (shared_ptr< Actor > actor, float &radius, PxVec3 &center)
 
void getCapsuleGeometry (shared_ptr< Actor >actor, float &radius, float &halfHeight, RotateAxis &orientation, PxVec3 &center)
 
- Public Member Functions inherited from Component
 Component ()
 
virtual ~Component ()
 
virtual void init ()
 
virtual void destroy ()
 
virtual void setActive (bool isActive)
 
virtual void awake ()
 
virtual void tick (float deltaSecods)
 
shared_ptr< ActorgetActor ()
 
void setActor (weak_ptr< Actor > actor)
 

Additional Inherited Members

- Protected Member Functions inherited from Component
void setCopyMode (bool initWithData)
 
- Protected Attributes inherited from MeshComponent
shared_ptr< Meshmesh
 
- Protected Attributes inherited from Component
bool initWithData
 
bool isActive
 

Detailed Description

FontMesh is a MeshComponent, meaning that it holds reference to a Mesh. Unlike MeshFilter, that makes reference to a "static" mesh, a file mesh, the FontMesh makes reference to a dynamic mesh, created according to the text it's going to display.

Constructor & Destructor Documentation

FontMesh::FontMesh ( )

Default Constructor

FontMesh::~FontMesh ( )
virtual

Default Destructor. Virtual because it's children class.

Member Function Documentation

shared_ptr< Component > FontMesh::clone ( )
overridevirtual

Clones current component (Prototype Design Pattern)

Returns
shared_ptr to cloned FontMesh Component

Implements MeshComponent.

void FontMesh::createMesh ( )

create the mesh according to the font and text

shared_ptr< Font > FontMesh::getFont ( )

font getter

string FontMesh::getText ( )

text getter

void FontMesh::setFont ( shared_ptr< Font font)

font setter

void FontMesh::setText ( string  text)

text setter


The documentation for this class was generated from the following files: