mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-16 15:30:25 +01:00
04d814ee31
New AbsPosUpdateBehavior which makes updateAbsolutePosition calls behave as if a node had no parent. Allows for micro optimizations in cases where we have non-moving root node (all scenenodes are always added to the SceneManager which is generally not moved but it's transformation is still multiplied each frame for each node) As a side-effect this also allows abusing the SceneManager to group objects without affecting transformations. No real extra cost since I added ESNUA_TRANSFORM_POSITION already. Thought turns out those matrix transformations are so fast that I also didn't noticed any difference in tests with > 20.000 nodes. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6481 dfc29bdd-3216-0410-991c-e03cc46cb475
40 lines
1.0 KiB
C++
40 lines
1.0 KiB
C++
// This file is part of the "Irrlicht Engine".
|
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
|
|
|
#ifndef IRR_E_SCENE_NODE_UPDATE_ABS_H_INCLUDED
|
|
#define IRR_E_SCENE_NODE_UPDATE_ABS_H_INCLUDED
|
|
|
|
namespace irr
|
|
{
|
|
namespace scene
|
|
{
|
|
//! Options how ISceneNode::updateAbsolutePosition calculates the AbsoluteTransformation
|
|
enum ESCENE_NODE_UPDATE_ABS
|
|
{
|
|
//! Node and parent transformation matrices are multiplied (default)
|
|
ESNUA_TRANSFORM_MATRIX,
|
|
|
|
//! Only transform the position of the node transformation matrix
|
|
//! by the parent transformation matrix.
|
|
//! Parent will not affect the rotation/scale of the node transformation.
|
|
ESNUA_TRANSFORM_POSITION,
|
|
|
|
//! Use the relative matrix as absolute transformation matrix
|
|
//! Parent node transformation is ignored just like when the parent is set to 0
|
|
ESNUA_RELATIVE
|
|
};
|
|
|
|
//! Names for culling type
|
|
const c8* const SceneNodeUpdateAbsNames[] =
|
|
{
|
|
"matrix",
|
|
"pos",
|
|
"relative",
|
|
0
|
|
};
|
|
|
|
} // end namespace scene
|
|
} // end namespace irr
|
|
|
|
#endif
|