Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
TestCAO Class Reference
+ Inheritance diagram for TestCAO:
+ Collaboration diagram for TestCAO:

Public Member Functions

 TestCAO (Client *client, ClientEnvironment *env)
 
virtual ~TestCAO ()=default
 
ActiveObjectType getType () const
 
void addToScene (ITextureSource *tsrc, scene::ISceneManager *smgr)
 
void removeFromScene (bool permanent)
 
void updateLight (u32 day_night_ratio)
 
void updateNodePos ()
 
void step (float dtime, ClientEnvironment *env)
 
void processMessage (const std::string &data)
 
bool getCollisionBox (aabb3f *toset) const
 
- Public Member Functions inherited from ClientActiveObject
 ClientActiveObject (u16 id, Client *client, ClientEnvironment *env)
 
virtual ~ClientActiveObject ()
 
virtual bool getSelectionBox (aabb3f *toset) const
 
virtual bool collideWithObjects () const
 
virtual const v3f getPosition () const
 
virtual const v3f getVelocity () const
 
virtual scene::ISceneNode * getSceneNode () const
 
virtual scene::IAnimatedMeshSceneNode * getAnimatedMeshSceneNode () const
 
virtual bool isLocalPlayer () const
 
virtual ClientActiveObjectgetParent () const
 
virtual const std::unordered_set< object_t > & getAttachmentChildIds () const
 
virtual void updateAttachments ()
 
virtual bool doShowSelectionBox ()
 
virtual std::string infoText ()
 
virtual std::string debugInfoText ()
 
virtual void initialize (const std::string &data)
 
virtual bool directReportPunch (v3f dir, const ItemStack *punchitem=nullptr, float time_from_last_punch=1000000)
 
- Public Member Functions inherited from ActiveObject
 ActiveObject (object_t id)
 
object_t getId () const
 
void setId (object_t id)
 
virtual void setAttachment (object_t parent_id, const std::string &bone, v3f position, v3f rotation, bool force_visible)
 
virtual void getAttachment (object_t *parent_id, std::string *bone, v3f *position, v3f *rotation, bool *force_visible) const
 
virtual void clearChildAttachments ()
 
virtual void clearParentAttachment ()
 
virtual void addAttachmentChild (object_t child_id)
 
virtual void removeAttachmentChild (object_t child_id)
 

Static Public Member Functions

static std::unique_ptr< ClientActiveObjectcreate (Client *client, ClientEnvironment *env)
 
- Static Public Member Functions inherited from ClientActiveObject
static std::unique_ptr< ClientActiveObjectcreate (ActiveObjectType type, Client *client, ClientEnvironment *env)
 

Private Attributes

scene::IMeshSceneNode * m_node
 
v3f m_position
 

Additional Inherited Members

- Public Types inherited from ActiveObject
typedef u16 object_t
 
- Protected Types inherited from ClientActiveObject
typedef std::unique_ptr< ClientActiveObject >(* Factory) (Client *client, ClientEnvironment *env)
 
- Static Protected Member Functions inherited from ClientActiveObject
static void registerType (u16 type, Factory f)
 
- Protected Attributes inherited from ClientActiveObject
Clientm_client
 
ClientEnvironmentm_env
 
- Protected Attributes inherited from ActiveObject
object_t m_id
 

Constructor & Destructor Documentation

◆ TestCAO()

TestCAO::TestCAO ( Client * client,
ClientEnvironment * env )

References create(), getType(), and ClientActiveObject::registerType().

+ Here is the call graph for this function:

◆ ~TestCAO()

virtual TestCAO::~TestCAO ( )
virtualdefault

Member Function Documentation

◆ addToScene()

void TestCAO::addToScene ( ITextureSource * tsrc,
scene::ISceneManager * smgr )
virtual

Implements ClientActiveObject.

References BS, ITextureSource::getTextureForMesh(), m_node, and updateNodePos().

+ Here is the call graph for this function:

◆ create()

std::unique_ptr< ClientActiveObject > TestCAO::create ( Client * client,
ClientEnvironment * env )
static

Referenced by TestCAO().

+ Here is the caller graph for this function:

◆ getCollisionBox()

bool TestCAO::getCollisionBox ( aabb3f * toset) const
inlinevirtual

Returns the collision box of the object. This box is translated by the object's location. The box's coordinates are world coordinates.

Returns
true if the object has a collision box.

Reimplemented from ClientActiveObject.

◆ getType()

ActiveObjectType TestCAO::getType ( ) const
inlinevirtual

Implements ActiveObject.

References ACTIVEOBJECT_TYPE_TEST.

Referenced by TestCAO().

+ Here is the caller graph for this function:

◆ processMessage()

void TestCAO::processMessage ( const std::string & data)
virtual

Reimplemented from ClientActiveObject.

References infostream, m_position, and updateNodePos().

+ Here is the call graph for this function:

◆ removeFromScene()

void TestCAO::removeFromScene ( bool permanent)
virtual

Reimplemented from ClientActiveObject.

References m_node.

◆ step()

void TestCAO::step ( float dtime,
ClientEnvironment * env )
virtual

Reimplemented from ClientActiveObject.

References m_node.

◆ updateLight()

void TestCAO::updateLight ( u32 day_night_ratio)
virtual

Reimplemented from ClientActiveObject.

◆ updateNodePos()

void TestCAO::updateNodePos ( )

References m_node, and m_position.

Referenced by addToScene(), and processMessage().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_node

scene::IMeshSceneNode* TestCAO::m_node
private

◆ m_position

v3f TestCAO::m_position
private

Referenced by processMessage(), and updateNodePos().


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