PixelLightAPI
.
|
Basic PL physics character scene node modifier class. More...
#include <SNMPhysicsCharacter.h>
Public Types | |
enum | EFlags { YMovement = 1<<2 } |
Scene node modifier flags (PLScene::SceneNodeModifier flags extension) More... | |
Public Member Functions | |
PL_API bool | IsRunning () const |
Gets the running mode. | |
PL_API void | SetRunning (bool bRun=false) |
Sets the running mode. | |
PL_API bool | IsCreeping () const |
Gets the creeping mode. | |
PL_API void | SetCreeping (bool bCreep=false) |
Sets the creeping mode. | |
PL_API const PLMath::Vector3 & | GetMovement () const |
Gets the movement vector. | |
PL_API void | SetMovement (const PLMath::Vector3 &vMovement) |
Sets the movement vector. | |
PL_API bool | Jump () |
Performs a jump. | |
Protected Member Functions | |
PL_API PLPhysics::Body * | GetPhysicsBody () const |
Returns the PL physics body of the scene node. | |
virtual PL_API void | OnActivate (bool bActivate) override |
Called when the scene node modifier has been activated or deactivated. |
Basic PL physics character scene node modifier class.
Scene node modifier flags (PLScene::SceneNodeModifier flags extension)
YMovement |
Perform movement also on the y axis, else movement is just performed on the x/z plane |
Reimplemented from PLScene::SceneNodeModifier.
Reimplemented in PLEngine::SNMPhysicsCharacterController.
PL_API bool PLEngine::SNMPhysicsCharacter::IsRunning | ( | ) | const |
Gets the running mode.
PL_API void PLEngine::SNMPhysicsCharacter::SetRunning | ( | bool | bRun = false | ) |
Sets the running mode.
[in] | bRun | Did the character run? |
PL_API bool PLEngine::SNMPhysicsCharacter::IsCreeping | ( | ) | const |
Gets the creeping mode.
PL_API void PLEngine::SNMPhysicsCharacter::SetCreeping | ( | bool | bCreep = false | ) |
Sets the creeping mode.
[in] | bCreep | Did the character creep? |
PL_API const PLMath::Vector3& PLEngine::SNMPhysicsCharacter::GetMovement | ( | ) | const |
Gets the movement vector.
PL_API void PLEngine::SNMPhysicsCharacter::SetMovement | ( | const PLMath::Vector3 & | vMovement | ) |
Sets the movement vector.
[in] | vMovement | The new movement vector, if the length is >1, the vector is used in a normalized form inside OnUpdate() |
PL_API bool PLEngine::SNMPhysicsCharacter::Jump | ( | ) |
Performs a jump.
PL_API PLPhysics::Body* PLEngine::SNMPhysicsCharacter::GetPhysicsBody | ( | ) | const [protected] |
Returns the PL physics body of the scene node.
virtual PL_API void PLEngine::SNMPhysicsCharacter::OnActivate | ( | bool | bActivate | ) | [override, protected, virtual] |
Called when the scene node modifier has been activated or deactivated.
[in] | bActivate | 'true' if the scene node modifier is now active, else 'false' |
Reimplemented from PLScene::SceneNodeModifier.
Reimplemented in PLEngine::SNMPhysicsCharacterController.
|