xoreos  0.0.5
Public Member Functions | Protected Member Functions | List of all members
Engines::KotOR2::Trigger Class Reference

#include <trigger.h>

Inheritance diagram for Engines::KotOR2::Trigger:
Inheritance graph
[legend]
Collaboration diagram for Engines::KotOR2::Trigger:
Collaboration graph
[legend]

Public Member Functions

 Trigger (const Aurora::GFF3Struct &gff)
 
void show ()
 Show the object's model(s). More...
 
void hide ()
 Hide the object's model(s). More...
 
void hideSoft ()
 Hide the object's model(s) if applicable. More...
 
bool isVisible () const
 Is the object's model(s) visible? More...
 
- Public Member Functions inherited from Engines::Trigger
 Trigger ()
 
void setVisible (bool visible)
 
bool contains (float x, float y) const
 
void calculateDistance ()
 Calculate the object's distance. More...
 
void render (Graphics::RenderPass pass)
 Render the object. More...
 
- Public Member Functions inherited from Graphics::Renderable
 Renderable (RenderableType type)
 
 ~Renderable ()
 
bool operator< (const Queueable &q) const
 
virtual void advanceTime (float dt)
 Advance time (used by renderables with animations). More...
 
virtual void renderImmediate (const glm::mat4 &parentTransform)
 For shader based systems, don't sort anything, render this right_now. More...
 
virtual void queueRender (const glm::mat4 &parentTransform)
 Queue the object for later rendering. More...
 
double getDistance () const
 Get the distance of the object from the viewer. More...
 
uint32 getID () const
 Get the object's unique ID. More...
 
bool isClickable () const
 Is the object clickable? More...
 
void setClickable (bool clickable)
 Set the object's clickable state. More...
 
const Common::UStringgetTag () const
 Get the object's tag. More...
 
void setTag (const Common::UString &tag)
 Set the object's tag. More...
 
bool isVisible () const
 Is the object visible? More...
 
virtual bool isIn (float x, float y) const
 Is that point within the object? More...
 
virtual bool isIn (float x, float y, float z) const
 Is that point within the object? More...
 
virtual bool isIn (float x1, float y1, float z1, float x2, float y2, float z2) const
 Does the line from x1.y1.z1 to x2.y2.z2 intersect with the object? More...
 
- Public Member Functions inherited from Graphics::Queueable
 Queueable ()
 
virtual ~Queueable ()
 
- Public Member Functions inherited from Engines::KotOR2::Object
 Object (ObjectType type=kObjectTypeInvalid)
 
virtual ~Object ()
 
ObjectType getType () const
 Return the exact type of the object. More...
 
const std::list< uint32 > & getIDs () const
 Return the object's model IDs. More...
 
const Common::UStringgetName () const
 Return the object's name. More...
 
const Common::UStringgetDescription () const
 Return the object's description. More...
 
const Common::UStringgetPortrait () const
 Return the object's portrait. More...
 
bool isStatic () const
 Is the object static (not manipulable at all)? More...
 
bool isUsable () const
 Can the object be used by the PC? More...
 
bool isClickable () const
 Can the player click the object? More...
 
virtual void getPosition (float &x, float &y, float &z) const
 Return the object's position within its area. More...
 
virtual void getOrientation (float &x, float &y, float &z, float &angle) const
 Return the object's orientation. More...
 
virtual void setPosition (float x, float y, float z)
 Set the object's position within its area. More...
 
virtual void setOrientation (float x, float y, float z, float angle)
 Set the object's orientation. More...
 
void makeLookAt (float x, float y)
 
void makeLookAt (Object *target)
 
RoomgetRoom ()
 Get a room the object is in. More...
 
void setRoom (Room *room)
 Set a room the object is in. More...
 
virtual void enter ()
 The cursor entered the object. More...
 
virtual void leave ()
 The cursor left the object. More...
 
virtual void highlight (bool enabled)
 (Un)Highlight the object. More...
 
virtual bool click (Object *triggerer=0)
 The object was clicked. More...
 
void stopSound ()
 Stop the current object sound. More...
 
void playSound (const Common::UString &sound, bool pitchVariance=false)
 Play an object sound. More...
 
virtual void playAnimation (const Common::UString &anim, bool restart=true, float length=0.0f, float speed=1.0f)
 
- Public Member Functions inherited from Aurora::NWScript::Object
 Object ()
 
uint32 getID () const
 
const Common::UStringgetTag () const
 
- Public Member Functions inherited from Aurora::NWScript::VariableContainer
 VariableContainer ()
 
virtual ~VariableContainer ()
 
bool hasVariable (const Common::UString &var) const
 
VariablegetVariable (const Common::UString &var, Type type=kTypeVoid)
 
const VariablegetVariable (const Common::UString &var) const
 
void setVariable (const Common::UString &var, const Variable &value)
 
void removeVariable (const Common::UString &var)
 
void clearVariables ()
 
- Public Member Functions inherited from Engines::KotOR2::ScriptContainer
 ScriptContainer ()
 
 ~ScriptContainer ()
 
const Common::UStringgetScript (Script script) const
 
bool hasScript (Script script) const
 
bool runScript (Script script, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference())
 

Protected Member Functions

void load (const Aurora::GFF3Struct &gff)
 
void loadBlueprint (const Aurora::GFF3Struct &gff)
 
- Protected Member Functions inherited from Engines::Trigger
void prepare ()
 
- Protected Member Functions inherited from Graphics::Renderable
void resort ()
 
void lockFrame ()
 
void unlockFrame ()
 
void lockFrameIfVisible ()
 
void unlockFrameIfVisible ()
 
- Protected Member Functions inherited from Graphics::Queueable
bool isInQueue (QueueType queue) const
 
void addToQueue (QueueType queue)
 
void removeFromQueue (QueueType queue)
 
void lockQueue (QueueType queue)
 
void unlockQueue (QueueType queue)
 
void sortQueue (QueueType queue)
 
- Protected Member Functions inherited from Engines::KotOR2::ScriptContainer
void clearScripts ()
 
void readScripts (const Aurora::GFF3Struct &gff)
 
void readScripts (const ScriptContainer &container)
 

Additional Inherited Members

- Static Public Member Functions inherited from Engines::KotOR2::ScriptContainer
static bool runScript (const Common::UString &script, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference())
 
static bool runScript (const Common::UString &script, const Aurora::NWScript::ScriptState &state, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference())
 
- Protected Attributes inherited from Engines::Trigger
std::vector< glm::vec3 > _geometry
 
bool _visible
 
- Protected Attributes inherited from Graphics::Renderable
QueueType _queueExists
 
QueueType _queueVisible
 
uint32 _id
 
bool _clickable
 
Common::UString _tag
 
double _distance
 The distance of the object from the viewer. More...
 
- Protected Attributes inherited from Engines::KotOR2::Object
ObjectType _type
 The object's type. More...
 
Common::UString _name
 The object's display name. More...
 
Common::UString _description
 The object's description. More...
 
Common::UString _portrait
 The object's portrait. More...
 
bool _static
 Is the object static? More...
 
bool _usable
 Is the object usable? More...
 
std::list< uint32_ids
 The object's model IDs. More...
 
float _position [3]
 The object's position. More...
 
float _orientation [4]
 The object's orientation. More...
 
Sound::ChannelHandle _sound
 The currently playing object sound. More...
 
Room_room
 Room the object is in. More...
 
- Protected Attributes inherited from Aurora::NWScript::Object
uint32 _id
 
Common::UString _tag
 

Detailed Description

Definition at line 37 of file trigger.h.

Constructor & Destructor Documentation

◆ Trigger()

Engines::KotOR2::Trigger::Trigger ( const Aurora::GFF3Struct gff)

Definition at line 37 of file trigger.cpp.

References load(), and Engines::Trigger::prepare().

Here is the call graph for this function:

Member Function Documentation

◆ hide()

void Engines::KotOR2::Trigger::hide ( )
virtual

Hide the object's model(s).

Reimplemented from Engines::KotOR2::Object.

Definition at line 48 of file trigger.cpp.

◆ hideSoft()

void Engines::KotOR2::Trigger::hideSoft ( )
virtual

Hide the object's model(s) if applicable.

Reimplemented from Engines::KotOR2::Object.

Definition at line 52 of file trigger.cpp.

◆ isVisible()

bool Engines::KotOR2::Trigger::isVisible ( ) const
virtual

Is the object's model(s) visible?

Reimplemented from Engines::KotOR2::Object.

Definition at line 55 of file trigger.cpp.

◆ load()

void Engines::KotOR2::Trigger::load ( const Aurora::GFF3Struct gff)
protected

◆ loadBlueprint()

void Engines::KotOR2::Trigger::loadBlueprint ( const Aurora::GFF3Struct gff)
protected

Definition at line 94 of file trigger.cpp.

References Engines::KotOR2::Object::_name, Aurora::NWScript::Object::_tag, Aurora::GFF3Struct::getString(), and Engines::KotOR2::ScriptContainer::readScripts().

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ show()

void Engines::KotOR2::Trigger::show ( )
virtual

Show the object's model(s).

Reimplemented from Engines::KotOR2::Object.

Definition at line 44 of file trigger.cpp.


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