About
A LodObject represents a LOD (level of detail) object generator. This generator creates geometry based on various parameters e.g. camera distance. The LodObject class provides access to the parameters of the dynamically defined levels. It is defined in the lib_lodobject.h
header file.
LodObject objects are an instance of Olod.
Access
A LodObject object is a BaseObject and can be accessed like any other object. See BaseObject Manual.
Allocation/Deallocation
LodObject objects are created with the usual tools, see Entity Creation and Destruction Manual (Classic).
if (lodObject == nullptr)
lodObject->
SetName(
"New LOD Object"_s);
doc->InsertObject(lodObject,
nullptr,
nullptr);
void SetName(const maxon::String &name)
Definition: c4d_baselist.h:2387
Definition: lib_lodobject.h:38
static LodObject * Alloc()
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:67
const char * doc
Definition: pyerrors.h:226
Properties
The standard parameters of a LodObject can be obtained and changed with C4DAtom::SetParameter()/ C4DAtom::GetParameter(). The parameter IDs are defined in olod.h
.
{
}
Bool SetParameter(const DescID &id, const GeData &t_data, DESCFLAGS_SET flags)
Bool GetParameter(const DescID &id, GeData &t_data, DESCFLAGS_GET flags)
Definition: c4d_gedata.h:83
Int32 GetInt32() const
Definition: c4d_gedata.h:427
Int32 GetLevelCount() const
maxon::Int32 Int32
Definition: ge_sys_math.h:60
@ LOD_CRITERIA
Definition: olod.h:7
@ LOD_CURRENT_LEVEL
Definition: olod.h:9
@ LOD_CRITERIA_MANUAL
Definition: olod.h:28
Levels
A LodObject object handles multiple levels. The current level is used to define the geometry it should create.
Definition: lib_description.h:330
Bool GetShowControlDescID(Int32 level, DescID &resultId) const
Int32 GetCurrentLevel() const
Dynamic Parameter IDs
Each level contains multiple parameters that configure that level. The DescID for these parameters can be obtained with these functions.
In every mode a level defines various display parameters:
The IDs of the shading modes and styles are defined in tdisplay.h
.
{
}
Bool GetDisplayBFCDescID(Int32 level, DescID &resultId) const
Bool GetDisplayShModeDescID(Int32 level, DescID &resultId) const
Bool GetDisplayStModeDescID(Int32 level, DescID &resultId) const
PyObject PyObject PyObject int level
Definition: import.h:58
@ DISPLAYTAG_WDISPLAY_WIREFRAME
Definition: tdisplay.h:31
@ DISPLAYTAG_SDISPLAY_NOSHADING
Definition: tdisplay.h:13
In "Manual Groups" mode a list of objects can be accessed:
{
if (baseObject == nullptr)
doc->InsertObject(baseObject, lodObject,
nullptr);
if (inExData == nullptr)
}
@ DEFAULTVALUE
Dummy value for the default value GeData constructor.
Definition: c4d_gedata.h:65
Definition: c4d_baseobject.h:225
Definition: c4d_baselist.h:1395
CustomDataType * GetCustomDataType(Int32 datatype) const
Definition: c4d_gedata.h:507
void Remove()
Definition: c4d_baselist.h:1917
InExclude custom data type (CUSTOMDATATYPE_INEXCLUDE_LIST).
Definition: customgui_inexclude.h:115
Bool InsertObject(BaseList2D *pObject, Int32 lFlags)
Bool GetManualModeObjectListDescID(Int32 level, DescID &resultId) const
#define CUSTOMDATATYPE_INEXCLUDE_LIST
InExclude custom data type ID.
Definition: customgui_inexclude.h:25
#define atom
Definition: graminit.h:72
@ LOD_MODE
Definition: olod.h:6
@ LOD_LEVEL_COUNT_DYN
Definition: olod.h:13
@ LOD_MODE_MANUAL_GROUPS
Definition: olod.h:25
Base class for custom data types.
Definition: c4d_customdatatype.h:51
In "Simplify" mode these settings are available:
The null display mode setting IDs are defined in onull.h
.
Bool GetPerObjectControlDescID(Int32 level, DescID &resultId) const
Bool GetSimplifyModeDescID(Int32 level, DescID &resultId) const
Bool GetNullDisplayDescID(Int32 level, DescID &resultId) const
@ LOD_SIMPLIFY_NULL
Definition: olod.h:40
@ LOD_SIMPLIFY_CONVEXHULL
Definition: olod.h:38
@ LOD_MODE_SIMPLIFY
Definition: olod.h:26
@ NULLOBJECT_DISPLAY_CIRCLE
Definition: onull.h:9
Dirty Checksums
The dirty checksum of levels and the cache can be obtained with:
Further Reading