PixelLightAPI  .
Public Member Functions | Protected Member Functions
PLPhysics::SCPhysicsWorld Class Reference

Physics world scene node container. More...

#include <SCPhysicsWorld.h>

Inheritance diagram for PLPhysics::SCPhysicsWorld:
Inheritance graph
[legend]

List of all members.

Public Member Functions

PLPHYSICS_API bool GetSimulationActive () const
PLPHYSICS_API void SetSimulationActive (bool bValue)
PLPHYSICS_API float GetSimulationSpeed () const
PLPHYSICS_API void SetSimulationSpeed (float fValue)
PLPHYSICS_API float GetSimulationQuality () const
PLPHYSICS_API void SetSimulationQuality (float fValue)
PLPHYSICS_API float GetFrameRate () const
PLPHYSICS_API void SetFrameRate (float fValue)
PLPHYSICS_API const
PLMath::Vector3
GetGravity () const
PLPHYSICS_API void SetGravity (const PLMath::Vector3 &vValue)
PLPHYSICS_API bool GetBuoyancyActive () const
PLPHYSICS_API void SetBuoyancyActive (bool bValue)
PLPHYSICS_API float GetBuoyancyPlaneY () const
PLPHYSICS_API void SetBuoyancyPlaneY (float fValue)
PLPHYSICS_API SCPhysicsWorld ()
 Default constructor.
virtual PLPHYSICS_API ~SCPhysicsWorld ()
 Destructor.
PLPHYSICS_API WorldGetWorld () const
 Returns the PL physics world.
virtual PLPHYSICS_API bool LoadByFilename (const PLCore::String &sFilename, const PLCore::String &sParams="", const PLCore::String &sMethod="") override
 Loads the loadable from a file given by filename.
virtual PLPHYSICS_API bool LoadByFile (PLCore::File &cFile, const PLCore::String &sParams="", const PLCore::String &sMethod="") override
 Loads the loadable from a file given by a reference.

Protected Member Functions

virtual PLPHYSICS_API void InitFunction () override
 This function is called when the scene node gets initialized.
virtual PLPHYSICS_API void DeInitFunction () override
 This function is called when the scene node gets de-initialized.
virtual PLPHYSICS_API void OnActivate (bool bActivate) override
 Called when the scene node has been activated or deactivated.

Detailed Description

Physics world scene node container.

Note:
  • If 'CacheDirectory' is set, the implementation tries to cache for instance 'physics meshes'. This can speed up loading times, but may create 'up to date' problems during development when data was changed, but the cache is still using the old one. So, be careful when using this feature.
  • 'ThreadPriorityClass' and 'ThreadPriority' are only used if the physics API implementation is using an own thread and allows the manipulation of this settings

Constructor & Destructor Documentation

Default constructor.

virtual PLPHYSICS_API PLPhysics::SCPhysicsWorld::~SCPhysicsWorld ( ) [virtual]

Destructor.


Member Function Documentation

PLPHYSICS_API bool PLPhysics::SCPhysicsWorld::GetSimulationActive ( ) const
PLPHYSICS_API void PLPhysics::SCPhysicsWorld::SetSimulationActive ( bool  bValue)
PLPHYSICS_API float PLPhysics::SCPhysicsWorld::GetSimulationSpeed ( ) const
PLPHYSICS_API void PLPhysics::SCPhysicsWorld::SetSimulationSpeed ( float  fValue)
PLPHYSICS_API float PLPhysics::SCPhysicsWorld::GetSimulationQuality ( ) const
PLPHYSICS_API void PLPhysics::SCPhysicsWorld::SetSimulationQuality ( float  fValue)
PLPHYSICS_API float PLPhysics::SCPhysicsWorld::GetFrameRate ( ) const
PLPHYSICS_API void PLPhysics::SCPhysicsWorld::SetFrameRate ( float  fValue)
PLPHYSICS_API void PLPhysics::SCPhysicsWorld::SetGravity ( const PLMath::Vector3 vValue)
PLPHYSICS_API bool PLPhysics::SCPhysicsWorld::GetBuoyancyActive ( ) const
PLPHYSICS_API void PLPhysics::SCPhysicsWorld::SetBuoyancyActive ( bool  bValue)
PLPHYSICS_API float PLPhysics::SCPhysicsWorld::GetBuoyancyPlaneY ( ) const
PLPHYSICS_API void PLPhysics::SCPhysicsWorld::SetBuoyancyPlaneY ( float  fValue)
PLPHYSICS_API World* PLPhysics::SCPhysicsWorld::GetWorld ( ) const

Returns the PL physics world.

Returns:
The PL physics world, a null pointer on error (if that's the case, something went totally wrong :)
virtual PLPHYSICS_API void PLPhysics::SCPhysicsWorld::InitFunction ( ) [override, protected, virtual]

This function is called when the scene node gets initialized.

Reimplemented from PLScene::SceneContainer.

virtual PLPHYSICS_API void PLPhysics::SCPhysicsWorld::DeInitFunction ( ) [override, protected, virtual]

This function is called when the scene node gets de-initialized.

Reimplemented from PLScene::SceneContainer.

virtual PLPHYSICS_API void PLPhysics::SCPhysicsWorld::OnActivate ( bool  bActivate) [override, protected, virtual]

Called when the scene node has been activated or deactivated.

Parameters:
[in]bActivate'true' if the scene node is now active, else 'false'
Note:
  • The scene node "Inactive"-flag as well as the "Frozen"-flag are taken into account
  • 'bActivate' will be 'true' if the scene node AND the parent scene container (recursive!) are active
  • 'bActivate' will be 'false' if the scene node OR the parent scene container (recursive!) is inactive
  • The default implementation calls the "OnActivate()" of all attached scene node modifiers

Reimplemented from PLScene::SceneContainer.

virtual PLPHYSICS_API bool PLPhysics::SCPhysicsWorld::LoadByFilename ( const PLCore::String sFilename,
const PLCore::String sParams = "",
const PLCore::String sMethod = "" 
) [override, virtual]

Loads the loadable from a file given by filename.

Parameters:
[in]sFilenameLoadable filename
[in]sParamsOptional load method parameters, can be an empty string
[in]sMethodOptional name of the load method to use, can be an empty string
Returns:
'true' if all went fine, else 'false'
Note:
  • If no method name was provided, 'Load' if sParams is empty, or 'LoadParams' if sParams is not empty is used automatically

Reimplemented from PLScene::SceneContainer.

virtual PLPHYSICS_API bool PLPhysics::SCPhysicsWorld::LoadByFile ( PLCore::File cFile,
const PLCore::String sParams = "",
const PLCore::String sMethod = "" 
) [override, virtual]

Loads the loadable from a file given by a reference.

Parameters:
[in]cFileFile to load from, must be opened and readable
[in]sParamsOptional load method parameters, can be an empty string
[in]sMethodOptional name of the load method to use, can be an empty string
Returns:
'true' if all went fine, else 'false'
Note:
  • If no method name was provided, 'Load' if sParams is empty, or 'LoadParams' if sParams is not empty is used automatically

Reimplemented from PLScene::SceneContainer.


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


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:22
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported