|
|
void | SetForcedLOD (xiiUInt32 uiLOD) |
| | Sets the forced LOD index for this mesh component, used to override the automatic LOD selection and force a specific LOD level to be rendered.
|
|
xiiUInt32 | GetForcedLOD () const |
| | Returns the forced LOD index for this mesh component, used to determine if a specific LOD level is being forced for rendering this mesh.
|
|
void | SetLodBias (float fBias) |
| | Sets the LOD bias for this mesh component, used to adjust the LOD selection for this mesh based on distance or performance requirements.
|
|
float | GetLodBias () const |
| | Returns the LOD bias for this mesh component, used to determine the LOD selection bias for rendering this mesh.
|
| xiiBitflags< xiiRenderExtractionCategory > | GetRenderExtractionCategories () const override |
| bool | IsRenderDataViewIndependent () const override |
| virtual void | SerializeComponent (xiiWorldWriter &inout_stream) const override |
| | Override this to save the current state of the component to the given stream.
|
| virtual void | DeserializeComponent (xiiWorldReader &inout_stream) override |
| virtual xiiResult | GetLocalBounds (xiiBoundingBoxSphere &ref_bounds, bool &ref_bAlwaysVisible, xiiMsgUpdateLocalBounds &ref_msg) override |
|
void | SetMesh (const xiiMeshResourceHandle &hMesh) |
| | Sets the mesh resource for this component, used to specify the geometry and materials to render.
|
|
const xiiMeshResourceHandle & | GetMesh () const |
| | Returns a handle to the mesh resource for this component, used to access the geometry and materials for rendering.
|
|
void | SetMaterialOverride (xiiUInt32 uiMaterialIndex, const xiiMaterialResourceHandle &hMaterial) |
| | Sets a material override for the material slot at the given index, used to override the material for rendering.
|
|
const xiiMaterialResourceHandle & | GetMaterialOverride (xiiUInt32 uiMaterialIndex) const |
| | Returns a handle to the material override for the material slot at the given index, used to access the overridden material for rendering.
|
|
void | ClearMaterialOverrides () |
| | Clears all material overrides, used to reset the materials to the defaults specified in the mesh resource.
|
|
xiiArrayPtr< const xiiMaterialResourceHandle > | GetMaterialOverrides () const |
| | Returns a reference to the array of material overrides for this component, used to access all overridden materials for rendering.
|
|
xiiUInt32 | GetMaterialOverrideCount () const |
| | Reflection accessor: returns material override count.
|
|
xiiStringView | GetMaterialOverrideFile (xiiUInt32 uiMaterialIndex) const |
| | Reflection accessor: returns the material override resource ID at the given index.
|
|
void | SetMaterialOverrideFile (xiiUInt32 uiMaterialIndex, xiiStringView sFile) |
| | Reflection accessor: sets a material override from a resource ID.
|
|
void | InsertMaterialOverrideFile (xiiUInt32 uiMaterialIndex, xiiStringView sFile) |
| | Reflection accessor: inserts a material override from a resource ID.
|
|
void | RemoveMaterialOverrideFile (xiiUInt32 uiMaterialIndex) |
| | Reflection accessor: removes a material override at the given index.
|
|
void | SetSectionIndex (xiiUInt32 uiSectionIndex) |
| | Sets the section index for this component, used to select a specific section of the mesh for rendering.
|
|
xiiUInt32 | GetSectionIndex () const |
| | Returns the section index for this component, used to select a specific section of the mesh for rendering.
|
|
void | SetPreferMeshShaders (bool bPreferMeshShaders) |
| | Sets whether to prefer using mesh shaders for rendering this mesh, if available, used to optimize rendering performance on supported hardware.
|
|
bool | GetPreferMeshShaders () const |
| | Returns whether to prefer using mesh shaders for rendering this mesh, if available, used to determine the rendering path for this mesh.
|
|
void | SetRayTracingVisible (bool bVisible) |
| | Sets whether this mesh should be visible to ray tracing, used to control ray tracing visibility for this mesh.
|
|
bool | GetRayTracingVisible () const |
| | Returns whether this mesh is visible to ray tracing, used to determine ray tracing visibility for this mesh.
|
|
void | SetVisibilityMask (xiiUInt32 mask) |
|
xiiUInt32 | GetVisibilityMask () const |
|
void | TriggerLocalBoundsUpdate () |
| | Call this when some value was modified that affects the size of the local bounding box and it should be recomputed.
|
|
XII_ALWAYS_INLINE xiiUInt32 | GetUniqueIdForRendering (xiiUInt32 uiInnerIndex=0, xiiUInt32 uiInnerIndexShift=24) const |
| | Computes a unique ID for the given component, that is usually given to the renderer to distinguish objects.
|
| void | SetActiveFlag (bool bEnabled) |
| bool | GetActiveFlag () const |
| bool | IsActive () const |
| bool | IsActiveAndInitialized () const |
| bool | IsActiveAndSimulating () const |
|
xiiComponentManagerBase * | GetOwningManager () |
| | Returns the corresponding manager for this component.
|
|
const xiiComponentManagerBase * | GetOwningManager () const |
| | Returns the corresponding manager for this component.
|
|
xiiGameObject * | GetOwner () |
| | Returns the owner game object if the component is attached to one or nullptr.
|
|
const xiiGameObject * | GetOwner () const |
| | Returns the owner game object if the component is attached to one or nullptr.
|
|
xiiWorld * | GetWorld () |
| | Returns the corresponding world for this component.
|
|
const xiiWorld * | GetWorld () const |
| | Returns the corresponding world for this component.
|
|
xiiComponentHandle | GetHandle () const |
| | Returns a handle to this component.
|
|
xiiUInt32 | GetUniqueID () const |
| | Returns the unique id for this component.
|
|
void | SetUniqueID (xiiUInt32 uiUniqueID) |
| | Sets the unique id for this component.
|
|
void | EnsureInitialized () |
| | Ensures that the component is initialized. Must only be called from another component's Initialize callback.
|
| void | EnsureSimulationStarted () |
|
XII_ALWAYS_INLINE bool | SendMessage (xiiMessage &ref_msg) |
| | Sends a message to this component.
|
|
XII_ALWAYS_INLINE bool | SendMessage (xiiMessage &ref_msg) const |
|
void | PostMessage (const xiiMessage &msg, xiiTime delay=xiiTime::MakeZero(), xiiObjectMsgQueueType::Enum queueType=xiiObjectMsgQueueType::NextFrame) const |
| | Queues the message for the given phase. The message is processed after the given delay in the corresponding phase.
|
| virtual bool | HandlesMessage (const xiiMessage &msg) const |
| | Returns whether the given Message is handled by this component.
|
|
void | SetUserFlag (xiiUInt8 uiFlagIndex, bool bSet) |
| | Be careful to check which flags may already be in use by base classes.
|
|
bool | GetUserFlag (xiiUInt8 uiFlagIndex) const |
| | Retrieves a custom flag. Index must be between 0 and 7.
|
|
void | SetCreatedByPrefab () |
| | Adds xiiObjectFlags::CreatedByPrefab to the component. See the flag for details.
|
|
bool | WasCreatedByPrefab () const |
| | Checks whether the xiiObjectFlags::CreatedByPrefab flag is set on this component.
|
|
void | DeleteComponent () |
| | Deletes this component. Note that the component will be invalidated first and the actual deletion is postponed.
|
|
virtual const xiiRTTI * | GetDynamicRTTI () const |
| bool | IsInstanceOf (const xiiRTTI *pType) const |
| | Returns whether the type of this instance is of the given type or derived from it.
|
|
template<typename T> |
| XII_ALWAYS_INLINE bool | IsInstanceOf () const |
| | Returns whether the type of this instance is of the given type or derived from it.
|
|
| virtual void | FillRenderData (xiiMeshRenderData &ref_renderData, const xiiMeshResource &mesh) const override |
| | Fills the given mesh render data with the appropriate data for rendering this mesh, used to prepare the render data for this mesh based on the mesh resource and component properties.
|
| virtual xiiUInt32 | SelectLOD (const xiiMeshResource &mesh) const override |
| | Selects the appropriate LOD index for rendering this mesh based on the given mesh resource, used to determine which LOD level of the mesh to render based on distance or performance requirements.
|
| virtual xiiBitflags< xiiMeshRenderDataFlags > | GetMeshRenderFlags () const override |
| | Returns the mesh render data flags for this mesh component, used to specify various properties of the mesh render data that can affect how it is rendered.
|
| virtual xiiRenderData::Caching::Enum | GetRenderDataCaching () const override |
| | Returns the render data caching strategy for this mesh component, used to determine how the render data for this mesh should be cached and reused.
|
|
void | OnMsgExtractRenderData (xiiMsgExtractRenderData &ref_msg) const |
| | Handles the message for extracting render data for this mesh, used to prepare and submit the render data for this mesh when requested by the renderer.
|
| virtual void | UpdateLocalBoundsForInstances (xiiBoundingBoxSphere &ref_bounds) const |
| | Updates the local bounds for this mesh component based on the given mesh resource, used to calculate the bounding volume for this mesh for culling and LOD selection.
|
| virtual void | Deinitialize () override |
| virtual void | OnActivated () override |
| virtual void | OnDeactivated () override |
|
void | OnUpdateLocalBounds (xiiMsgUpdateLocalBounds &msg) |
|
void | InvalidateCachedRenderData () |
|
void | OnTransformChanged (xiiMsgTransformChanged &msg) |
| | xiiComponent () |
| | Keep the constructor private or protected in derived classes, so it cannot be called manually.
|
|
bool | IsDynamic () const |
| | Returns whether this component is dynamic and thus can only be attached to dynamic game objects.
|
|
virtual xiiWorldModuleTypeId | GetTypeId () const =0 |
|
virtual xiiComponentMode::Enum | GetMode () const =0 |
| virtual void | Initialize () |
| virtual void | OnSimulationStarted () |
|
void | EnableUnhandledMessageHandler (bool enable) |
| | By default disabled. Enable to have OnUnhandledMessage() called for every unhandled message.
|
| virtual bool | OnUnhandledMessage (xiiMessage &msg, bool bWasPostedMsg) |
| virtual bool | OnUnhandledMessage (xiiMessage &msg, bool bWasPostedMsg) const |
|
bool | IsInitialized () const |
|
bool | IsInitializing () const |
|
bool | IsSimulationStarted () const |
|
|
xiiUInt32 | m_uiForcedLOD = xiiInvalidIndex |
| | The forced LOD index for this mesh component, used to override the automatic LOD selection and force a specific LOD level to be rendered. If set to xiiInvalidIndex, no LOD is forced and the LOD selection will be automatic based on distance or performance requirements.
|
|
float | m_fLodBias = 0.0f |
| | The LOD bias for this mesh component, used to adjust the LOD selection for this mesh based on distance or performance requirements. A positive bias will make the LOD selection favor higher detail levels, while a negative bias will favor lower detail levels.
|
|
xiiMeshResourceHandle | m_hMesh |
| | The mesh resource for this component, containing the mesh buffer and materials, used to specify the geometry and materials to render.
|
|
xiiDynamicArray< xiiMaterialResourceHandle > | m_MaterialOverrides |
| | Array of material overrides for this component, used to override the materials specified in the mesh resource for rendering.
|
|
xiiUInt32 | m_uiSectionIndex = xiiInvalidIndex |
| | The section index for this component, used to select a specific section of the mesh for rendering.
|
|
xiiUInt32 | m_uiVisibilityMask = 0xFFFFFFFFU |
|
bool | m_bPreferMeshShaders = true |
| | Whether to prefer using mesh shaders for rendering this mesh, if available, used to optimize rendering performance on supported hardware.
|
|
bool | m_bRayTracingVisible = true |
| | Whether this mesh should be visible to ray tracing, used to control ray tracing visibility for this mesh.
|
|
bool | m_bCpuCullingFallback = true |
| | Whether to use CPU culling as a fallback, used to determine whether to fall back to CPU culling if GPU culling is not available or fails for this mesh.
|
|
const xiiRTTI * | m_pMessageDispatchType = nullptr |
| | Messages will be dispatched to this type. Default is what GetDynamicRTTI() returns, can be redirected if necessary.
|
Mesh component with explicit CPU-side LOD controls.