mojo_client/src/Client/GUI/DrawObject.h
false_genesis 3b47963c5d * the camera is now located behind the character's back and follows his movement; zoom in/out works too. original patch by sbp, thx!
** note: press POS1 key to toggle movement/freefly mode
* fixed character movement without initial turn (before it went into a random direction if not turned - now its fine)
* fixed: really (un-)load maps when moving a longer distance
* improved graphical debugging: show all SceneNode bounding boxes & bones (if there are any) - press backspace to toggle debugging
* ISceneNodes can now be accessed via their owner's guids [use DrawObjMgr::Get(guid) and DrawObject::GetSceneNode()]
* added one more ByteBuffer output variant (combined hex/text), thx nitrogrlie!
2008-08-11 23:52:42 +00:00

35 lines
894 B
C++

#ifndef DRAWOBJECT_H
#define DRAWOBJECT_H
#include "common.h"
#include "irrlicht/irrlicht.h"
class Object;
class PseuInstance;
class DrawObject
{
public:
DrawObject(irr::IrrlichtDevice *device, Object*, PseuInstance *ins);
~DrawObject();
void Draw(void); // call only in threadsafe environment!! (ensure the obj ptr is still valid!)
void Unlink(void);
inline irr::scene::ISceneNode *GetSceneNode(void) { return cube; }
// additionally, we dont use a GetObject() func - that would fuck things up if the object was already deleted.
private:
void _Init(void);
Object *_obj;
bool _initialized : 1;
irr::IrrlichtDevice *_device;
irr::scene::ISceneManager *_smgr;
irr::gui::IGUIEnvironment* _guienv;
irr::scene::ISceneNode* cube;
irr::scene::ITextSceneNode *text;
PseuInstance *_instance;
irr::core::vector3df rotation;
};
#endif