CrystalSpace

Public API Reference

iSequenceTrigger Struct Reference

A sequence trigger. More...

#include <ivaria/engseq.h>

Inheritance diagram for iSequenceTrigger:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual void AddConditionInSector (iSector *sector, const csSphere &sphere)=0
 Condition: true if camera is in some sector and sphere.
virtual void AddConditionInSector (iSector *sector, const csBox3 &box)=0
 Condition: true if camera is in some sector and bbox.
virtual void AddConditionInSector (iSector *sector)=0
 Condition: true if camera is in some sector.
virtual void AddConditionLightChange (iLight *whichlight, int oper, const csColor &color)=0
 Condition: light change.
virtual void AddConditionManual ()=0
 Condition: manual trigger.
virtual void AddConditionMeshClick (iMeshWrapper *mesh)=0
 Condition: true if clicked on a mesh.
virtual void AddConditionSectorVisible (iSector *sector)=0
 Condition: true if (part of) sector is visible.
virtual bool CheckState ()=0
 This function returns true if the trigger conditions are valid.
virtual void ClearConditions ()=0
 Clear all conditions.
virtual void FireSequence (csTicks delay, iSequenceWrapper *seq)=0
 Attach the sequence that will be fired when all trigger conditions are valid.
virtual void ForceFire (bool now=false)=0
 Force the sequence of this trigger to be fired right now.
virtual iSequenceWrapperGetFiredSequence ()=0
 Get the attached sequence.
virtual iEngineSequenceParametersGetParameters () const =0
 Get the parameter block.
virtual bool IsEnabled () const =0
 Get enabled/disabled state.
virtual iObjectQueryObject ()=0
 Query object.
virtual void SetEnabled (bool en)=0
 Enable/disable this trigger.
virtual void SetParameters (iEngineSequenceParameters *params)=0
 Set the parameter block to use for the sequence when it is fired.
virtual void TestConditions (csTicks delay)=0
 Test the conditions of this trigger every 'delay' milliseconds.
virtual void Trigger ()=0
 Trigger the manual condition.

Detailed Description

A sequence trigger.

When all conditions in a trigger are true it will run a sequence. Note that after the succesfull firing of a trigger it will automatically be disabled.

Main creators of instances implementing this interface:

Main ways to get pointers to this interface:

Main users of this interface:

Definition at line 520 of file engseq.h.


Member Function Documentation

virtual void iSequenceTrigger::AddConditionInSector ( iSector sector,
const csSphere sphere 
) [pure virtual]

Condition: true if camera is in some sector and sphere.

virtual void iSequenceTrigger::AddConditionInSector ( iSector sector,
const csBox3 box 
) [pure virtual]

Condition: true if camera is in some sector and bbox.

virtual void iSequenceTrigger::AddConditionInSector ( iSector sector  )  [pure virtual]

Condition: true if camera is in some sector.

virtual void iSequenceTrigger::AddConditionLightChange ( iLight whichlight,
int  oper,
const csColor color 
) [pure virtual]

Condition: light change.

Call this to add a trigger which fires a sequence when a light gets darker than a certain value or lighter than a certain value, or whenever a light changes.

Parameters:
whichlight represents the light on which we will test.
oper is one of CS_SEQUENCE_LIGHTCHANGE_NONE, CS_SEQUENCE_LIGHTCHANGE_LESS, or CS_SEQUENCE_LIGHTCHANGE_GREATER depending on the test you want to use.
color is the color to compare with.

virtual void iSequenceTrigger::AddConditionManual (  )  [pure virtual]

Condition: manual trigger.

Call this to set add a trigger that requires manual confirmation. The 'Trigger()' function can then be used later to actually do the trigger.

virtual void iSequenceTrigger::AddConditionMeshClick ( iMeshWrapper mesh  )  [pure virtual]

Condition: true if clicked on a mesh.

virtual void iSequenceTrigger::AddConditionSectorVisible ( iSector sector  )  [pure virtual]

Condition: true if (part of) sector is visible.

virtual bool iSequenceTrigger::CheckState (  )  [pure virtual]

This function returns true if the trigger conditions are valid.

This only works if TestConditions() has been called and it doesn't work immediatelly after TestConditions() because TestConditions() needs to take some time before it actually can retest the conditions.

virtual void iSequenceTrigger::ClearConditions (  )  [pure virtual]

Clear all conditions.

virtual void iSequenceTrigger::FireSequence ( csTicks  delay,
iSequenceWrapper seq 
) [pure virtual]

Attach the sequence that will be fired when all trigger conditions are valid.

Remarks:
seq will NOT be IncRef()ed - you'll have to ensure it's not prematurely destructed.

virtual void iSequenceTrigger::ForceFire ( bool  now = false  )  [pure virtual]

Force the sequence of this trigger to be fired right now.

Note that this will even fire if the trigger is disabled and conditions are completely ignored.

Also calling ForceFire() will NOT cause the trigger to become disabled (as opposed to when a trigger normally fires). So if you want to make sure the trigger does not accidently fire again right after firing it you should disable the trigger (and possibly let the sequence enable it again).

Note that ForceFire() still respects the fire delay with which the sequence was registered. If you use 'now' == true then this delay will be ignored and the sequence will be started immediatelly.

virtual iSequenceWrapper* iSequenceTrigger::GetFiredSequence (  )  [pure virtual]

Get the attached sequence.

virtual iEngineSequenceParameters* iSequenceTrigger::GetParameters (  )  const [pure virtual]

Get the parameter block.

virtual bool iSequenceTrigger::IsEnabled (  )  const [pure virtual]

Get enabled/disabled state.

virtual iObject* iSequenceTrigger::QueryObject (  )  [pure virtual]

Query object.

virtual void iSequenceTrigger::SetEnabled ( bool  en  )  [pure virtual]

Enable/disable this trigger.

Triggers start enabled by default.

virtual void iSequenceTrigger::SetParameters ( iEngineSequenceParameters params  )  [pure virtual]

Set the parameter block to use for the sequence when it is fired.

virtual void iSequenceTrigger::TestConditions ( csTicks  delay  )  [pure virtual]

Test the conditions of this trigger every 'delay' milliseconds.

Use this in combination with CheckState(). If 'delay' == 0 then this testing is disabled (default).

virtual void iSequenceTrigger::Trigger (  )  [pure virtual]

Trigger the manual condition.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.4.7