File EntityWrapper.h

namespace Ogre

File: MovableText.h

Description: This creates a billboarding object that display a text. Note: This object must have a dedicated scene node since it will rotate it to face the camera (OGRE 2.1)

Author

2003 by cTh see gavocanov@rambler.ru 2006 by barraq see nospam@barraquand.com 2012 to work with newer versions of OGRE by MindCalamity mindcalamity@gmail.com 2015 to work on OGRE 2.1 (but not on older versions anymore) by Jayray jeremy.richert1@gmail.com

namespace Gsage
class EntityWrapper : public Gsage::MovableObjectWrapper<OgreV1::Entity>

Public Types

enum Query

Values:

STATIC = 0x01
DYNAMIC = 0x02
UNKNOWN = 0x04

Public Functions

EntityWrapper()
virtual ~EntityWrapper()
void setQueryFlags(const std::string &type)

Set model entity flags, used for raycasting and querying entities

Parameters
  • type: static means that entity is a part of location, dynamic means that entity is some actor

const std::string &getQueryFlags() const

Get query flags of the model

void setResourceGroup(const std::string &name)

Set model resource group

Parameters
  • name: Resource group name, e.g. General

const std::string &getResourceGroup() const

Get resource group name

void setMesh(const std::string &mesh)

Set model mesh (this function creates entity)

Parameters
  • mesh: Mesh file name

const std::string &getMesh() const

Get mesh file name

void setCastShadows(const bool &value)

Set cast shadows

Parameters
  • value: Cast shadows

bool getCastShadows()

Get cast shadows

void setRenderQueue(const unsigned int &queue)

Set render queue

Parameters
  • queue: queue id

unsigned int getRenderQueue()

Get render queue

void attachToBone(const DataProxy &params, const std::string &entityId, DataProxy movableObjectData)

Attach another entity to the bone

Parameters
  • params: should contain boneID field

  • entityId: Id of new entity

  • movableObjectData: MovableObject to create and attach

bool attach(Ogre::MovableObject *object, const DataProxy &params)

Attach another entity to the bone

Parameters
  • params: must contain boneID

OgreV1::Entity *getEntity()

Get underlying entity

void createCloneWithMaterial(Ogre::MaterialPtr material, Ogre::uint8 renderQueue)

Clone and assign entity material

Parameters
  • material:

void removeClone()

Remove cloned entity

Ogre::AxisAlignedBox getAabb() const

Get AABB

Public Static Attributes

const std::string TYPE

Private Types

typedef std::vector<OgreObject *> AttachedEntities

Private Members

OgreV1::SkeletonAnimationBlendMode mAnimBlendMode
std::string mMeshName
std::string mQueryString
std::string mResourceGroup
Query mQuery
AttachedEntities mAttachedEntities
OgreV1::Entity *mClone