GUInity
Public Member Functions | Protected Attributes | List of all members
MeshComponent Class Referenceabstract

#include <MeshComponent.hpp>

Inheritance diagram for MeshComponent:
Component FontMesh MeshFilter

Public Member Functions

 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)
 
virtual shared_ptr< Componentclone ()=0
 
virtual shared_ptr< ComponentDescriptiongetComponentDescription () override
 
virtual void deserialize (shared_ptr< ComponentDescription > desc) override
 
- 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)
 

Protected Attributes

shared_ptr< Meshmesh
 
- Protected Attributes inherited from Component
bool initWithData
 
bool isActive
 

Additional Inherited Members

- Protected Member Functions inherited from Component
void setCopyMode (bool initWithData)
 

Detailed Description

MeshComponent is a Component makes a reference to a Mesh asset. This is important to prevent the same Mesh to live multiple times in memory. This class is inherited used by MeshFilter and FontMesh

Constructor & Destructor Documentation

MeshComponent::MeshComponent ( )

Default Constructor

MeshComponent::~MeshComponent ( )
virtual

Default Destructor. Virtual because this is a parent class

Member Function Documentation

virtual shared_ptr<Component> MeshComponent::clone ( )
pure virtual

Pure virtual function. Clones current component (Prototype Design Pattern)

Returns
shared_ptr to cloned MeshComponent Component

Implements Component.

Implemented in FontMesh, and MeshFilter.

void MeshComponent::getBoxSize ( shared_ptr< Actor actor,
PxVec3 &  boxSize,
PxVec3 &  center 
)

Gets the center and the AABB size for the Actor that this component is attached to

void MeshComponent::getCapsuleGeometry ( shared_ptr< Actor actor,
float &  radius,
float &  halfHeight,
RotateAxis &  orientation,
PxVec3 &  center 
)

Gets the center and the capsule description for the Actor that this component is attached to

shared_ptr< Mesh > MeshComponent::getMesh ( )

mesh Setter

mesh Getter

void MeshComponent::getSphereSize ( shared_ptr< Actor actor,
float &  radius,
PxVec3 &  center 
)

Gets the center and the radius for the Actor that this component is attached to

void MeshComponent::setMesh ( shared_ptr< Mesh mesh)

mesh Getter

mesh Setter

Member Data Documentation

shared_ptr<Mesh> MeshComponent::mesh
protected

The Mesh Asset


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