flimEngine
SpacePlane Class Reference

#include <SpacePlane.h>

Inheritance diagram for SpacePlane:
Inheritance graph
Collaboration diagram for SpacePlane:
Collaboration graph

Public Member Functions

 SpacePlane ()=delete
 
 SpacePlane (std::string text, int _x, int _y, int _z, Scene *_scene)
 
 SpacePlane (const SpacePlane &)=default
 
 ~SpacePlane ()
 
const SpacePlaneoperator= (const SpacePlane &)
 
errcode KeyPressed (AZUL_KEY key) override
 Key pressed callback. More...
 
virtual errcode Draw () override
 Draw callback to override. More...
 
virtual errcode Draw2D () override
 
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
 
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
 
Scenescene
 
- Public Attributes inherited from Updatable
std::list< Updatable * >::iterator deleteIter
 

Private Attributes

GraphicsObject_TextureFlat * pGObj_Plane
 
GraphicsObject_ColorNoTexture * pGObj_Axis
 
FlimSpritestitch
 
FlimSpritealien
 

Constructor & Destructor Documentation

◆ SpacePlane() [1/3]

SpacePlane::SpacePlane ( )
delete

◆ SpacePlane() [2/3]

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

◆ SpacePlane() [3/3]

SpacePlane::SpacePlane ( const SpacePlane )
default

◆ ~SpacePlane()

SpacePlane::~SpacePlane ( )

Member Function Documentation

◆ Draw()

errcode SpacePlane::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.

◆ Draw2D()

errcode SpacePlane::Draw2D ( )
overridevirtual

Reimplemented from Drawable.

◆ KeyPressed()

errcode SpacePlane::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 SpacePlane& SpacePlane::operator= ( const SpacePlane )
inline

◆ Update()

errcode SpacePlane::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

◆ alien

FlimSprite* SpacePlane::alien
private

◆ CamDir

Vect SpacePlane::CamDir

◆ CamPos

Vect SpacePlane::CamPos

◆ CamRot

Matrix SpacePlane::CamRot

◆ CamRotSpeed

float SpacePlane::CamRotSpeed

◆ CamTranSpeed

float SpacePlane::CamTranSpeed

◆ CamUp

Vect SpacePlane::CamUp

◆ pGObj_Axis

GraphicsObject_ColorNoTexture* SpacePlane::pGObj_Axis
private

◆ pGObj_Plane

GraphicsObject_TextureFlat* SpacePlane::pGObj_Plane
private

◆ scene

Scene* SpacePlane::scene

◆ stitch

FlimSprite* SpacePlane::stitch
private

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