mirror of
https://github.com/minetest/irrlicht.git
synced 2025-06-30 23:30:27 +02:00
Add more transparent node sorting algorithms
Adding 2 algorithms to sort by distance to camera plane instead of camera position. This is better in quite a few situations and extra cost is just one vector subtraction per node and an additional function parameter per call, I think that's worth it. So made the camera-plane to object-center now the new default. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6573 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@ -111,18 +111,24 @@ namespace scene
|
||||
//! Which can be used to do some custom sorting via scene-graph (mainly useful if you only have to that once)
|
||||
ETNS_NONE,
|
||||
|
||||
//! Distance from node origin to camera
|
||||
//! Distance from node origin to camera position
|
||||
ETNS_ORIGIN,
|
||||
|
||||
//! Distance from node center to camera
|
||||
//! Distance from node center to camera position
|
||||
ETNS_CENTER,
|
||||
|
||||
//! Distance from the nearest of the 2 transformed bounding-box extend corners to camera
|
||||
ETNS_BBOX_EXTENTS,
|
||||
|
||||
//! Distance from node origin to camera plane
|
||||
ETNS_PLANE_ORIGIN,
|
||||
|
||||
//! Distance from node center to camera plane
|
||||
ETNS_PLANE_CENTER,
|
||||
|
||||
//! Default sorting Irrlicht uses currently
|
||||
//! This may change in the future
|
||||
ETNS_DEFAULT = ETNS_CENTER
|
||||
ETNS_DEFAULT = ETNS_PLANE_CENTER
|
||||
};
|
||||
|
||||
class IAnimatedMesh;
|
||||
|
Reference in New Issue
Block a user