NDK class that represents the common base of all components.
More...
Inherited by Ndk::Component< CameraComponent >, Ndk::Component< CollisionComponent2D >, Ndk::Component< CollisionComponent3D >, Ndk::Component< GraphicsComponent >, Ndk::Component< LightComponent >, Ndk::Component< ListenerComponent >, Ndk::Component< NodeComponent >, Ndk::Component< ParticleEmitterComponent >, Ndk::Component< ParticleGroupComponent >, Ndk::Component< PhysicsComponent2D >, Ndk::Component< PhysicsComponent3D >, Ndk::Component< VelocityComponent >, and Ndk::Component< ComponentType >.
NDK class that represents the common base of all components.
◆ BaseComponent()
Ndk::BaseComponent::BaseComponent |
( |
ComponentIndex |
index | ) |
|
|
inline |
Constructs a BaseComponent object with an index.
- Parameters
-
index | Index of the component |
◆ GetEntity()
const EntityHandle & Ndk::BaseComponent::GetEntity |
( |
| ) |
const |
|
inline |
Gets the entity owning this component.
- Returns
- A handle to the entity owning this component, may be invalid if no entity owns it.
◆ GetIndex()
ComponentIndex Ndk::BaseComponent::GetIndex |
( |
| ) |
const |
|
inline |
Gets the index of the component.
- Returns
- Index of the component
◆ GetMaxComponentIndex()
ComponentIndex Ndk::BaseComponent::GetMaxComponentIndex |
( |
| ) |
|
|
inlinestatic |
Gets the maximal index of the components.
- Returns
- Index of the maximal component
◆ RegisterComponent()
ComponentIndex Ndk::BaseComponent::RegisterComponent |
( |
ComponentId |
id, |
|
|
Factory |
factoryFunc |
|
) |
| |
|
inlinestaticprotected |
Registers a component.
- Returns
- Index of the registered component
- Parameters
-
id | Index of the component |
factory | Factory to create the component |
The documentation for this class was generated from the following files:
- SDK/include/NDK/BaseComponent.hpp
- SDK/include/NDK/BaseComponent.inl
- SDK/src/NDK/BaseComponent.cpp