Inheritance diagram for ege::Environement:

Classes

class  ResultNearestElement
 

Public Member Functions

 DECLARE_FACTORY (Environement)
 
void addCamera (const std::string &_name, const ememory::SharedPtr< ege::Camera > &_camera)
 
ememory::SharedPtr< ege::CameragetCamera (const std::string &_name)
 
std::map< std::string, ememory::SharedPtr< ege::Camera > > getCameraList () const
 
void clear ()
 
ememory::SharedPtr< ege::ElementcreateElement (const std::string &_type, const std::string &_description, bool _autoAddElement=true)
 
ememory::SharedPtr< ege::ElementcreateElement (const std::string &_type, const ejson::Value &_value, bool _autoAddElement=true)
 
ememory::SharedPtr< ege::ElementcreateElement (const std::string &_type, const exml::Node &_node, bool _autoAddElement=true)
 
ememory::SharedPtr< ege::ElementcreateElement (const std::string &_type, void *_data, bool _autoAddElement=true)
 
ememory::SharedPtr< ege::ElementcreateElement (const std::string &_type, bool _autoAddElement=true)
 
ege::physics::EnginegetPhysicEngine ()
 
std::vector< ememory::SharedPtr< ege::Element > > & getElement ()
 
ememory::SharedPtr< ege::ElementgetElementNearest (ememory::SharedPtr< ege::Element > _sourceRequest, float &_distance)
 
void getElementNearest (const vec3 &_sourcePosition, float _distanceMax, std::vector< ege::Environement::ResultNearestElement > &_resultList)
 
void getElementNearestFixed (const vec3 &_sourcePosition, float _distanceMax, std::vector< ege::Environement::ResultNearestElement > &_resultList)
 
void addElement (ememory::SharedPtr< ege::Element > _newElement)
 
void rmElement (ememory::SharedPtr< ege::Element > _removeElement)
 
void getOrderedElementForDisplay (std::vector< ege::Environement::ResultNearestElement > &_resultList, const vec3 &_position, const vec3 &_direction)
 
void generateInteraction (ege::ElementInteraction &_event)
 
ege::ParticuleEnginegetParticuleEngine ()
 
void addStaticMeshToDraw (const ememory::SharedPtr< ege::resource::Mesh > &_mesh)
 
std::vector< ememory::SharedPtr< ege::resource::Mesh > > & getStaticMeshToDraw ()
 
virtual void onChangePropertyStatus ()
 

Static Public Member Functions

static void addCreator (const std::string &_type, ege::createElement_tf _creator)
 

Public Attributes

esignal::Signal< float > signalPlayTimeChange
 
eproperty::List< enum gameStatus > propertyStatus
 
eproperty::Value< float > propertyRatio
 
esignal::Connection m_periodicCallConnection
 

Protected Attributes

std::map< std::string, ememory::SharedPtr< ege::Camera > > m_listCamera
 
int64_t m_gameTime
 
std::vector< ememory::SharedPtr< ege::resource::Mesh > > m_listMeshToDrawFirst
 

Member Function Documentation

§ addCamera()

void ege::Environement::addCamera ( const std::string &  _name,
const ememory::SharedPtr< ege::Camera > &  _camera 
)

Add a camera in the camera pool.

Parameters
[in]_nameName of the camera.
[in]_cameraPointer on the camera to add.

§ addCreator()

static void ege::Environement::addCreator ( const std::string &  _type,
ege::createElement_tf  _creator 
)
static

add a creator element system

Parameters
[in]_typeType of the element.
[in]_creatorFunction pointer that reference the element creating.

§ addElement()

void ege::Environement::addElement ( ememory::SharedPtr< ege::Element _newElement)

add an element on the list availlable.

Parameters
[in]_newElementElement to add.

§ clear()

void ege::Environement::clear ( )

Remove all from the current environement.

§ createElement()

ememory::SharedPtr<ege::Element> ege::Environement::createElement ( const std::string &  _type,
const std::string &  _description,
bool  _autoAddElement = true 
)

Create an element on the curent scene.

Parameters
[in]_typeType of the element that might be created.
[in]_descriptionString that describe the content of the element properties.
[in]_autoAddElementthis permit to add the element if it is created == > no more action ...
Returns
nullptr if an error occured OR the pointer on the element and it is already added on the system.
Note
Pointer is return in case of setting properties on it...

§ generateInteraction()

void ege::Environement::generateInteraction ( ege::ElementInteraction _event)

generate an event on all the sub element of the game == > usefull for explosion, or lazer fire ...

Parameters
[in]_eventevent that might be apply ...

§ getCamera()

ememory::SharedPtr<ege::Camera> ege::Environement::getCamera ( const std::string &  _name)

Get a specific camera.

Parameters
[in]_nameName of the camera.
Returns
A pointer on the camera requested.

§ getCameraList()

std::map<std::string, ememory::SharedPtr<ege::Camera> > ege::Environement::getCameraList ( ) const
inline

Get List of all camera.

Returns
All the camera registerred.

§ getElement()

std::vector<ememory::SharedPtr<ege::Element> >& ege::Environement::getElement ( )
inline

get a reference on the curent list of element games

Returns
all element list

§ getElementNearest()

ememory::SharedPtr<ege::Element> ege::Environement::getElementNearest ( ememory::SharedPtr< ege::Element _sourceRequest,
float &  _distance 
)

get the nearest Element

Parameters
[in]_sourceRequestPointer on the element that request this.
[in]_distanceMaximum distance search == > return the element distance
Returns
Pointer on the neares element OR nullptr

§ getOrderedElementForDisplay()

void ege::Environement::getOrderedElementForDisplay ( std::vector< ege::Environement::ResultNearestElement > &  _resultList,
const vec3 _position,
const vec3 _direction 
)

get the element order from the nearest to the farest, and remove all element that are not in the camera angle and axes.

Parameters
[in,out]_resultListList of the element ordered.
[in]_positionCamera position in the space.
[in]_directionCamera direction of the view.

§ getParticuleEngine()

ege::ParticuleEngine& ege::Environement::getParticuleEngine ( )
inline

get the particule engine reference.

Returns
The requested reference on the engine

§ rmElement()

void ege::Environement::rmElement ( ememory::SharedPtr< ege::Element _removeElement)

remove an element on the list availlable.

Parameters
[in]_removeElementElement to remove.

Member Data Documentation

§ m_gameTime

int64_t ege::Environement::m_gameTime
protected

time of the game running

§ m_listCamera

std::map<std::string, ememory::SharedPtr<ege::Camera> > ege::Environement::m_listCamera
protected

list of all camera in the world

§ propertyRatio

eproperty::Value<float> ege::Environement::propertyRatio

Speed ratio.

§ propertyStatus

eproperty::List<enum gameStatus> ege::Environement::propertyStatus

the display is running (not in pause)


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