Skyscraper 2.0
SBS::Utility Class Reference

#include <utility.h>

Inheritance diagram for SBS::Utility:
Collaboration diagram for SBS::Utility:

Public Member Functions

 Utility (Object *parent)
 
 ~Utility ()
 
Vector2 GetExtents (PolyArray &varray, int coord, bool flip_z=false)
 
void Cut (Wall *wall, Vector3 start, Vector3 end, bool cutwalls, bool cutfloors, int checkwallnumber=0, bool reset_check=true)
 
void GetDoorwayExtents (MeshObject *mesh, int checknumber, PolyArray &polygon)
 
Vector3 GetPolygonDirection (PolyArray &polygon)
 
Vector2 GetEndPoint (const Vector2 &StartPoint, Real angle, Real distance)
 
Plane ComputePlane (PolyArray &vertices, bool flip_normal=true)
 
void SplitWithPlane (int axis, PolyArray &orig, PolyArray &poly1, PolyArray &poly2, Real value)
 
Vector3 ComputeNormal (PolyArray &vertices, Real &D)
 
void ResetDoorwayWalls ()
 
WallAddDoorwayWalls (MeshObject *mesh, const std::string &wallname, const std::string &texture, Real tw, Real th)
 
- 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

PolyArray temppoly
 
PolyArray temppoly2
 
PolyArray temppoly3
 
PolyArray temppoly4
 
PolyArray temppoly5
 
PolyArray worker
 
PolygonSet newpolys
 
PolyArray newpoly
 
bool wall1a
 
bool wall1b
 
bool wall2a
 
bool wall2b
 
Vector2 wall_extents_x
 
Vector2 wall_extents_z
 
Vector2 wall_extents_y
 

Additional Inherited Members

- Protected Attributes inherited from SBS::ObjectBase
SBSsbs
 

Detailed Description

Definition at line 26 of file utility.h.

Constructor & Destructor Documentation

◆ Utility()

SBS::Utility::Utility ( Object * parent)

Definition at line 32 of file utility.cpp.

References ResetDoorwayWalls(), temppoly, temppoly2, temppoly3, temppoly4, temppoly5, and worker.

Here is the call graph for this function:

◆ ~Utility()

SBS::Utility::~Utility ( )

Definition at line 44 of file utility.cpp.

Member Function Documentation

◆ AddDoorwayWalls()

◆ ComputeNormal()

Vector3 SBS::Utility::ComputeNormal ( PolyArray & vertices,
Real & D )

Definition at line 343 of file texmap.cpp.

References SMALL_EPSILON.

Referenced by ComputePlane().

◆ ComputePlane()

Plane SBS::Utility::ComputePlane ( PolyArray & vertices,
bool flip_normal = true )

Definition at line 504 of file utility.cpp.

References ComputeNormal().

Referenced by SBS::Wall::AddPolygon(), SBS::Wall::AddPolygonSet(), SBS::PolyMesh::CreateMesh(), GetPolygonDirection(), and SBS::TextureManager::GetTextureMapping().

Here is the call graph for this function:

◆ Cut()

◆ GetDoorwayExtents()

void SBS::Utility::GetDoorwayExtents ( MeshObject * mesh,
int checknumber,
PolyArray & polygon )

Definition at line 400 of file utility.cpp.

References GetExtents(), SBS::Object::GetPosition(), wall1a, wall1b, wall2a, wall2b, wall_extents_x, wall_extents_y, and wall_extents_z.

Referenced by Cut().

Here is the call graph for this function:

◆ GetEndPoint()

Vector2 SBS::Utility::GetEndPoint ( const Vector2 & StartPoint,
Real angle,
Real distance )

Definition at line 490 of file utility.cpp.

References SBS::DegreesToRadians().

Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().

Here is the call graph for this function:

◆ GetExtents()

Vector2 SBS::Utility::GetExtents ( PolyArray & varray,
int coord,
bool flip_z = false )

◆ GetPolygonDirection()

Vector3 SBS::Utility::GetPolygonDirection ( PolyArray & polygon)

Definition at line 443 of file utility.cpp.

References ComputePlane(), newpoly, SBS::ObjectBase::sbs, and SBS::SBS::ToRemote().

Here is the call graph for this function:

◆ ResetDoorwayWalls()

◆ SplitWithPlane()

void SBS::Utility::SplitWithPlane ( int axis,
PolyArray & orig,
PolyArray & poly1,
PolyArray & poly2,
Real value )

Definition at line 240 of file texmap.cpp.

References SMALL_EPSILON.

Referenced by Cut(), and SBS::Wall::GetWallExtents().

Member Data Documentation

◆ newpoly

PolyArray SBS::Utility::newpoly
private

Definition at line 48 of file utility.h.

Referenced by GetPolygonDirection().

◆ newpolys

PolygonSet SBS::Utility::newpolys
private

Definition at line 46 of file utility.h.

Referenced by Cut().

◆ temppoly

PolyArray SBS::Utility::temppoly
private

Definition at line 45 of file utility.h.

Referenced by Cut(), and Utility().

◆ temppoly2

PolyArray SBS::Utility::temppoly2
private

Definition at line 45 of file utility.h.

Referenced by Cut(), and Utility().

◆ temppoly3

PolyArray SBS::Utility::temppoly3
private

Definition at line 45 of file utility.h.

Referenced by Cut(), and Utility().

◆ temppoly4

PolyArray SBS::Utility::temppoly4
private

Definition at line 45 of file utility.h.

Referenced by Cut(), and Utility().

◆ temppoly5

PolyArray SBS::Utility::temppoly5
private

Definition at line 45 of file utility.h.

Referenced by Cut(), and Utility().

◆ wall1a

bool SBS::Utility::wall1a
private

Definition at line 51 of file utility.h.

Referenced by AddDoorwayWalls(), Cut(), GetDoorwayExtents(), and ResetDoorwayWalls().

◆ wall1b

bool SBS::Utility::wall1b
private

Definition at line 51 of file utility.h.

Referenced by Cut(), GetDoorwayExtents(), and ResetDoorwayWalls().

◆ wall2a

bool SBS::Utility::wall2a
private

Definition at line 51 of file utility.h.

Referenced by AddDoorwayWalls(), Cut(), GetDoorwayExtents(), and ResetDoorwayWalls().

◆ wall2b

bool SBS::Utility::wall2b
private

Definition at line 51 of file utility.h.

Referenced by Cut(), GetDoorwayExtents(), and ResetDoorwayWalls().

◆ wall_extents_x

Vector2 SBS::Utility::wall_extents_x
private

Definition at line 52 of file utility.h.

Referenced by AddDoorwayWalls(), GetDoorwayExtents(), and ResetDoorwayWalls().

◆ wall_extents_y

Vector2 SBS::Utility::wall_extents_y
private

Definition at line 52 of file utility.h.

Referenced by AddDoorwayWalls(), GetDoorwayExtents(), and ResetDoorwayWalls().

◆ wall_extents_z

Vector2 SBS::Utility::wall_extents_z
private

Definition at line 52 of file utility.h.

Referenced by AddDoorwayWalls(), GetDoorwayExtents(), and ResetDoorwayWalls().

◆ worker

PolyArray SBS::Utility::worker
private

Definition at line 45 of file utility.h.

Referenced by Cut(), and Utility().


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