Jopnal Engine  alpha 0.4
Simple Component Based 2D/3D Game Engine
Public Member Functions | List of all members
jop::ModelLoader Class Reference

#include <ModelLoader.hpp>

Inheritance diagram for jop::ModelLoader:
jop::Component

Public Member Functions

 ModelLoader (Object &obj)
 Constructor. More...
 
bool load (const std::string &path)
 Load a model from file. More...
 
const std::pair< glm::vec3, glm::vec3 > & getLocalBounds () const
 Get the local bounds. More...
 
std::pair< glm::vec3, glm::vec3 > getGlobalBounds () const
 Get the global bounds. More...
 
- Public Member Functions inherited from jop::Component
virtual ~Component ()=0
 Virtual destructor. More...
 
Message::Result sendMessage (const Message &message)
 Send a message to this component. More...
 
virtual void update (const float deltaTime)
 Update function. More...
 
uint32 getID () const
 Get the identifier. More...
 
void setID (const uint32 ID)
 Set the identifier. More...
 
WeakReference< ObjectgetObject ()
 Get the object this component is bound to. More...
 
WeakReference< const ObjectgetObject () const
 Get the object this component is bound to. More...
 
bool isActive () const
 Check if this component is active. More...
 
void removeSelf ()
 Remove this component from its object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from jop::Component
 Component (Object &object, const uint32 ID)
 Constructor. More...
 
 Component (const Component &other, Object &newObj)
 Copy constructor. More...
 
virtual Message::Result receiveMessage (const Message &message)
 Receive a message. More...
 

Detailed Description

Definition at line 36 of file ModelLoader.hpp.

Constructor & Destructor Documentation

jop::ModelLoader::ModelLoader ( Object obj)
explicit

Constructor.

Parameters
objThe object this loader is bound to

Member Function Documentation

std::pair<glm::vec3, glm::vec3> jop::ModelLoader::getGlobalBounds ( ) const

Get the global bounds.

Returns
The global bounds
const std::pair<glm::vec3, glm::vec3>& jop::ModelLoader::getLocalBounds ( ) const

Get the local bounds.

Returns
The local bounds
bool jop::ModelLoader::load ( const std::string &  path)

Load a model from file.

This will create the object tree and load the correct meshes and materials. Only models converted with Jopmodel are supported.

Parameters
pathPath to the model file
Returns
True if successful

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