OpenGothic
Open source reimplementation of Gothic I and II
Loading...
Searching...
No Matches
Interactive Class Reference

#include <interactive.h>

Inheritance diagram for Interactive:
Vob FirePlace

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
 
Inventoryinventory ()
 
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< Vobload (Vob *parent, World &world, const zenkit::VirtualObject &vob, Flags flags)
 
- Protected Attributes inherited from Vob
Worldworld
 
zenkit::VirtualObjectType vobType = zenkit::VirtualObjectType::UNKNOWN
 
uint32_t vobObjectID = uint32_t(-1)
 

Detailed Description

Definition at line 18 of file interactive.h.

Member Enumeration Documentation

◆ Anim

enum Interactive::Anim : int8_t
Enumerator
In 
Active 
Out 
ToStand 
FromStand 

Definition at line 20 of file interactive.h.

Constructor & Destructor Documentation

◆ Interactive()

Interactive::Interactive ( Vob parent,
World world,
const zenkit::VMovableObject &  vob,
Flags  flags 
)

Definition at line 28 of file interactive.cpp.

Member Function Documentation

◆ animNpc()

const Animation::Sequence * Interactive::animNpc ( const AnimationSolver solver,
Anim  t 
) const -> const Animation::Sequence*

Definition at line 983 of file interactive.cpp.

◆ attach()

bool Interactive::attach ( Npc npc)

Definition at line 782 of file interactive.cpp.

◆ bBox()

const Tempest::Vec3 * Interactive::bBox ( ) const -> const Tempest::Vec3*

Definition at line 441 of file interactive.cpp.

◆ canQuitAtState()

bool Interactive::canQuitAtState ( const Npc npc,
int32_t  state 
) const

Definition at line 713 of file interactive.cpp.

◆ canSeeNpc()

bool Interactive::canSeeNpc ( const Npc npc,
bool  freeLos 
) const

Definition at line 541 of file interactive.cpp.

◆ checkMobName()

bool Interactive::checkMobName ( std::string_view  dest) const

Definition at line 403 of file interactive.cpp.

◆ detach()

bool Interactive::detach ( Npc npc,
bool  quick 
)

Definition at line 802 of file interactive.cpp.

◆ displayName()

std::string_view Interactive::displayName ( ) const

Definition at line 423 of file interactive.cpp.

◆ displayPosition()

Tempest::Vec3 Interactive::displayPosition ( ) const

Definition at line 418 of file interactive.cpp.

◆ emitSoundEffect()

void Interactive::emitSoundEffect ( std::string_view  sound,
float  range,
bool  freeSlot 
)

Definition at line 480 of file interactive.cpp.

◆ emitTriggerEvent()

void Interactive::emitTriggerEvent ( TriggerEvent::Type  type) const

Definition at line 473 of file interactive.cpp.

◆ extendedSearchRadius()

float Interactive::extendedSearchRadius ( ) const
overrideprotectedvirtual

Reimplemented from Vob.

Definition at line 1062 of file interactive.cpp.

◆ focusName()

std::string_view Interactive::focusName ( ) const

Definition at line 399 of file interactive.cpp.

◆ inventory()

Inventory & Interactive::inventory ( )

Definition at line 528 of file interactive.cpp.

◆ isAttached()

bool Interactive::isAttached ( const Npc to)

Definition at line 830 of file interactive.cpp.

◆ isAvailable()

bool Interactive::isAvailable ( ) const

Definition at line 689 of file interactive.cpp.

◆ isContainer()

bool Interactive::isContainer ( ) const

Definition at line 500 of file interactive.cpp.

◆ isCracked()

bool Interactive::isCracked ( ) const
inline

Definition at line 66 of file interactive.h.

◆ isDetachState()

bool Interactive::isDetachState ( const Npc npc) const

Definition at line 706 of file interactive.cpp.

◆ isDoor()

bool Interactive::isDoor ( ) const

Definition at line 504 of file interactive.cpp.

◆ isLadder()

bool Interactive::isLadder ( ) const

Definition at line 517 of file interactive.cpp.

◆ isStaticState()

bool Interactive::isStaticState ( ) const

Definition at line 696 of file interactive.cpp.

◆ isTrueDoor()

bool Interactive::isTrueDoor ( const Npc npc) const

Definition at line 508 of file interactive.cpp.

◆ load()

void Interactive::load ( Serialize fin)
overridevirtual

Reimplemented from Vob.

Definition at line 109 of file interactive.cpp.

◆ marchInteractives()

void Interactive::marchInteractives ( DbgPainter p) const

Definition at line 1023 of file interactive.cpp.

◆ moveEvent()

void Interactive::moveEvent ( )
overrideprotectedvirtual

Reimplemented from Vob.

Definition at line 1057 of file interactive.cpp.

◆ nearestPoint()

Tempest::Vec3 Interactive::nearestPoint ( const Npc to) const

Definition at line 557 of file interactive.cpp.

◆ needToLockpick()

bool Interactive::needToLockpick ( const Npc pl) const

Definition at line 521 of file interactive.cpp.

◆ nodeTranform()

Tempest::Matrix4x4 Interactive::nodeTranform ( std::string_view  nodeName) const
protected

Definition at line 914 of file interactive.cpp.

◆ onKeyInput()

void Interactive::onKeyInput ( KeyCodec::Action  act)

Definition at line 258 of file interactive.cpp.

◆ onStateChanged()

virtual void Interactive::onStateChanged ( )
inlineprotectedvirtual

Reimplemented in FirePlace.

Definition at line 92 of file interactive.h.

◆ overrideFocus()

bool Interactive::overrideFocus ( ) const

Definition at line 414 of file interactive.cpp.

◆ ownerName()

std::string_view Interactive::ownerName ( ) const

Definition at line 410 of file interactive.cpp.

◆ pickLockCode()

std::string_view Interactive::pickLockCode ( ) const
inline

Definition at line 64 of file interactive.h.

◆ posSchemeName()

std::string_view Interactive::posSchemeName ( ) const

Definition at line 492 of file interactive.cpp.

◆ postValidate()

void Interactive::postValidate ( )

Definition at line 173 of file interactive.cpp.

◆ resetPositionToTA()

void Interactive::resetPositionToTA ( int32_t  state)

Definition at line 181 of file interactive.cpp.

◆ save()

void Interactive::save ( Serialize fout) const
overridevirtual

Reimplemented from Vob.

Definition at line 148 of file interactive.cpp.

◆ schemeName()

std::string_view Interactive::schemeName ( ) const

Definition at line 485 of file interactive.cpp.

◆ setAsCracked()

void Interactive::setAsCracked ( bool  c)
inline

Definition at line 65 of file interactive.h.

◆ setMobState()

bool Interactive::setMobState ( std::string_view  scheme,
int32_t  st 
)
overridevirtual

Reimplemented from Vob.

Definition at line 445 of file interactive.cpp.

◆ setSlotItem()

void Interactive::setSlotItem ( MeshObjects::Mesh &&  itm,
std::string_view  slot 
)

Definition at line 532 of file interactive.cpp.

◆ stateCount()

int32_t Interactive::stateCount ( ) const
inline

Definition at line 53 of file interactive.h.

◆ stateId()

int32_t Interactive::stateId ( ) const
inline

Definition at line 52 of file interactive.h.

◆ stateMask()

uint32_t Interactive::stateMask ( ) const

Definition at line 536 of file interactive.cpp.

◆ tag()

std::string_view Interactive::tag ( ) const

Definition at line 395 of file interactive.cpp.

◆ tick()

void Interactive::tick ( uint64_t  dt)

Definition at line 215 of file interactive.cpp.

◆ updateAnimation()

void Interactive::updateAnimation ( uint64_t  dt)

Definition at line 210 of file interactive.cpp.


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