flimEngine
WorldPlane Class Reference

#include <WorldPlane.h>

Inheritance diagram for WorldPlane:
Inheritance graph
Collaboration diagram for WorldPlane:
Collaboration graph

Public Member Functions

 WorldPlane ()=delete
 
 WorldPlane (std::string text, int _x, int _y, int _z, Scene *_scene)
 
 WorldPlane (const WorldPlane &)=default
 
 ~WorldPlane ()
 
const WorldPlaneoperator= (const WorldPlane &)
 
errcode KeyPressed (AZUL_KEY key) override
 Key pressed callback. More...
 
virtual errcode Draw () override
 Draw callback to override. More...
 
virtual errcode Update () override
 Called every frame. More...
 
- Public Member Functions inherited from GameObject
 GameObject ()
 
virtual ~GameObject ()
 
GameObjectoperator= (const GameObject &)=default
 
 GameObject (const GameObject &)=default
 
errcode SubmitEntry ()
 Submit entry to the scene. More...
 
errcode SubmitExit ()
 Submit exit to the scene. More...
 
- Public Member Functions inherited from Updatable
 Updatable ()
 
virtual ~Updatable ()
 
 Updatable (const Updatable &)=delete
 
const Updatableoperator= (const Updatable &)=delete
 
errcode SubmitUpdateRegistration ()
 Submit update registration. More...
 
errcode SubmitUpdateDeregistration ()
 Submit update deregistration. More...
 
- Public Member Functions inherited from Drawable
 Drawable ()
 
virtual ~Drawable ()
 
 Drawable (const Drawable &)=delete
 
const Drawableoperator= (const Drawable &)=delete
 
virtual errcode Draw2D ()
 
errcode SubmitDrawRegistration ()
 Submit draw registration. More...
 
errcode SubmitDrawDeregistration ()
 Submit draw deregistration. More...
 
std::list< Drawable * >::iterator GetDeletionIterator ()
 
errcode SetDeletionIterator (std::list< Drawable *>::iterator in)
 
- Public Member Functions inherited from Inputable
 Inputable ()
 
virtual ~Inputable ()
 
 Inputable (const Inputable &)=delete
 
const Inputableoperator= (const Inputable &)=delete
 
virtual errcode KeyReleased (AZUL_KEY key)
 Key released. More...
 
errcode SubmitInputRegistration (AZUL_KEY key, input_type type)
 Submit input registration. More...
 
errcode SubmitInputDeregistration (AZUL_KEY key, input_type type)
 Submit input deregistration. More...
 
std::list< Inputable * >::iterator GetDeletionIterator ()
 
errcode SetDeletionIterator (std::list< Inputable *>::iterator in)
 
- Public Member Functions inherited from Alarmable
 Alarmable ()
 
Alarmableoperator= (const Alarmable &)
 
virtual ~Alarmable ()
 
 Alarmable (const Alarmable &)
 
errcode SubmitAlarmDeregistration (AlarmableManager::ALARM_ID id)
 Submit alarm deregistration. More...
 
errcode SubmitAlarmRegistration (float t, AlarmableManager::ALARM_ID id)
 Submit alarm registration. More...
 
virtual void Alarm0 ()
 Alarm 0 callback. More...
 
virtual void Alarm1 ()
 Alarm 1 callback. More...
 
virtual void Alarm2 ()
 Alarm 2 callback. More...
 
float TimeLeft (AlarmableManager::ALARM_ID id)
 Time left on one of the alarms. More...
 
errcode ChangeTime (float t, AlarmableManager::ALARM_ID id)
 Change time. More...
 
errcode AddTime (float t, AlarmableManager::ALARM_ID id)
 Adds a time to 'id'. More...
 
errcode SubtractTime (float t, AlarmableManager::ALARM_ID id)
 Subtract time. More...
 
bool IsRegistered (AlarmableManager::ALARM_ID id)
 Query if 'id' is registered. More...
 
errcode SetDeletionIter (int alarmNumber, std::multimap< float, AlarmableManager::AlarmEvent >::const_iterator iter)
 
std::multimap< float, AlarmableManager::AlarmEvent >::const_iterator GetDeletionIter (int alarmNumber)
 
errcode SetRegistrationState (int alarmNumber, RegistrationState state)
 
- Public Member Functions inherited from Collidable
 Collidable ()
 
virtual ~Collidable ()
 
 Collidable (const Collidable &)=delete
 
const Collidableoperator= (const Collidable &)=delete
 
virtual errcode Collision (Collidable *)
 Collision callback. More...
 
virtual errcode CollisionEnter (Collidable *)
 Collision enter. More...
 
virtual errcode CollisionExit ()
 Collision exit. More...
 
virtual errcode CollisionTerrain (const CollisionVolumeAABB &)
 Collision terrain. More...
 
template<typename C >
errcode SubmitCollisionRegistration (C *c)
 Submit collision registration of your type. More...
 
template<typename C >
errcode SubmitCollisionDeregistration (C *c)
 Submit collision deregistration for your type. More...
 
const CollisionVolumeGetCollisionVolume () const
 
errcode SetColliderModel (Model *mod, VolumeType vol)
 Sets collider model. More...
 
errcode UpdateCollisionData (Matrix &mat)
 Updates the collision data described by matrix. More...
 
std::list< Collidable * >::iterator GetDeletionIter ()
 
errcode SetDeletionIter (std::list< Collidable *>::iterator in)
 
bool getColliding () const
 
void setColliding (bool coll)
 
const CollisionVolumeBSpheregetBSphere () const
 

Public Attributes

Vect CamPos
 
Matrix CamRot
 
Vect CamUp
 
Vect CamDir
 
float CamTranSpeed
 
float CamRotSpeed
 
FlimTerrainterrain
 
Scenescene
 
- Public Attributes inherited from Updatable
std::list< Updatable * >::iterator deleteIter
 

Private Attributes

GraphicsObject_TextureFlat * pGObj_Plane
 
GraphicsObject_ColorNoTexture * pGObj_Axis
 
GraphicsObject_TextureLight * terrainGO
 
GraphicsObject_WireframeConstantColor * terrainGOWire
 

Constructor & Destructor Documentation

◆ WorldPlane() [1/3]

WorldPlane::WorldPlane ( )
delete

◆ WorldPlane() [2/3]

WorldPlane::WorldPlane ( std::string  text,
int  _x,
int  _y,
int  _z,
Scene _scene 
)

◆ WorldPlane() [3/3]

WorldPlane::WorldPlane ( const WorldPlane )
default

◆ ~WorldPlane()

WorldPlane::~WorldPlane ( )

Member Function Documentation

◆ Draw()

errcode WorldPlane::Draw ( )
overridevirtual

Draw callback to override.

Author
Jack Campbell
Date
3/5/2017
This will be called once a frame and should only contain code related to rendering.
{
// Place rendering code here.
// Render ship's graphics object to the current main camera via the Scene
pGObj_SpaceFrigateLight->Render(&SceneManager::GetCurrentScene().GetCamera()->MainCamera());
}
Returns
An errcode.

Reimplemented from Drawable.

◆ KeyPressed()

errcode WorldPlane::KeyPressed ( AZUL_KEY  key)
overridevirtual

Key pressed callback.

Author
Jack Campbell
Date
3/5/2017
Parameters
keyHook to check the key.
Place code in this callback if you are registered for a press
event.
{
if (key == AZUL_KEY::KEY_SPACE)
{
DebugMsg::out("pressed\n");
}
}
Returns
An errcode.

Reimplemented from Inputable.

◆ operator=()

const WorldPlane& WorldPlane::operator= ( const WorldPlane )
inline

◆ Update()

errcode WorldPlane::Update ( )
overridevirtual

Called every frame.

Author
Jack Campbell
Date
3/5/2017
Update is called once a frame on objects that have been registered to update.
{
// Place frame related content here. This code moves the ship's graphics object.
// Ship translation movement (not using time-based values for simplicity)
if (Keyboard::GetKeyState(AZUL_KEY::KEY_W))
{
ShipPos += Vect(0, 0, 1) * ShipRot * ShipTransSpeed;
}
else if (Keyboard::GetKeyState(AZUL_KEY::KEY_S))
{
ShipPos += Vect(0, 0, 1) * ShipRot * -ShipTransSpeed;
}
// Spaceship adjust matrix
Matrix world = ShipScale * ShipRot * Matrix(TRANS, ShipPos);
pGObj_SpaceFrigateLight->SetWorld(world);
}
Returns
An errcode.

Reimplemented from Updatable.

Member Data Documentation

◆ CamDir

Vect WorldPlane::CamDir

◆ CamPos

Vect WorldPlane::CamPos

◆ CamRot

Matrix WorldPlane::CamRot

◆ CamRotSpeed

float WorldPlane::CamRotSpeed

◆ CamTranSpeed

float WorldPlane::CamTranSpeed

◆ CamUp

Vect WorldPlane::CamUp

◆ pGObj_Axis

GraphicsObject_ColorNoTexture* WorldPlane::pGObj_Axis
private

◆ pGObj_Plane

GraphicsObject_TextureFlat* WorldPlane::pGObj_Plane
private

◆ scene

Scene* WorldPlane::scene

◆ terrain

FlimTerrain* WorldPlane::terrain

◆ terrainGO

GraphicsObject_TextureLight* WorldPlane::terrainGO
private

◆ terrainGOWire

GraphicsObject_WireframeConstantColor* WorldPlane::terrainGOWire
private

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