25 #ifndef ENGINES_NWN2_OBJECT_H 26 #define ENGINES_NWN2_OBJECT_H 75 const std::list<uint32> &
getIDs()
const;
107 virtual void getPosition(
float &x,
float &y,
float &z)
const;
109 virtual void getOrientation(
float &x,
float &y,
float &z,
float &angle)
const;
112 virtual void setPosition(
float x,
float y,
float z);
114 virtual void setOrientation(
float x,
float y,
float z,
float angle);
121 virtual void enter();
122 virtual void leave();
180 #endif // ENGINES_NWN2_OBJECT_H Sound::ChannelHandle _sound
The currently playing object sound.
void stopSound()
Stop the current object sound.
bool isClickable() const
Can the player click the object?
float _orientation[4]
The object's orientation.
A class holding an UTF-8 string.
Area * getArea() const
Return the area this object is currently in.
An area in Neverwinter Nights 2, holding all objects, room tiles and terrain within, as well as general area properties like the current background music and ambient sounds.
Class to hold a sound set.
virtual void loadModel()
Load the object's model(s).
const Common::UString & getDescription() const
Return the object's description.
virtual void getOrientation(float &x, float &y, float &z, float &angle) const
Return the object's orientation.
void speakOneLiner(Common::UString conv, Object *tokenTarget=0)
Speak an one-liner from the specified conversation file.
A location within a Neverwinter Nights 2 area.
uint32 _soundSet
The object's sound set, as an index into soundset.2da.
virtual void highlight(bool enabled)
(Un)Highlight the object.
Common::UString _name
The object's display name.
An object within a NWN2 area.
void readVarTable(const Aurora::GFF3List &varTable)
Read the object's variable table.
A simple scoped smart pointer template.
ObjectType _type
The object's type.
virtual void leave()
The cursor left the object.
virtual void hide()
Hide the object's model(s).
bool _usable
Is the object usable?
std::list< uint32 > _ids
The object's model IDs.
float _position[3]
The object's position.
Basic Neverwinter Nights 2 type definitions.
void speakString(const Common::UString &string, uint32 volume)
Speak the specified string.
const Common::UString & getConversation() const
Return the object's default conversation (DLG).
Common::UString _conversation
The object's default conversation.
Low-level type definitions to handle fixed width types portably.
const std::list< uint32 > & getIDs() const
Return the object's model IDs.
const Aurora::SSFFile * getSSF()
Return the object's sound set.
virtual void enter()
The cursor entered the object.
const Common::UString & getName() const
Return the object's name.
std::vector< const GFF3Struct * > GFF3List
virtual void setOrientation(float x, float y, float z, float angle)
Set the object's orientation.
bool isStatic() const
Is the object static (not manipulable at all)?
void playSound(const Common::UString &sound, bool pitchVariance=false)
Play an object sound.
Area * _area
The area the object is currently in.
virtual void setPosition(float x, float y, float z)
Set the object's position within its area.
A handle to a sound channel.
virtual void unloadModel()
Unload the object's model(s).
virtual void getPosition(float &x, float &y, float &z) const
Return the object's position within its area.
void loadSSF()
Load the object's sound set.
bool isUsable() const
Can the object be used by the PC?
bool _static
Is the object static?
void setArea(Area *)
Set the area this object is currently in.
ObjectType
Object type, matches the bitfield in nwscript.nss.
Common::ScopedPtr< Aurora::SSFFile > _ssf
The object's sound set.
An object containing scripts.
virtual void show()
Show the object's model(s).
Location getLocation() const
Create a Location out of the object's area, position and orientation.
virtual bool click(Object *triggerer=0)
The object was clicked.
ObjectType getType() const
Return the exact type of the object.
Common::UString _description
The object's description.