Skyscraper 2.0
SBS::Step Class Reference

#include <step.h>

Inheritance diagram for SBS::Step:
Collaboration diagram for SBS::Step:

Public Member Functions

 Step (Object *parent, const std::string &name, DynamicMesh *wrapper, int max_render_distance=0)
 
 ~Step ()
 
void Move (const Vector3 &vector, Real speed=1.0f)
 
void OnHit ()
 
- Public Member Functions inherited from SBS::MeshObject
 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)
 
virtual ~MeshObject ()
 
void Enabled (bool value)
 
void EnableCollider (bool value)
 
bool IsEnabled ()
 
WallCreateWallObject (const std::string &name)
 
WallGetWallByName (std::string name)
 
void Prepare (bool force=false)
 
void EnableDebugView (bool value)
 
void CreateColliderFromModel (int &vertex_count, Vector3 *&vertices, int &index_count, unsigned long *&indices)
 
void CreateBoxCollider ()
 
void DeleteWalls ()
 
void DeleteWalls (Object *parent)
 
Vector3 GetPoint (const std::string &wallname, const Vector3 &start, const Vector3 &end)
 
Vector3 GetWallExtents (const std::string &name, Real altitude, bool get_max)
 
void OnMove (bool parent)
 
void OnRotate (bool parent)
 
bool IsVisible (Ogre::Camera *camera)
 
bool IsPhysical ()
 
Vector3 GetOffset ()
 
void Cut (Vector3 start, Vector3 end, bool cutwalls, bool cutfloors, int checkwallnumber=0, bool reset_check=true)
 
void CutOutsideBounds (Vector3 start, Vector3 end, bool cutwalls, bool cutfloors)
 
bool UsingDynamicBuffers ()
 
void GetBounds ()
 
void ChangeHeight (Real newheight)
 
void EnableShadows (bool value)
 
PolyMeshGetPolyMesh ()
 
bool IsPrepared ()
 
void ResetPrepare ()
 
bool ReplaceTexture (const std::string &oldtexture, const std::string &newtexture)
 
bool ChangeTexture (const std::string &texture, bool matcheck=true)
 
Vector2 GetExtents (int coord, bool flip_z=false)
 
Real GetHeight ()
 
Real HitBeam (const Vector3 &origin, const Vector3 &direction, Real max_distance)
 
void CreateCollider ()
 
void DeleteCollider ()
 
WallFindPolygon (const std::string &name, int &index)
 
bool InBoundingBox (const Vector3 &pos, bool check_y)
 
DynamicMeshGetDynamicMesh ()
 
void GetMeshInformation (const Ogre::Mesh *const mesh, int &vertex_count, Vector3 *&vertices, int &index_count, unsigned long *&indices, Ogre::AxisAlignedBox &extents)
 
unsigned int GetVertexCount ()
 
unsigned int GetTriangleCount (const std::string &material, bool total)
 
bool LoadFromMesh (const std::string &meshname)
 
void SetMaterial (const std::string &material)
 
void EnablePhysics (bool value, Real restitution=0, Real friction=0, Real mass=0)
 
size_t GetSize ()
 
- 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 OnClick (Vector3 &position, bool shift, bool ctrl, bool alt, bool right)
 
virtual void OnUnclick (bool right)
 
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)
 
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)
 

Public Attributes

Vector3 vector
 
Real speed
 
Vector3 start
 
- Public Attributes inherited from SBS::MeshObject
std::string name
 
bool create_collider
 
bool tricollider
 
bool remove_on_disable
 
DynamicMeshMeshWrapper
 
std::vector< Wall * > Walls
 
SceneNodecollider_node
 
Ogre::AxisAlignedBox * Bounds
 
OgreBulletDynamics::RigidBody * mBody
 
OgreBulletCollisions::CollisionShape * mShape
 
std::string Filename
 
std::string Meshname
 
bool model_loaded
 
- Public Attributes inherited from SBS::Object
std::string command
 
std::string command_processed
 
std::string context
 
int linenum
 
std::string includefile
 
bool parent_deleting
 

Additional Inherited Members

- 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 31 of file step.h.

Constructor & Destructor Documentation

◆ Step()

SBS::Step::Step ( Object * parent,
const std::string & name,
DynamicMesh * wrapper,
int max_render_distance = 0 )

Definition at line 31 of file step.cpp.

References speed, start, and vector.

◆ ~Step()

SBS::Step::~Step ( )
inline

Definition at line 35 of file step.h.

Member Function Documentation

◆ Move()

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

Reimplemented from SBS::Object.

Definition at line 38 of file step.cpp.

References SBS::Object::Move(), speed, and vector.

Here is the call graph for this function:

◆ OnHit()

void SBS::Step::OnHit ( )
virtual

Reimplemented from SBS::Object.

Definition at line 47 of file step.cpp.

References SBS::SBS::camera, SBS::Camera::MovePosition(), SBS::ObjectBase::sbs, speed, and vector.

Here is the call graph for this function:

Member Data Documentation

◆ speed

Real SBS::Step::speed

Definition at line 40 of file step.h.

Referenced by Move(), OnHit(), and Step().

◆ start

Vector3 SBS::Step::start

Definition at line 41 of file step.h.

Referenced by Step().

◆ vector

Vector3 SBS::Step::vector

Definition at line 39 of file step.h.

Referenced by Move(), OnHit(), and Step().


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