Skyscraper 2.0
|
#include <wall.h>
Public Member Functions | |
Wall (MeshObject *wrapper) | |
~Wall () | |
Polygon * | AddQuad (const std::string &name, const std::string &texture, const Vector3 &v1, const Vector3 &v2, const Vector3 &v3, const Vector3 &v4, Real tw, Real th, bool autosize) |
Polygon * | AddPolygon (const std::string &name, const std::string &texture, PolyArray &vertices, Real tw, Real th, bool autosize) |
Polygon * | AddPolygonSet (const std::string &name, const std::string &material, PolygonSet &vertices, Matrix3 &tex_matrix, Vector3 &tex_vector) |
void | DeletePolygons (bool recreate_collider=true) |
void | DeletePolygon (int index, bool recreate_colliders) |
int | GetPolygonCount () |
Polygon * | GetPolygon (int index) |
int | FindPolygon (const std::string &name) |
bool | IntersectsWall (Vector3 start, Vector3 end, Vector3 &isect, bool convert=true) |
void | Move (const Vector3 &vector, Real speed=1.0) |
MeshObject * | GetMesh () |
void | SetParentArray (std::vector< Wall * > &array) |
Vector3 | GetPoint (const Vector3 &start, const Vector3 &end) |
Vector3 | GetWallExtents (Real altitude, bool get_max) |
void | ChangeHeight (Real newheight) |
unsigned int | GetVertexCount () |
unsigned int | GetTriangleCount () |
bool | ReplaceTexture (const std::string &oldtexture, const std::string &newtexture) |
bool | ChangeTexture (const std::string &texture, bool matcheck=true) |
![]() | |
Object (Object *parent) | |
virtual | ~Object () |
void | SetValues (const std::string &type, const std::string &name, bool is_permanent, bool is_movable=true) |
bool | IsPermanent () |
bool | IsMovable () |
const std::string & | GetType () |
int | GetNumber () |
void | AddChild (Object *object) |
Object * | GetChild (int index) |
int | GetChildrenCount () |
void | RemoveChild (Object *object) |
SceneNode * | GetSceneNode () |
void | ShowBoundingBox (bool value) |
virtual void | Move (Real X, Real Y, Real Z, Real speed=1.0) |
virtual void | SetPosition (const Vector3 &position) |
void | SetPositionRelative (const Vector3 &position) |
virtual void | SetPosition (Real X, Real Y, Real Z) |
void | SetPositionRelative (Real X, Real Y, Real Z) |
virtual void | SetPositionY (Real value) |
virtual Vector3 | GetPosition (bool relative=false) |
virtual void | Rotate (const Vector3 &vector, Real speed=1.0) |
virtual void | Rotate (Real X, Real Y, Real Z, Real speed=1.0) |
virtual void | SetRotation (const Vector3 &rotation) |
virtual void | SetRotation (Real X, Real Y, Real Z) |
virtual Vector3 | GetRotation () |
Quaternion | GetOrientation (bool relative=false) |
void | SetOrientation (const Quaternion &q, bool relative=false) |
virtual void | OnMove (bool parent) |
virtual void | OnRotate (bool parent) |
virtual void | OnClick (Vector3 &position, bool shift, bool ctrl, bool alt, bool right) |
virtual void | OnUnclick (bool right) |
virtual void | OnHit () |
void | NotifyMove (bool parent=false) |
void | NotifyRotate (bool parent=false) |
virtual void | ResetState () |
void | ChangeParent (Object *new_parent) |
bool | IsGlobal () |
void | Init (bool children=true) |
virtual void | OnInit () |
virtual void | Loop () |
void | RegisterLoop (Object *object) |
void | UnregisterLoop (Object *object) |
virtual void | Enabled (bool value) |
std::string | GetNameBase () |
template<typename T > | |
bool | IsType () |
template<typename T > | |
T * | ConvertTo () |
![]() | |
ObjectBase (Object *parent) | |
virtual | ~ObjectBase () |
Object * | GetParent () |
SBS * | GetRoot () |
void | SetName (const std::string &name) |
const std::string & | GetName () |
std::string | GetNameBase () |
virtual void | Report (const std::string &message) |
virtual bool | ReportError (const std::string &message) |
Private Attributes | |
MeshObject * | meshwrapper |
std::vector< Polygon * > | polygons |
std::vector< Wall * > * | parent_array |
Friends | |
class | MeshObject |
Additional Inherited Members | |
![]() | |
std::string | command |
std::string | command_processed |
std::string | context |
int | linenum |
std::string | includefile |
bool | parent_deleting |
![]() | |
void | EnableLoop (bool value) |
void | LoopChildren () |
bool | SelfDestruct () |
![]() | |
SBS * | sbs |
SBS::Wall::Wall | ( | MeshObject * | wrapper | ) |
Definition at line 37 of file wall.cpp.
References meshwrapper, parent_array, SBS::ObjectBase::sbs, and SBS::SBS::WallCount.
SBS::Wall::~Wall | ( | ) |
Definition at line 46 of file wall.cpp.
References DeletePolygons(), SBS::SBS::FastDelete, parent_array, SBS::Object::parent_deleting, SBS::ObjectBase::sbs, and SBS::SBS::WallCount.
Polygon * SBS::Wall::AddPolygon | ( | const std::string & | name, |
const std::string & | texture, | ||
PolyArray & | vertices, | ||
Real | tw, | ||
Real | th, | ||
bool | autosize ) |
Definition at line 82 of file wall.cpp.
References SBS::Utility::ComputePlane(), SBS::PolyMesh::CreateMesh(), SBS::MeshObject::GetPolyMesh(), SBS::SBS::GetTextureManager(), SBS::TextureManager::GetTextureMaterial(), SBS::SBS::GetUtility(), meshwrapper, polygons, SBS::ObjectBase::ReportError(), and SBS::ObjectBase::sbs.
Referenced by SBS::SBS::AddPolygon(), and AddQuad().
Polygon * SBS::Wall::AddPolygonSet | ( | const std::string & | name, |
const std::string & | material, | ||
PolygonSet & | vertices, | ||
Matrix3 & | tex_matrix, | ||
Vector3 & | tex_vector ) |
Definition at line 112 of file wall.cpp.
References SBS::Utility::ComputePlane(), SBS::PolyMesh::CreateMesh(), SBS::MeshObject::GetPolyMesh(), SBS::SBS::GetUtility(), meshwrapper, polygons, SBS::ObjectBase::ReportError(), and SBS::ObjectBase::sbs.
Referenced by SBS::Utility::Cut().
Polygon * SBS::Wall::AddQuad | ( | const std::string & | name, |
const std::string & | texture, | ||
const Vector3 & | v1, | ||
const Vector3 & | v2, | ||
const Vector3 & | v3, | ||
const Vector3 & | v4, | ||
Real | tw, | ||
Real | th, | ||
bool | autosize ) |
Definition at line 68 of file wall.cpp.
References AddPolygon().
Referenced by SBS::SBS::AddFloorMain(), SBS::SBS::AddWallMain(), SBS::SBS::CreateSky(), and SBS::SBS::CreateWallBox().
void SBS::Wall::ChangeHeight | ( | Real | newheight | ) |
Definition at line 328 of file wall.cpp.
References SBS::MeshObject::CreateCollider(), SBS::MeshObject::DeleteCollider(), meshwrapper, polygons, SBS::MeshObject::Prepare(), and SBS::MeshObject::UsingDynamicBuffers().
bool SBS::Wall::ChangeTexture | ( | const std::string & | texture, |
bool | matcheck = true ) |
Definition at line 378 of file wall.cpp.
References SBS::Polygon::ChangeTexture(), GetPolygon(), and GetPolygonCount().
void SBS::Wall::DeletePolygon | ( | int | index, |
bool | recreate_colliders ) |
Definition at line 158 of file wall.cpp.
References SBS::MeshObject::CreateCollider(), SBS::MeshObject::DeleteCollider(), meshwrapper, polygons, and SBS::MeshObject::Prepare().
Referenced by SBS::Utility::Cut().
void SBS::Wall::DeletePolygons | ( | bool | recreate_collider = true | ) |
Definition at line 137 of file wall.cpp.
References SBS::MeshObject::CreateCollider(), SBS::MeshObject::DeleteCollider(), meshwrapper, polygons, and SBS::MeshObject::Prepare().
Referenced by SBS::MeshObject::DeleteWalls(), SBS::MeshObject::DeleteWalls(), and ~Wall().
int SBS::Wall::FindPolygon | ( | const std::string & | name | ) |
Definition at line 190 of file wall.cpp.
References SBS::ObjectBase::GetName(), polygons, and SBS_PROFILE.
Referenced by SBS::MeshObject::FindPolygon().
MeshObject * SBS::Wall::GetMesh | ( | ) |
Definition at line 258 of file wall.cpp.
References meshwrapper.
Referenced by SBS::Utility::AddDoorwayWalls(), SBS::SBS::AddFloorMain(), SBS::SBS::AddWallMain(), and SBS::Utility::Cut().
Definition at line 268 of file wall.cpp.
References SBS::PolyMesh::FindWallIntersect(), SBS::MeshObject::GetPolyMesh(), meshwrapper, SBS::ObjectBase::sbs, SBS::SBS::ToLocal(), and SBS::SBS::ToRemote().
Referenced by SBS::MeshObject::GetPoint().
Polygon * SBS::Wall::GetPolygon | ( | int | index | ) |
Definition at line 183 of file wall.cpp.
References polygons.
Referenced by ChangeTexture(), SBS::Utility::Cut(), and ReplaceTexture().
int SBS::Wall::GetPolygonCount | ( | ) |
Definition at line 178 of file wall.cpp.
References polygons.
Referenced by ChangeTexture(), SBS::Utility::Cut(), GetWallExtents(), and ReplaceTexture().
unsigned int SBS::Wall::GetTriangleCount | ( | ) |
unsigned int SBS::Wall::GetVertexCount | ( | ) |
Definition at line 284 of file wall.cpp.
References SBS::Utility::GetExtents(), GetPolygonCount(), SBS::SBS::GetUtility(), polygons, SBS::ObjectBase::sbs, SBS::Utility::SplitWithPlane(), and SBS::SBS::ToLocal().
Referenced by SBS::MeshObject::GetWallExtents().
Definition at line 204 of file wall.cpp.
References polygons, SBS::ObjectBase::sbs, SBS_PROFILE, and SBS::SBS::ToRemote().
Reimplemented from SBS::Object.
Definition at line 238 of file wall.cpp.
References SBS::MeshObject::CreateCollider(), SBS::MeshObject::DeleteCollider(), meshwrapper, SBS::Object::Move(), polygons, SBS::MeshObject::Prepare(), and SBS::MeshObject::UsingDynamicBuffers().
bool SBS::Wall::ReplaceTexture | ( | const std::string & | oldtexture, |
const std::string & | newtexture ) |
Definition at line 364 of file wall.cpp.
References GetPolygon(), GetPolygonCount(), and SBS::Polygon::ReplaceTexture().
void SBS::Wall::SetParentArray | ( | std::vector< Wall * > & | array | ) |
Definition at line 263 of file wall.cpp.
References parent_array.
Referenced by SBS::MeshObject::CreateWallObject().
|
friend |
|
private |
Definition at line 67 of file wall.h.
Referenced by AddPolygon(), AddPolygonSet(), ChangeHeight(), DeletePolygon(), DeletePolygons(), GetMesh(), GetPoint(), Move(), and Wall().
|
private |
Definition at line 73 of file wall.h.
Referenced by SetParentArray(), Wall(), and ~Wall().
|
private |
Definition at line 70 of file wall.h.
Referenced by AddPolygon(), AddPolygonSet(), ChangeHeight(), DeletePolygon(), DeletePolygons(), FindPolygon(), GetPolygon(), GetPolygonCount(), GetTriangleCount(), GetVertexCount(), GetWallExtents(), IntersectsWall(), and Move().