Skip to content

nfCore Components

Michał Witanowski edited this page Nov 19, 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) (Not implemented)

BodyComponent

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

  • CollisionShape resource pointer,
  • physical properties: mass and moment of intertia, friction, restitution, (Not implemented)
  • 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 (Not implemented)

Plays a sound sample or a stream.

EmitterComponent (Not implemented)

Generates particles. Contains:

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

ForcefieldComponent (Not implemented)

Adds a force to all bodies inside the specified volume.

TriggerComponent (Not implemented)

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

NameComponent (Not implemented)

Assigns a name (string) for an entity.

DebugMeshComponent (Not implemented)

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

SoundListenerComponent (Not implemented)

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

CubeCameraComponent (Not implemented)

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

SceneSegmentComponent (Not implemented)

Determines scene segment volume.

ScriptComponent (Not implemented)

Scriping language interface.