Skip to content

nfCore Components

Michał Witanowski edited this page Nov 18, 2015 · 3 revisions

Components

Below there are listed all components supported by the engine. At the moment, only one instance of a given component type can be attached to an entity.

TransformComponent

Holds position and orientation in global space as well as in local space (relative to parent).

LightComponent

Render light. The following light types are supported:

  • spot - with 2D shadow map,
  • omni - with cube shadow map,
  • directional - with cascaded shadow map (aka. parallel split shadow map).

BodyComponent

Enables rigid body simulation for an entity. Contains the following information:

  • CollisionShape resource pointer,
  • physical properties: mass and moment of intertia, friction, restitution,
  • variable physical properties: linear and angular velocity.

MeshComponent

Renderable mesh. Holds pointer to Mesh resource.

CameraComponent

Allows an entity to be assigned to a View. Camera supports two types of projection:

  • perspective,
  • orthogonal.

SoundSourceComponent (TODO)

Plays a sound sample or a stream.

EmitterComponent (TODO)

Generates particles. Contains:

  • ParticleMaterial resource pointer,
  • emitter shape,
  • spawning rate, initial particle velocity, etc.

ForcefieldComponent (TODO)

Adds a force to all bodies inside the specified volume.

TriggerComponent (TODO)

Generates event when an entity (arbitrary with TransformComponent) enters/leaves it.

NameComponent (TODO)

Assigns a name (string) for an entity.

DebugMeshComponent (TODO)

Draw debug mesh (sprite, simple shape, etc.).

SoundListenerComponent (TODO)

Receives sounds generated by sound sources. Sound "gathered" by the Sound Listener is treated as input channel in the engine's sound mixer.

CubeCameraComponent (TODO)

Receives a cube map view (for example for enviromental mapping). Similar to CameraView, but has no projection matrix - it's always omni-directional.

SceneSegmentComponent (TODO)

Determines scene segment volume.

ScriptComponent (TODO)

Scriping language interface.