Commit Graph

2 Commits

Author SHA1 Message Date
cutealien
04d814ee31 Allow nodes ignoring parent transformations with ESNUA_RELATIVE
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
2023-05-02 16:05:22 +00:00
cutealien
b627ce805d Add option to allow nodes to ignore the scale/rotation parts of their parents transformation.
ISceneNode::setUpdateAbsolutePosBehavior can now control what ISceneNode::updateAbsolutePosition really does.
Having only the position and not the rotation/scale of a child node affected by the parent transformation was previously impossible inside the scene-graph. So people always had to break the scene-graph and code it themselves.
Old behaviour is default. 
Extra check for new variable has a small cost, thought new behaviour can actually be faster when it's used.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6432 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-09-29 16:34:37 +00:00