|
OpenGothic
Open source reimplementation of Gothic I and II
|
#include <interactive.h>
Public Types | |
| enum | Anim : int8_t { In = 1 , Active = 0 , Out = -1 , ToStand = 10 , FromStand = 11 } |
Public Types inherited from Vob | |
| enum | Flags : uint8_t { None = 0 , Startup = 0x1 << 0 , Static = 0x1 << 1 } |
Public Member Functions | |
| Interactive (Vob *parent, World &world, const zenkit::VMovableObject &vob, Flags flags) | |
| void | load (Serialize &fin) override |
| void | save (Serialize &fout) const override |
| void | postValidate () |
| void | resetPositionToTA (int32_t state) |
| void | updateAnimation (uint64_t dt) |
| void | tick (uint64_t dt) |
| void | onKeyInput (KeyCodec::Action act) |
| std::string_view | tag () const |
| std::string_view | focusName () const |
| bool | checkMobName (std::string_view dest) const |
| std::string_view | ownerName () const |
| bool | overrideFocus () const |
| Tempest::Vec3 | displayPosition () const |
| std::string_view | displayName () const |
| auto | bBox () const -> const Tempest::Vec3 * |
| int32_t | stateId () const |
| int32_t | stateCount () const |
| bool | setMobState (std::string_view scheme, int32_t st) override |
| void | emitTriggerEvent (TriggerEvent::Type type) const |
| void | emitSoundEffect (std::string_view sound, float range, bool freeSlot) |
| std::string_view | schemeName () const |
| std::string_view | posSchemeName () const |
| bool | isContainer () const |
| bool | isDoor () const |
| bool | isTrueDoor (const Npc &npc) const |
| bool | isLadder () const |
| std::string_view | pickLockCode () const |
| void | setAsCracked (bool c) |
| bool | isCracked () const |
| bool | needToLockpick (const Npc &pl) const |
| Inventory & | inventory () |
| void | setSlotItem (MeshObjects::Mesh &&itm, std::string_view slot) |
| uint32_t | stateMask () const |
| bool | canSeeNpc (const Npc &npc, bool freeLos) const |
| Tempest::Vec3 | nearestPoint (const Npc &to) const |
| bool | isAvailable () const |
| bool | isStaticState () const |
| bool | isDetachState (const Npc &npc) const |
| bool | canQuitAtState (const Npc &npc, int32_t state) const |
| bool | attach (Npc &npc) |
| bool | detach (Npc &npc, bool quick) |
| bool | isAttached (const Npc &to) |
| auto | animNpc (const AnimationSolver &solver, Anim t) const -> const Animation::Sequence * |
| void | marchInteractives (DbgPainter &p) const |
Public Member Functions inherited from Vob | |
| Vob (World &owner) | |
| Vob (Vob *parent, World &owner, const zenkit::VirtualObject &vob, Flags flags) | |
| virtual | ~Vob () |
| void | saveVobTree (Serialize &fin) const |
| void | loadVobTree (Serialize &fin) |
| Tempest::Vec3 | position () const |
| auto | transform () const -> const Tempest::Matrix4x4 & |
| void | setGlobalTransform (const Tempest::Matrix4x4 &p) |
| auto | localTransform () const -> const Tempest::Matrix4x4 & |
| void | setLocalTransform (const Tempest::Matrix4x4 &p) |
| virtual bool | isDynamic () const |
Protected Member Functions | |
| Tempest::Matrix4x4 | nodeTranform (std::string_view nodeName) const |
| void | moveEvent () override |
| float | extendedSearchRadius () const override |
| virtual void | onStateChanged () |
Additional Inherited Members | |
Static Public Member Functions inherited from Vob | |
| static std::unique_ptr< Vob > | load (Vob *parent, World &world, const zenkit::VirtualObject &vob, Flags flags) |
Protected Attributes inherited from Vob | |
| World & | world |
| zenkit::VirtualObjectType | vobType = zenkit::VirtualObjectType::UNKNOWN |
| uint32_t | vobObjectID = uint32_t(-1) |
Definition at line 18 of file interactive.h.
| enum Interactive::Anim : int8_t |
| Enumerator | |
|---|---|
| In | |
| Active | |
| Out | |
| ToStand | |
| FromStand | |
Definition at line 20 of file interactive.h.
| Interactive::Interactive | ( | Vob * | parent, |
| World & | world, | ||
| const zenkit::VMovableObject & | vob, | ||
| Flags | flags | ||
| ) |
Definition at line 28 of file interactive.cpp.
| const Animation::Sequence * Interactive::animNpc | ( | const AnimationSolver & | solver, |
| Anim | t | ||
| ) | const -> const Animation::Sequence* |
Definition at line 983 of file interactive.cpp.
| bool Interactive::attach | ( | Npc & | npc | ) |
Definition at line 782 of file interactive.cpp.
| const Tempest::Vec3 * Interactive::bBox | ( | ) | const -> const Tempest::Vec3* |
Definition at line 441 of file interactive.cpp.
| bool Interactive::canQuitAtState | ( | const Npc & | npc, |
| int32_t | state | ||
| ) | const |
Definition at line 713 of file interactive.cpp.
| bool Interactive::canSeeNpc | ( | const Npc & | npc, |
| bool | freeLos | ||
| ) | const |
Definition at line 541 of file interactive.cpp.
| bool Interactive::checkMobName | ( | std::string_view | dest | ) | const |
Definition at line 403 of file interactive.cpp.
| bool Interactive::detach | ( | Npc & | npc, |
| bool | quick | ||
| ) |
Definition at line 802 of file interactive.cpp.
| std::string_view Interactive::displayName | ( | ) | const |
Definition at line 423 of file interactive.cpp.
| Tempest::Vec3 Interactive::displayPosition | ( | ) | const |
Definition at line 418 of file interactive.cpp.
| void Interactive::emitSoundEffect | ( | std::string_view | sound, |
| float | range, | ||
| bool | freeSlot | ||
| ) |
Definition at line 480 of file interactive.cpp.
| void Interactive::emitTriggerEvent | ( | TriggerEvent::Type | type | ) | const |
Definition at line 473 of file interactive.cpp.
|
overrideprotectedvirtual |
Reimplemented from Vob.
Definition at line 1062 of file interactive.cpp.
| std::string_view Interactive::focusName | ( | ) | const |
Definition at line 399 of file interactive.cpp.
| Inventory & Interactive::inventory | ( | ) |
Definition at line 528 of file interactive.cpp.
| bool Interactive::isAttached | ( | const Npc & | to | ) |
Definition at line 830 of file interactive.cpp.
| bool Interactive::isAvailable | ( | ) | const |
Definition at line 689 of file interactive.cpp.
| bool Interactive::isContainer | ( | ) | const |
Definition at line 500 of file interactive.cpp.
|
inline |
Definition at line 66 of file interactive.h.
| bool Interactive::isDetachState | ( | const Npc & | npc | ) | const |
Definition at line 706 of file interactive.cpp.
| bool Interactive::isDoor | ( | ) | const |
Definition at line 504 of file interactive.cpp.
| bool Interactive::isLadder | ( | ) | const |
Definition at line 517 of file interactive.cpp.
| bool Interactive::isStaticState | ( | ) | const |
Definition at line 696 of file interactive.cpp.
| bool Interactive::isTrueDoor | ( | const Npc & | npc | ) | const |
Definition at line 508 of file interactive.cpp.
|
overridevirtual |
Reimplemented from Vob.
Definition at line 109 of file interactive.cpp.
| void Interactive::marchInteractives | ( | DbgPainter & | p | ) | const |
Definition at line 1023 of file interactive.cpp.
|
overrideprotectedvirtual |
Reimplemented from Vob.
Definition at line 1057 of file interactive.cpp.
| Tempest::Vec3 Interactive::nearestPoint | ( | const Npc & | to | ) | const |
Definition at line 557 of file interactive.cpp.
| bool Interactive::needToLockpick | ( | const Npc & | pl | ) | const |
Definition at line 521 of file interactive.cpp.
|
protected |
Definition at line 914 of file interactive.cpp.
| void Interactive::onKeyInput | ( | KeyCodec::Action | act | ) |
Definition at line 258 of file interactive.cpp.
|
inlineprotectedvirtual |
Reimplemented in FirePlace.
Definition at line 92 of file interactive.h.
| bool Interactive::overrideFocus | ( | ) | const |
Definition at line 414 of file interactive.cpp.
| std::string_view Interactive::ownerName | ( | ) | const |
Definition at line 410 of file interactive.cpp.
|
inline |
Definition at line 64 of file interactive.h.
| std::string_view Interactive::posSchemeName | ( | ) | const |
Definition at line 492 of file interactive.cpp.
| void Interactive::postValidate | ( | ) |
Definition at line 173 of file interactive.cpp.
| void Interactive::resetPositionToTA | ( | int32_t | state | ) |
Definition at line 181 of file interactive.cpp.
|
overridevirtual |
Reimplemented from Vob.
Definition at line 148 of file interactive.cpp.
| std::string_view Interactive::schemeName | ( | ) | const |
Definition at line 485 of file interactive.cpp.
|
inline |
Definition at line 65 of file interactive.h.
|
overridevirtual |
Reimplemented from Vob.
Definition at line 445 of file interactive.cpp.
| void Interactive::setSlotItem | ( | MeshObjects::Mesh && | itm, |
| std::string_view | slot | ||
| ) |
Definition at line 532 of file interactive.cpp.
|
inline |
Definition at line 53 of file interactive.h.
|
inline |
Definition at line 52 of file interactive.h.
| uint32_t Interactive::stateMask | ( | ) | const |
Definition at line 536 of file interactive.cpp.
| std::string_view Interactive::tag | ( | ) | const |
Definition at line 395 of file interactive.cpp.
| void Interactive::tick | ( | uint64_t | dt | ) |
Definition at line 215 of file interactive.cpp.
| void Interactive::updateAnimation | ( | uint64_t | dt | ) |
Definition at line 210 of file interactive.cpp.