Skyscraper 2.0
SBS::Wall Class Reference

#include <wall.h>

Inheritance diagram for SBS::Wall:
Collaboration diagram for SBS::Wall:

Public Member Functions

 Wall (MeshObject *wrapper)
 
 ~Wall ()
 
PolygonAddQuad (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)
 
PolygonAddPolygon (const std::string &name, const std::string &texture, PolyArray &vertices, Real tw, Real th, bool autosize)
 
PolygonAddPolygonSet (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 ()
 
PolygonGetPolygon (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)
 
MeshObjectGetMesh ()
 
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)
 
- Public Member Functions inherited from SBS::Object
 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)
 
ObjectGetChild (int index)
 
int GetChildrenCount ()
 
void RemoveChild (Object *object)
 
SceneNodeGetSceneNode ()
 
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 ()
 
- Public Member Functions inherited from SBS::ObjectBase
 ObjectBase (Object *parent)
 
virtual ~ObjectBase ()
 
ObjectGetParent ()
 
SBSGetRoot ()
 
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

MeshObjectmeshwrapper
 
std::vector< Polygon * > polygons
 
std::vector< Wall * > * parent_array
 

Friends

class MeshObject
 

Additional Inherited Members

- Public Attributes inherited from SBS::Object
std::string command
 
std::string command_processed
 
std::string context
 
int linenum
 
std::string includefile
 
bool parent_deleting
 
- Protected Member Functions inherited from SBS::Object
void EnableLoop (bool value)
 
void LoopChildren ()
 
bool SelfDestruct ()
 
- Protected Attributes inherited from SBS::ObjectBase
SBSsbs
 

Detailed Description

Definition at line 35 of file wall.h.

Constructor & Destructor Documentation

◆ Wall()

SBS::Wall::Wall ( MeshObject * wrapper)

Definition at line 37 of file wall.cpp.

References meshwrapper, parent_array, SBS::ObjectBase::sbs, and SBS::SBS::WallCount.

◆ ~Wall()

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.

Here is the call graph for this function:

Member Function Documentation

◆ AddPolygon()

Polygon * SBS::Wall::AddPolygon ( const std::string & name,
const std::string & texture,
PolyArray & vertices,
Real tw,
Real th,
bool autosize )

◆ AddPolygonSet()

Polygon * SBS::Wall::AddPolygonSet ( const std::string & name,
const std::string & material,
PolygonSet & vertices,
Matrix3 & tex_matrix,
Vector3 & tex_vector )

◆ AddQuad()

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().

Here is the call graph for this function:

◆ ChangeHeight()

void SBS::Wall::ChangeHeight ( Real newheight)

◆ ChangeTexture()

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().

Here is the call graph for this function:

◆ DeletePolygon()

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().

Here is the call graph for this function:

◆ DeletePolygons()

void SBS::Wall::DeletePolygons ( bool recreate_collider = true)

◆ FindPolygon()

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().

Here is the call graph for this function:

◆ GetMesh()

MeshObject * SBS::Wall::GetMesh ( )

◆ GetPoint()

Vector3 SBS::Wall::GetPoint ( const Vector3 & start,
const Vector3 & end )

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().

Here is the call graph for this function:

◆ GetPolygon()

Polygon * SBS::Wall::GetPolygon ( int index)

Definition at line 183 of file wall.cpp.

References polygons.

Referenced by ChangeTexture(), SBS::Utility::Cut(), and ReplaceTexture().

◆ GetPolygonCount()

int SBS::Wall::GetPolygonCount ( )

Definition at line 178 of file wall.cpp.

References polygons.

Referenced by ChangeTexture(), SBS::Utility::Cut(), GetWallExtents(), and ReplaceTexture().

◆ GetTriangleCount()

unsigned int SBS::Wall::GetTriangleCount ( )

Definition at line 354 of file wall.cpp.

References polygons.

◆ GetVertexCount()

unsigned int SBS::Wall::GetVertexCount ( )

Definition at line 344 of file wall.cpp.

References polygons.

◆ GetWallExtents()

Vector3 SBS::Wall::GetWallExtents ( Real altitude,
bool get_max )

◆ IntersectsWall()

bool SBS::Wall::IntersectsWall ( Vector3 start,
Vector3 end,
Vector3 & isect,
bool convert = true )

Definition at line 204 of file wall.cpp.

References polygons, SBS::ObjectBase::sbs, SBS_PROFILE, and SBS::SBS::ToRemote().

Here is the call graph for this function:

◆ Move()

void SBS::Wall::Move ( const Vector3 & vector,
Real speed = 1.0 )
virtual

◆ ReplaceTexture()

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().

Here is the call graph for this function:

◆ SetParentArray()

void SBS::Wall::SetParentArray ( std::vector< Wall * > & array)

Definition at line 263 of file wall.cpp.

References parent_array.

Referenced by SBS::MeshObject::CreateWallObject().

Friends And Related Symbol Documentation

◆ MeshObject

friend class MeshObject
friend

Definition at line 37 of file wall.h.

Member Data Documentation

◆ meshwrapper

MeshObject* SBS::Wall::meshwrapper
private

◆ parent_array

std::vector<Wall*>* SBS::Wall::parent_array
private

Definition at line 73 of file wall.h.

Referenced by SetParentArray(), Wall(), and ~Wall().

◆ polygons


The documentation for this class was generated from the following files: