51 MeshObject(
Object* parent,
const std::string &name,
DynamicMesh* wrapper = 0,
const std::string &filename =
"",
const std::string &meshname =
"",
Real max_render_distance = 0,
Real scale_multiplier = 1,
bool create_collider =
true,
bool dynamic_buffers =
false);
53 void Enabled(
bool value);
54 void EnableCollider(
bool value);
56 Wall* CreateWallObject(
const std::string &name);
57 Wall* GetWallByName(std::string name);
58 void Prepare(
bool force =
false);
59 void EnableDebugView(
bool value);
60 void CreateColliderFromModel(
int &vertex_count,
Vector3* &vertices,
int &index_count,
unsigned long* &indices);
61 void CreateBoxCollider();
63 void DeleteWalls(
Object *parent);
65 Vector3 GetWallExtents(
const std::string &name,
Real altitude,
bool get_max);
66 void OnMove(
bool parent);
67 void OnRotate(
bool parent);
68 bool IsVisible(Ogre::Camera *camera);
71 void Cut(
Vector3 start,
Vector3 end,
bool cutwalls,
bool cutfloors,
int checkwallnumber = 0,
bool reset_check =
true);
72 void CutOutsideBounds(
Vector3 start,
Vector3 end,
bool cutwalls,
bool cutfloors);
73 bool UsingDynamicBuffers();
75 void ChangeHeight(
Real newheight);
76 void EnableShadows(
bool value);
80 bool ReplaceTexture(
const std::string &oldtexture,
const std::string &newtexture);
81 bool ChangeTexture(
const std::string &texture,
bool matcheck =
true);
82 Vector2 GetExtents(
int coord,
bool flip_z =
false);
85 void CreateCollider();
86 void DeleteCollider();
87 Wall* FindPolygon(
const std::string &name,
int &index);
88 bool InBoundingBox(
const Vector3 &pos,
bool check_y);
90 void GetMeshInformation(
const Ogre::Mesh*
const mesh,
int &vertex_count,
Vector3* &vertices,
int &index_count,
unsigned long* &indices, Ogre::AxisAlignedBox &extents);
91 unsigned int GetVertexCount();
92 unsigned int GetTriangleCount(
const std::string &material,
bool total);
93 bool LoadFromMesh(
const std::string &meshname);
94 void SetMaterial(
const std::string& material);
95 void EnablePhysics(
bool value,
Real restitution = 0,
Real friction = 0,
Real mass = 0);
104 OgreBulletDynamics::RigidBody*
mBody;
105 OgreBulletCollisions::CollisionShape*
mShape;
117 bool LoadFromFile(
const std::string &filename);
118 bool LoadColliderModel(Ogre::MeshPtr &collidermesh);