manages level-of-detail
More...
#include <lod_node.hpp>
|
| LODNode (std::string group_name, scene::ISceneNode *parent, scene::ISceneManager *mgr, s32 id=-1) |
|
virtual const core::aabbox3d< f32 > & | getBoundingBox () const |
| returns the axis aligned bounding box of this node
|
|
int | getLevel () |
| Returns the level to use, or -1 if the object is too far away.
|
|
void | updateVisibility (bool *shown=NULL) |
|
void | add (int level, scene::ISceneNode *node, bool reparent) |
| Adds a node associated with a level of detail.
|
|
void | autoComputeLevel (float scale) |
| This method can be used to automatically compute LoD level.
|
|
void | forceLevelOfDetail (int n) |
| Forces the level of detail to be n.
|
|
scene::ISceneNode * | getFirstNode () |
| Get the highest level of detail node.
|
|
std::vector< scene::ISceneNode * > & | getAllNodes () |
|
virtual void | OnAnimate (u32 timeMs) |
| OnAnimate() is called just before rendering the whole scene.
|
|
virtual void | OnRegisterSceneNode () |
|
virtual void | render () |
|
virtual scene::ESCENE_NODE_TYPE | getType () const |
|
const std::string & | getGroupName () const |
|
|
core::matrix4 | RelativeTransformationMatrix |
|
core::aabbox3d< f32 > | Box |
|
std::vector< int > | m_detail |
|
std::vector< irr::scene::ISceneNode * > | m_nodes |
|
std::set< scene::ISceneNode * > | m_nodes_set |
|
std::string | m_group_name |
|
int | m_forced_lod |
| The normal level of detail can be overwritten.
|
|
std::unique_ptr< int > | m_current_level |
|
float | m_area |
|
bool | m_update_box_every_frame |
|
◆ LODNode()
LODNode::LODNode |
( |
std::string |
group_name, |
|
|
scene::ISceneNode * |
parent, |
|
|
scene::ISceneManager * |
mgr, |
|
|
s32 |
id = -1 |
|
) |
| |
- Parameters
-
group_name | Only useful for getGroupName() |
◆ add()
void LODNode::add |
( |
int |
level, |
|
|
scene::ISceneNode * |
node, |
|
|
bool |
reparent |
|
) |
| |
Adds a node associated with a level of detail.
- Note
- The LOD levels must be added in ascending order.
- Parameters
-
level | Distance (number of units) from which this level of detail kicks in |
node | The node to show at this level |
reparent | If true, node will be removed from its current parent first |
◆ forceLevelOfDetail()
void LODNode::forceLevelOfDetail |
( |
int |
n | ) |
|
Forces the level of detail to be n.
If n>number of levels, the most detailed level is used. This is used to disable LOD when the end camera is activated, since it zooms in to the kart.
◆ OnAnimate()
void LODNode::OnAnimate |
( |
u32 |
timeMs | ) |
|
|
virtual |
OnAnimate() is called just before rendering the whole scene.
This method will be called once per frame, independent of whether the scene node is visible or not.
◆ m_forced_lod
int LODNode::m_forced_lod |
|
private |
The normal level of detail can be overwritten.
If m_forced_lod is >=0, only this level is be used.
The documentation for this class was generated from the following files: