21 #ifndef OGRE_VISIBLE_OBJECT_H
22 #define OGRE_VISIBLE_OBJECT_H
26 #include "../Core_LIB/CVisibleObject.h"
27 #include "../Graphics_LIB/GUtils.h"
28 #include "../Graphics_LIB/GObjectTextDisplay.h"
30 namespace OpenSkyNet {
35 static Ogre::Vector3 _camSpaceOffset;
36 static Ogre::Vector3 _worldSpaceOffset;
43 _camSpaceOffset = camSpaceOffset_;
44 _worldSpaceOffset = _camSpaceOffset*-1.0;
59 inline const Ogre::SceneNode*
getRenderNode()
const {
return _renderNode; }
66 virtual Ogre::Vector3 getVec3()
const;
67 virtual void getVec3(Ogre::Vector3& vec3_)
const;
68 virtual void setVec3(
const Ogre::Vector3& vec3_);
74 virtual Ogre::Quaternion getQuat()
const;
75 virtual void getQuat(Ogre::Quaternion& quat_)
const;
76 virtual void setQuat(
const Ogre::Quaternion& quat_);
78 virtual void setVisible(
bool val_) { _renderNode->setVisible(val_); }
80 void setRenderNameEnabled(
const std::string& name_,
const Ogre::Camera* cam_,
const Ogre::ColourValue& color_);
81 inline void setRenderNameText(
const std::string& name_) {
if (_renderName) _renderName->setText(name_); }
85 virtual void saveMaterials();
87 virtual void loadMaterials();
92 #endif //OGRE_VISIBLE_OBJECT_H
#define OGRECORE_DLL
Definition: OgreCoreDLL.h:57
Definition: CVisibleObject.h:28
Definition: GObjectTextDisplay.h:31
std::vector< std::string > _materialNames
Definition: OgreVisibleObject.h:40
Definition: OgreVisibleObject.h:33
const Ogre::SceneNode * getRenderNode() const
Definition: OgreVisibleObject.h:59
void updateRenderNameTransform()
Definition: OgreVisibleObject.h:82
static const Ogre::Vector3 & getCamSpaceOffset()
Definition: OgreVisibleObject.h:47
void setRenderNameText(const std::string &name_)
Definition: OgreVisibleObject.h:81
Ogre::SceneNode * getRenderNode()
Definition: OgreVisibleObject.h:60
virtual void setVisible(bool val_)
Definition: OgreVisibleObject.h:78
static const Ogre::Vector3 & getWorldSpaceOffset()
Definition: OgreVisibleObject.h:49
static void setCamSpaceOffset(const Ogre::Vector3 &camSpaceOffset_)
Definition: OgreVisibleObject.h:42
Graphics::ObjectTextDisplay * _renderName
Definition: OgreVisibleObject.h:39
Definition: MMatrix3x3.h:32
Ogre::SceneNode * _renderNode
Definition: OgreVisibleObject.h:38
float float rot_[3]
Definition: ViewerApp.h:31
float pos_[3]
Definition: ViewerApp.h:31