- Main Page
- Classes
- Files
- Directories

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Public Attributes | Protected Member Functions

# FbxLODGroup Class Reference

This reference page is linked to from the following overview topics: List of Python Fbx classes.

Search for all occurrences

## Detailed Description

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:

     FbxNode *lLodGroup = FbxNode::Create(pScene, "LODNode");
     FbxLODGroup *lLodGroupAttr = FbxLODGroup::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 54 of file fbxlodgroup.h.

`#include <fbxlodgroup.h>`

Inheritance diagram for FbxLODGroup:
[legend]

List of all members.

## Public Types
enum | EDisplayLevel { eUseLOD, eShow, eHide }
| types to determine how to display nodes in LODGroup. More...
## Public Member Functions
virtual FbxNodeAttribute::EType | GetAttributeType () const
| Return the type of node attribute which is EType::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 (FbxLODGroup::EDisplayLevel pValue)
| Add a new displayLevel value to the current list.
bool | SetDisplayLevel (int pEl, FbxLODGroup::EDisplayLevel pValue)
| Set the display level value for the specified object.
bool | GetDisplayLevel (int pEl, FbxLODGroup::EDisplayLevel &pValue) const
| Get the display level value for the specified object.
virtual FbxObject & | Copy (const FbxObject &pObject)
| Copy an object content into this object.
virtual FbxStringList | GetTypeFlags () const
## Public Attributes
FbxPropertyT< FbxBool > | MinMaxDistance
| This property handles the use of the Min/Max distances.
FbxPropertyT< FbxDouble > | MinDistance
| The minimum distance at which the group is displayed.
FbxPropertyT< FbxDouble > | MaxDistance
| The maximum distance at which the group is displayed.
FbxPropertyT< FbxBool > | 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
virtual void | Construct (const FbxLODGroup *pFrom)
virtual void | ConstructProperties (bool pForceSet)
| Optional property constructor override, automatically called by default constructor.

## Member Enumeration Documentation

enum EDisplayLevel

Search for all occurrences

types to determine how to display nodes in LODGroup.

- eUseLOD Display the node according LOD threshold
- eShow Always show this node
- eHide Always hide this node

Enumerator:

  eUseLOD | Search for all occurrences
  eShow | Search for all occurrences
  eHide | Search for all occurrences

Definition at line 67 of file fbxlodgroup.h.

        {
            eUseLOD,
            eShow,
            eHide
        };

## Member Function Documentation

virtual FbxNodeAttribute::EType GetAttributeType | ( |  | ) | const`[virtual]`

Search for all occurrences

Return the type of node attribute which is EType::eLODGroup.

Reimplemented from FbxNodeAttribute.

int GetNumThresholds | ( |  | ) | const

Search for all occurrences

Get the size of the threshold list.

In correct situation, the size is less one than LOD nodes number.

Returns:
  The current size of the threshold list.

bool AddThreshold | ( | FbxDistance | pThreshValue | ) |

Search for all occurrences

Add a new threshold value to the current list.

Parameters:

  pThreshValue | Threshold distance from the previous entry in the threshold list

Remarks:
  This list can only expand so the only way to shrink it, is to completely destroy this object.
  This method does not check the received values and blindly add them to the list. Therefore duplicated values can exist in different positions in the list.

Returns:
  true if successful and false if any error occurred.

bool SetThreshold | ( | int | pEl,
|  | FbxDistance | pThreshValue
| ) |  |

Search for all occurrences

Set the threshold value for the specified object.

Parameters:

  pEl | The index of the object we want to set the threshold.
  pThreshValue | Threshold distance from the previous entry in the threshold list

Returns:
  true if successful and false if the specified index is invalid.

bool GetThreshold | ( | int | pEl,
|  | FbxDistance & | pThreshValue
| ) |  | const

Search for all occurrences

Get the threshold value for the specified object.

Parameters:

  pEl | The index of the object we want to get the threshold.
  pThreshValue | the current threshold value.

Returns:
  true if successful and false if the specified index is invalid.

Remarks:
  in case of a failure, the pThreshValue is left unchanged.

int GetNumDisplayLevels | ( |  | ) | const

Search for all occurrences

Get the size of the displayLevel list.

In correct situation, the size is equal to LOD nodes number.

Returns:
  The current size of the displayLevel list.

bool AddDisplayLevel | ( | FbxLODGroup::EDisplayLevel | pValue | ) |

Search for all occurrences

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.

Parameters:

  pValue | Display level value

Remarks:
  This list can only expand so the only way to shrink it, is to completely destroy this object.
  This method does not check the received values and blindly add them to the list. Therefore duplicated values can exist in different positions in the list.

Returns:
  true if successful and false if any error occurred.

bool SetDisplayLevel | ( | int | pEl,
|  | FbxLODGroup::EDisplayLevel | pValue
| ) |  |

Search for all occurrences

Set the display level value for the specified object.

Parameters:

  pEl | The index of the object we want to set the display level.
  pValue | New display level value

Returns:
  true if successful and false if the specified index is invalid.

bool GetDisplayLevel | ( | int | pEl,
|  | FbxLODGroup::EDisplayLevel & | pValue
| ) |  | const

Search for all occurrences

Get the display level value for the specified object.

Parameters:

  pEl | The index of the object we want to get the display level value.
  pValue | the current display level value.

Returns:
  true if successful and false if the specified index is invalid.

Remarks:
  in case of a failure, the pValue is left unchanged.

virtual FbxObject& Copy | ( | const FbxObject & | pObject | ) | `[virtual]`

Search for all occurrences

Copy an object content into this object.

Parameters:

  pObject | The source object to copy data from.

Returns:
  Returns the destination object being modified by the source.

Remarks:
  This function replace the assignment operator (operator=). It will copy all property values and the name. Connections are NOT copied.

Reimplemented from FbxObject.

virtual void Construct | ( | const FbxLODGroup * | pFrom | ) | `[protected, virtual]`

Search for all occurrences

virtual void ConstructProperties | ( | bool | pForceSet | ) | `[protected, virtual]`

Search for all occurrences

Optional property constructor override, automatically called by default constructor.

Parameters:

  pForceSet | If the property value must be set regardless of default value.

Remarks:
  If your object have properties, they must be initialized in this function.

Reimplemented from FbxNodeAttribute.

virtual FbxStringList GetTypeFlags | ( |  | ) | const`[virtual]`

Search for all occurrences

Reimplemented from FbxObject.

## Member Data Documentation

FbxPropertyT<FbxBool> MinMaxDistance

Search for all occurrences

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 90 of file fbxlodgroup.h.

FbxPropertyT<FbxDouble> MinDistance

Search for all occurrences

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 99 of file fbxlodgroup.h.

FbxPropertyT<FbxDouble> MaxDistance

Search for all occurrences

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 108 of file fbxlodgroup.h.

FbxPropertyT<FbxBool> WorldSpace

Search for all occurrences

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 121 of file fbxlodgroup.h.

The documentation for this class was generated from the following file:

- fbxsdk/scene/geometry/fbxlodgroup.h

FbxLODGroup FbxLODGroup FbxLODGroup FbxLODGroup FbxLODGroup FbxLODGroup FbxLODGroup FbxLODGroup FbxLODGroup FbxLODGroup
FbxLODGroup FbxLODGroup FbxLODGroup FbxLODGroup FbxLODGroup FbxLODGroup FbxLODGroup FbxLODGroup FbxLODGroup FbxLODGroup