PixelLightAPI  .
Public Types | Public Member Functions | Protected Member Functions
PLScene::SNMPositionPath Class Reference

Scene node modifier class moving the position of a scene node along a given path. More...

#include <SNMPositionPath.h>

Inheritance diagram for PLScene::SNMPositionPath:
Inheritance graph
[legend]

List of all members.

Public Types

enum  EInterpolation { Linear = 0, CatmullRomCurve = 1 }
 Interpolation type. More...

Public Member Functions

 pl_enum (EInterpolation) pl_enum_value(Linear
Linear interpolation pl_enum_value (CatmullRomCurve,"Catmull rom curve interpolation") pl_enum_endenum EFlags
 Scene node modifier flags (SceneNodeModifier flags extension)
PLS_API SNMPositionPath (SceneNode &cSceneNode)
 Constructor.
virtual PLS_API ~SNMPositionPath ()
 Destructor.
PLS_API PLMath::GraphPathGetGraphPath () const
 Returns the used graph path.

Protected Member Functions

virtual PLS_API void OnActivate (bool bActivate) override
 Called when the scene node modifier has been activated or deactivated.

Detailed Description

Scene node modifier class moving the position of a scene node along a given path.

Remarks:
There are two major strategies how to move along a path:
  • By giving the percentage along the whole path, 0-1. This is the default setting and has the advantage that the movement speed is constant and not depend of the length of each path segment.
  • By giving the percentage by node index, 0-<number of="" nodes>="">. By using this approach the movement speed on the path may vary, this depends on whether or not all path segments have the same length. Beside the major strategy, it's possible to set the interpolation type.

Member Enumeration Documentation

Interpolation type.

Enumerator:
Linear 

Linear interpolation

CatmullRomCurve 

Catmull rom curve interpolation


Constructor & Destructor Documentation

Constructor.

Parameters:
[in]cSceneNodeOwner scene node
virtual PLS_API PLScene::SNMPositionPath::~SNMPositionPath ( ) [virtual]

Destructor.


Member Function Documentation

Linear interpolation PLScene::SNMPositionPath::pl_enum_value ( CatmullRomCurve  ,
"Catmull rom curve interpolation"   
) [inline]

Scene node modifier flags (SceneNodeModifier flags extension)

< 'Progress' defined by 'node index' instead or 'percentage along path'

Returns the used graph path.

Returns:
The used graph path, can be a null pointer
virtual PLS_API void PLScene::SNMPositionPath::OnActivate ( bool  bActivate) [override, protected, virtual]

Called when the scene node modifier has been activated or deactivated.

Parameters:
[in]bActivate'true' if the scene node modifier 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 modifier AND the owner scene node AND it's parent scene container (recursive!) are active
  • 'bActivate' will be 'false' if the scene node modifier OR the owner scene node OR it's parent scene container (recursive!) is inactive
  • The default implementation is empty

Reimplemented from PLScene::SceneNodeModifier.


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:25
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported