45 _lastOpenedBy(0), _lastClosedBy(0), _lastUsedBy(0) {
73 _model->setPosition(x, y, z);
81 _model->setOrientation(x, y, z, angle);
94 _model->playAnimation(anim, restart, length, speed);
172 float bearing = instance.
getDouble(
"Bearing");
211 if (portraitID != 0) {
215 if (!portrait.
empty())
Class to hold the two-dimensional array of a 2DA file.
Handling version V3.2/V3.3 of BioWare's GFFs (generic file format).
void show()
Show the situated object's model.
void playAnimation(const Common::UString &anim, bool restart=true, float length=0.0f, float speed=1.0f)
virtual void show()
Show the object.
bool testCollision(const glm::vec3 &orig, const glm::vec3 &dest) const
void loadProperties(const Aurora::GFF3Struct &gff)
Common::UString _soundDestroyed
The sound the object makes when destroyed.
bool _static
Is the object static?
virtual void hide()
Hide the object.
const Common::UString & getString(size_t column) const
Return the contents of a cell as a string.
bool getBool(const Common::UString &field, bool def=false) const
A class holding an UTF-8 string.
void setWalkmeshInvisible(bool invisible)
void reset(PointerType o=0)
Resets the pointer with the new value.
virtual void loadObject(const Aurora::GFF3Struct &gff)=0
Load object-specific properties.
ObjectType
Object type, matches the bitfield in nwscript.nss.
uint64 getUint(const Common::UString &field, uint64 def=0) const
Common::UString _description
The object's description.
Common::UString _conversation
The optional conversation with this situated object.
Object * _lastClosedBy
The object that last closed this situated object.
Object * getLastUsedBy() const
Return the object that last used this situated object.
void setInvisible(bool invisible)
Common::UString _modelName
The model's resource name.
Basic exceptions to throw.
const char * c_str() const
Return the (utf8 encoded) string data.
Common::UString _portrait
The object's portrait.
Situated(ObjectType type)
bool isClickable() const
Can the player click the object?
Utility templates and functions.
Common::UString _name
The object's display name.
const Common::UString & getConversation() const
Get the conversation for this object.
double getDouble(const Common::UString &field, double def=0.0) const
virtual void setOrientation(float x, float y, float z, float angle)
Set the object's orientation.
Handling BioWare's 2DAs (two-dimensional array).
A situated object in a Star Wars: Knights of the Old Republic area.
void load(const Aurora::GFF3Struct &instance, const Aurora::GFF3Struct *blueprint=0)
Load the situated object from an instance and its blueprint.
bool empty() const
Is the string empty?
#define TwoDAReg
Shortcut for accessing the 2da registry.
Common::UString _soundOpened
The sound the object makes when opened.
uint32 _appearanceID
The index within the situated appearance 2DA.
Object * _lastUsedBy
The object that last used this situated object.
Object * _lastOpenedBy
The object that last opened this situated object.
bool isVisible() const
Is the situated object's model visible?
virtual void getOrientation(float &x, float &y, float &z, float &angle) const
Return the object's orientation.
void warning(const char *s,...)
virtual void setLocked(bool locked)
Lock/Unlock the situated object.
virtual bool testCollision(const glm::vec3 &orig, const glm::vec3 &dest) const
Common::UString _soundUsed
The sound the object makes when used.
std::list< uint32 > _ids
The object's model IDs.
void hide()
Hide the situated object's model.
const TwoDARow & getRow(size_t row) const
Get a row.
virtual void setPosition(float x, float y, float z)
Set the object's position within its area.
void setPosition(float x, float y, float z)
Set the situated object's position.
void loadPortrait(const Aurora::GFF3Struct &gff)
virtual void loadAppearance()=0
Load appearance-specific properties.
static const uint32 kFieldIDInvalid
Object * getLastClosedBy() const
Return the object that last closed this situated object.
Common::UString getString(const Common::UString &field, const Common::UString &def="") const
static float rad2deg(float rad)
Object * getLastOpenedBy() const
Return the object that last opened this situated object.
void readScripts(const Aurora::GFF3Struct &gff, bool clear=true)
bool _locked
Is the situated object locked?
virtual void getPosition(float &x, float &y, float &z) const
Return the object's position within its area.
Graphics::Aurora::Model * loadModelObject(const Common::UString &resref, const Common::UString &texture)
bool _usable
Is the object usable?
Common::ScopedPtr< Graphics::Aurora::Model > _model
The situated object's model.
void setOrientation(float x, float y, float z, float angle)
Set the situated object's orientation.
Common::UString _soundLocked
The sound the object makes when locked.
uint32 _soundAppType
The index within the situated sounds 2DA.
Common::UString _soundClosed
The sound the object makes when closed.
bool isLocked() const
Is the situated object locked?
Generic Aurora engines model functions.