This reference page is linked to from the following overview topics: FBX SDK 2011, Supported Scene Elements, FBX Node Attributes, List of Python FBX classes.
Defines a LOD (Level of Detail) group.
This LodGroup node is a group node that can be used to detect how close a group of objects is to a camera. Typically this node is used for controlling "Level of Detail" visibility.
Properties in the class are designed according to Maya implementation. So these properties may be incompatible with other software, like 3ds Max.
In Maya, with "Level of Detail",the visibility of the children of this transform are controlled by the distance of a group to a camera and the threshold values. For example, under a LOD group node, there are three children: ship_detailed, ship_medium, and ship_rough. There are three threshold values: 5, 10 and 15. When the camera is within 5 units of the group bounding box, only ship_detailed is visible. When the view is zoomed out and the camera is 9 units away from the group, only ship_medium is visible. When the view is zoomed out to 30 units away, only ship_rough is visible.
This node attribute contains the properties of a null node.
Example code to create LODGroup:
KFbxNode *lLodGroup = KFbxNode::Create(pScene, "LODNode"); KFbxLodGroup *lLodGroupAttr = KFbxLodGroup::Create(pScene, "LODGroup1"); // Array lChildNodes contains geometries of all LOD levels for (int j = 0; j < lChildNodes.GetCount(); j++) { lLodGroup->AddChild(lChildNodes.GetAt(j)); }
Definition at line 81 of file kfbxlodgroup.h.
#include <kfbxlodgroup.h>
Public Types |
|
enum | EDisplayLevel { eUseLOD, eShow, eHide } |
types to determine how to display nodes in LODGroup. More... |
|
Public Member Functions |
|
virtual EAttributeType | GetAttributeType () const |
Return the type of node attribute which is
EAttributeType::eLODGROUP. |
|
int | GetNumThresholds () const |
Get the size of the threshold list. |
|
bool | AddThreshold (fbxDistance pThreshValue) |
Add a new threshold value to the current
list. |
|
bool | SetThreshold (int pEl, fbxDistance pThreshValue) |
Set the threshold value for the specified
object. |
|
bool | GetThreshold (int pEl, fbxDistance &pThreshValue) const |
Get the threshold value for the specified
object. |
|
int | GetNumDisplayLevels () const |
Get the size of the displayLevel list.
|
|
bool | AddDisplayLevel (KFbxLodGroup::EDisplayLevel pValue) |
Add a new displayLevel value to the current
list. |
|
bool | SetDisplayLevel (int pEl, KFbxLodGroup::EDisplayLevel pValue) |
Set the display level value for the
specified object. |
|
bool | GetDisplayLevel (int pEl, KFbxLodGroup::EDisplayLevel &pValue) const |
Get the display level value for the
specified object. |
|
virtual KFbxObject & | Copy (const KFbxObject &pObject) |
Copy an object content into this object.
|
|
virtual KStringList | GetTypeFlags () const |
Public Attributes |
|
KFbxTypedProperty< fbxBool1 > | MinMaxDistance |
This property handles the use of the Min/Max
distances. |
|
KFbxTypedProperty< fbxDouble1 > | MinDistance |
The minimum distance at which the group is
displayed. |
|
KFbxTypedProperty< fbxDouble1 > | MaxDistance |
The maximum distance at which the group is
displayed. |
|
KFbxTypedProperty< fbxBool1 > | WorldSpace |
Work in world space of transform or local
space If true, the camera distance to the LOD group will be
computed in world space. |
|
Protected Member Functions |
|
KFbxLodGroup (KFbxSdkManager &pManager, char const *pName) | |
virtual bool | ConstructProperties (bool pForceSet) |
enum EDisplayLevel |
types to determine how to display nodes in LODGroup.
Definition at line 94 of file kfbxlodgroup.h.
{ eUseLOD, eShow, eHide } EDisplayLevel;
KFbxLodGroup | ( | KFbxSdkManager & | pManager, |
char const * | pName | ||
) | [protected] |
virtual EAttributeType GetAttributeType | ( | ) | const [virtual] |
Return the type of node attribute which is EAttributeType::eLODGROUP.
Reimplemented from KFbxNodeAttribute.
int GetNumThresholds | ( | ) | const |
Get the size of the threshold list.
In correct situation, the size is less one than LOD nodes number.
bool AddThreshold | ( | fbxDistance | pThreshValue | ) |
Add a new threshold value to the current list.
pThreshValue | Threshold distance from the previous entry in the threshold list |
bool SetThreshold | ( | int | pEl, |
fbxDistance | pThreshValue | ||
) |
Set the threshold value for the specified object.
pEl | The index of the object we want to set the threshold. |
pThreshValue | Threshold distance from the previous entry in the threshold list |
bool GetThreshold | ( | int | pEl, |
fbxDistance & | pThreshValue | ||
) | const |
Get the threshold value for the specified object.
pEl | The index of the object we want to get the threshold. |
pThreshValue | the current threshold value. |
int GetNumDisplayLevels | ( | ) | const |
Get the size of the displayLevel list.
In correct situation, the size is equal to LOD nodes number.
bool AddDisplayLevel | ( | KFbxLodGroup::EDisplayLevel | pValue | ) |
Add a new displayLevel value to the current list.
The value overrides the display of any level and can force it to hide or show the object at that level. For example, if the distance between the group and the camera is smaller than the first threshold, then the object at level 0 is visible. If the display level for the object at level 2 is changed to eShow, ie. if the attribute displayLevel[2] is set to eShow, then the object at level 2 will show, regardless of the current active level.
pValue | Display level value |
bool SetDisplayLevel | ( | int | pEl, |
KFbxLodGroup::EDisplayLevel | pValue | ||
) |
Set the display level value for the specified object.
pEl | The index of the object we want to set the display level. |
pValue | New display level value |
bool GetDisplayLevel | ( | int | pEl, |
KFbxLodGroup::EDisplayLevel & | pValue | ||
) | const |
Get the display level value for the specified object.
pEl | The index of the object we want to get the display level value. |
pValue | the current display level value. |
virtual KFbxObject& Copy | ( | const KFbxObject & | pObject | ) | [virtual] |
Copy an object content into this object.
pObject | The source object to copy data from. |
Reimplemented from KFbxObject.
virtual bool ConstructProperties | ( | bool | pForceSet | ) | [protected, virtual] |
Reimplemented from KFbxNodeAttribute.
virtual KStringList GetTypeFlags | ( | ) | const [virtual] |
Reimplemented from KFbxObject.
This property handles the use of the Min/Max distances.
Enables the minimum and maximum distance to take effect. For example, if the distance between the group and the camera is smaller than the minimum distance, then the whole group disappears.
To access this property do: MinMaxDistance.Get(). To set this property do: MinMaxDistance.Set(bool).
Default value is false.
Definition at line 116 of file kfbxlodgroup.h.
The minimum distance at which the group is displayed.
To access this property do: MinDistance.Get(). To set this property do: MinDistance.Set(double).
Default value is -100
Definition at line 125 of file kfbxlodgroup.h.
The maximum distance at which the group is displayed.
To access this property do: MaxDistance.Get(). To set this property do: MaxDistance.Set(double).
Default value is 100
Definition at line 134 of file kfbxlodgroup.h.
Work in world space of transform or local space If true, the camera distance to the LOD group will be computed in world space.
This means it is possible to parent the LOD transform below other transforms and still have it work as expected. If this attribute is set to false, the distance computation ignores any parent transforms of the LOD transform.
To access this property do: WorldSpace.Get(). To set this property do: WorldSpace.Set(bool).
Default value is false
Definition at line 147 of file kfbxlodgroup.h.