Untold Engine
Beta v0.0.16
docs
|
The U4DEntityManager Class manages the rendering, space update, physics, collision and visibility for all objects in a game. More...
Public Member Functions | |
U4DEntityManager () | |
class constructor | |
~U4DEntityManager () | |
class destructor | |
U4DEntityManager (const U4DEntityManager &value) | |
copy constructor | |
U4DEntityManager & | operator= (const U4DEntityManager &value) |
copy constructor | |
void | render (id< MTLCommandBuffer > uCommandBuffer) |
Renders the entities in the scenegraph. More... | |
void | update (float dt) |
Updates the state of each entity. More... | |
void | determineVisibility () |
determines if the current entity is within the camera frustum More... | |
void | setRootEntity (U4DVisibleEntity *uRootEntity) |
sets the root entity More... | |
void | loadIntoCollisionEngine (U4DDynamicAction *uModel) |
loads the 3D model into the collision engine More... | |
void | loadIntoPhysicsEngine (U4DDynamicAction *uModel, float dt) |
loads the 3D model into the physics engine More... | |
void | loadIntoVisibilityManager (U4DModel *uModel) |
loads the 3d model into the visibility manager More... | |
void | changeVisibilityInterval (float uValue) |
change the current visibility interval. The default is 0.5. More... | |
Public Attributes | |
U4DEntity * | rootEntity |
pointer to the root entity. This entity represents the root node in the scenegraph | |
The U4DEntityManager Class manages the rendering, space update, physics, collision and visibility for all objects in a game.
void U4DEngine::U4DEntityManager::changeVisibilityInterval | ( | float | uValue | ) |
change the current visibility interval. The default is 0.5.
This interval determines how fast the BVH is computed to determine which 3D models are within the camera frustum. The lower this interval, the faster the BVH is computed.
uValue | time interval. |
void U4DEngine::U4DEntityManager::determineVisibility | ( | ) |
determines if the current entity is within the camera frustum
any 3D model outside of the frustum are not rendered
void U4DEngine::U4DEntityManager::loadIntoCollisionEngine | ( | U4DDynamicAction * | uModel | ) |
loads the 3D model into the collision engine
uModel | pointer to the 3d model |
void U4DEngine::U4DEntityManager::loadIntoPhysicsEngine | ( | U4DDynamicAction * | uModel, |
float | dt | ||
) |
loads the 3D model into the physics engine
uModel | pointer to the 3d model |
dt | time-step |
void U4DEngine::U4DEntityManager::loadIntoVisibilityManager | ( | U4DModel * | uModel | ) |
loads the 3d model into the visibility manager
the visibility manager determines if a 3d model is within the camera frustum
uModel | pointer to the 3d model |
void U4DEngine::U4DEntityManager::render | ( | id< MTLCommandBuffer > | uCommandBuffer | ) |
Renders the entities in the scenegraph.
It calls the individual render method of each entity in the scenegraph
uRenderEncoder | Metal encoder object for the current entity |
void U4DEngine::U4DEntityManager::setRootEntity | ( | U4DVisibleEntity * | uRootEntity | ) |
sets the root entity
the root entity represents the root node in the scenegraph
uRootEntity | pointer to the root parent entity |
void U4DEngine::U4DEntityManager::update | ( | float | dt | ) |
Updates the state of each entity.
It updates the space matrix and calls the physics engine and collision system to evaluate each entity.
dt | time-step value |