Class StaticModelSpaceComponent

Inheritance Relationships

Base Types

Class Documentation

class StaticModelSpaceComponent : public csp::multiplayer::ComponentBase, public csp::multiplayer::IExternalResourceComponent, public csp::multiplayer::IShadowCasterComponent, public csp::multiplayer::IThirdPartyComponentRef, public csp::multiplayer::ITransformComponent, public csp::multiplayer::IVisibleComponent

Adds static 3D models to a SpaceEntity.

It displays non-animated objects, such as furniture, buildings, or decorative items within a space. The static model defines the visual appearance but has no animations or dynamic behaviors.

Public Functions

StaticModelSpaceComponent(SpaceEntity *Parent)

Constructs the static model space component, and associates it with the specified Parent space entity.

Parameters

Parent – The Space entity that owns this component.

virtual const csp::common::String &GetExternalResourceAssetId() const override

Gets the ID for the asset used to store external data for this component.

Returns

csp::common::String : The asset ID.

virtual void SetExternalResourceAssetId(const csp::common::String &Value) override

Sets the ID for the asset used to store external data for this component.

Parameters

InValuecsp::common::String : The new value.

virtual const csp::common::String &GetExternalResourceAssetCollectionId() const override

Gets the ID of the asset collection associated with this component.

Note

To retrieve this component’s static asset, both the Asset ID and the Asset Collection ID are required.

Returns

The ID of the asset collection associated with this component.

virtual void SetExternalResourceAssetCollectionId(const csp::common::String &Value) override

Sets the ID of the asset collection associated with this component.

Note

To retrieve this component’s static asset, both the Asset ID and the Asset Collection ID are required.

Parameters

Value – The ID of the asset collection associated with this component.

csp::common::Map<csp::common::String, csp::common::String> GetMaterialOverrides() const

Gets the material overrides of this component.

Should be in the format: Key = Path to the model Value = The material id

Returns

The material overrides on this component.

void AddMaterialOverride(const csp::common::String &ModelPath, const csp::common::String &MaterialAssetId)

Adds a new material override to this component.

Parameters
  • The – path to the models material to override.

  • The – id of the material to override with.

void RemoveMaterialOverride(const csp::common::String &ModelPath)

Removes a material override from this component.

Parameters

The – path to the models material to override to be removed.