ducttape-engine  0.2.0
A universal game engine
 All Classes Functions Variables Typedefs Enumerations Enumerator
Public Types | Public Slots | Signals | Public Member Functions | Protected Attributes | Properties | Private Attributes
dt::TriggerAreaComponent Class Reference
Inheritance diagram for dt::TriggerAreaComponent:
[legend]
Collaboration diagram for dt::TriggerAreaComponent:
[legend]

List of all members.

Public Types

typedef std::shared_ptr
< Component
ComponentSP

Public Slots

bool isEnabled ()
 Returns whether the component is enabled.
bool isInitialized ()
 Returns whether the component is created.
const QString getName () const
 Returns the name of the Component.
QString getFullName () const
 Returns the name of the Component, including all parent names.
NodegetNode ()
 Returns the Node of this component.
QScriptValue getScriptNode ()
 Returns the Node of this component.
void initialize ()
 Initializes the component.
void deinitialize ()
 Deinitializes the component.
void enable ()
 Enables the component.
void disable ()
 Disables the component.

Signals

void triggered (dt::TriggerAreaComponent *trigger_area, dt::Component *component)
void componentInitialized ()
void componentUninitialized ()
void componentEnabled ()
void componentDisabled ()

Public Member Functions

 TriggerAreaComponent (btCollisionShape *areaShape, const QString name="")
 Constructor.
void onInitialize ()
 Called when the component is activated.
void onDeinitialize ()
 Called when the component is deactivated.
void onEnable ()
 Called when the component is enabled.
void onDisable ()
 Called when the component is disabled.
void onUpdate (double time_diff)
 Called every frame.
void setAreaShape (btCollisionShape *areaShape)
 Setter for the area shape.
void setNode (Node *node)
 Sets the node of this component.
void serialize (IOPacket &packet)
virtual void onSerialize (IOPacket &packet)

Protected Attributes

QString mName
 The Component name.
NodemNode
 The parent Node.

Properties

QString name
bool isEnabled
bool isInitialized
QScriptValue node

Private Attributes

std::unique_ptr< btCollisionShape > mArea
std::unique_ptr< btGhostObject > mObject
 area entering which sends the Triggered signal

Detailed Description

Definition at line 24 of file TriggerAreaComponent.hpp.


Constructor & Destructor Documentation

dt::TriggerAreaComponent::TriggerAreaComponent ( btCollisionShape *  areaShape,
const QString  name = "" 
)

Constructor.

Parameters:
areaShapeshape of the trigger area
nameThe name of the component.

Member Function Documentation

QString dt::Component::getFullName ( ) const [slot, inherited]

Returns the name of the Component, including all parent names.

Returns:
The name of the Component, including all parent names.
const QString dt::Component::getName ( ) const [slot, inherited]

Returns the name of the Component.

Returns:
The name of the Component.
Node* dt::Component::getNode ( ) [slot, inherited]

Returns the Node of this component.

Returns:
The Node of this component.
QScriptValue dt::Component::getScriptNode ( ) [slot, inherited]

Returns the Node of this component.

Used for scripting access.

Returns:
The Node of this component.
bool dt::Component::isEnabled ( ) [slot, inherited]

Returns whether the component is enabled.

Returns:
Whether the component is enabled.
bool dt::Component::isInitialized ( ) [slot, inherited]

Returns whether the component is created.

Returns:
Whether the component is created.

Called when the component is deactivated.

Deinitialize all scene objects here.

Reimplemented from dt::Component.

Called when the component is disabled.

Hide/disable all scene objects here.

Reimplemented from dt::Component.

Called when the component is enabled.

Show/enable all scene objects here.

Reimplemented from dt::Component.

Called when the component is activated.

Initialize all scene objects here.

Reimplemented from dt::Component.

void dt::TriggerAreaComponent::onUpdate ( double  time_diff) [virtual]

Called every frame.

Update the Node here.

Parameters:
time_diffThe frame delta time.

Reimplemented from dt::Component.

void dt::TriggerAreaComponent::setAreaShape ( btCollisionShape *  areaShape)

Setter for the area shape.

Parameters:
areaShape of the trigger area
void dt::Component::setNode ( Node node) [inherited]

Sets the node of this component.

Parameters:
nodeThe node to be set.

Member Data Documentation

QString dt::Component::mName [protected, inherited]

The Component name.

Definition at line 155 of file Component.hpp.

Node* dt::Component::mNode [protected, inherited]

The parent Node.

Definition at line 156 of file Component.hpp.


The documentation for this class was generated from the following file: