Class ComponentBase

Base class for all components.

Components add functionality to entities. For example, a CutPlaneComponent turns an entity into an object that cuts meshes open.

An entity can only have one instance of each component type attached at any given time.

class Microsoft::Azure::RemoteRendering::ComponentBase : public Microsoft::Azure::RemoteRendering::ObjectBase

Methods

Destroy

Destroys the component in the runtime.

Once Destroy() has been called on a component, subsequent calls to ComponentBase.Valid will return false.

auto Destroy() noexcept -> Microsoft::Azure::RemoteRendering::Status;

Properties

Enabled

Enabled state of this component.

Disabled components have no effect. This is usually the same, as if the component wasn't attached at all, except that the enabled state can be toggled at any time, and any other state (for instance, the color of a light source) is preserved. It is therefore often easier to disable a component, and enable it later again, rather than to delete it and create a new component later.

However, an entity may only have one instance of each component type attached, even if a component is disabled.

auto GetEnabled() const noexcept -> bool;
auto SetEnabled(bool value) noexcept -> Microsoft::Azure::RemoteRendering::Status;

Owner

The Entity that this component is attached to.

auto GetOwner() const noexcept -> ApiHandle<Microsoft::Azure::RemoteRendering::Entity>;

Type

The exact type of this component.

auto GetType() const noexcept -> Microsoft::Azure::RemoteRendering::ObjectType;

Valid

Whether this component is still valid.

A component is invalid if it has been destroyed or if the connection has been lost. It is an error to call any other function on an invalid object.

auto GetValid() const noexcept -> bool;

See also