|
Terminus
|
The AbstractWagon class provides a common interface for all wagon types and contains common functionality like position calculation &c. More...
#include <abstractwagon.h>
Public Member Functions | |
| AbstractWagon (World &world, Train *train) | |
| virtual | ~AbstractWagon () |
| virtual void | primaryAction () final |
| Invokes wagon-specific primary action if the wagon is enabled and is not on cooldown. More... | |
| virtual void | primaryActionDebug () final |
| Invokes wagon-specific primary action without any checks. More... | |
| virtual void | primaryActionInternal ()=0 |
| The method that every wagon should override in order to define the wagon-specific primary action. More... | |
| virtual void | localUpdate () override |
| Updates wagon position and rotation. More... | |
| virtual void | onBindCamera () override |
| saves the previous camera position to animate the camera transition More... | |
| virtual void | adjustCamera () |
| moves the camera according to this wagons position and orientation More... | |
| virtual void | rotateEvent (QVector2D rotation) |
| rotates the camera position in model space More... | |
| virtual void | setHealth (float health) |
| virtual float | currentHealth () const |
| virtual float | maxHealth () const |
| virtual void | resetCooldown () const |
| virtual float | cooldown () const |
| virtual float | cooldownTime () const =0 |
| virtual bool | isOnCooldown () const |
| virtual bool | isDisabled () const |
| virtual WagonType | wagonType () const |
| virtual float | length () const |
| virtual bool | isOtherTrainLeft () const |
| Determines whether the primary view direction should be left or right. More... | |
| virtual void | setPositionOffset (float accumulatedOffset) |
| Sets the distance between this wagon and the first wagon on the spline. More... | |
| virtual void | onCollisionWith (AbstractPhysicsObject *other) override |
| Shakes the camera if the wagon was hit by a Projectile. More... | |
Public Member Functions inherited from terminus::KinematicPhysicsObject | |
| KinematicPhysicsObject (World &world) | |
Public Member Functions inherited from terminus::AbstractPhysicsObject | |
| AbstractPhysicsObject (World &world) | |
| virtual void | moveTo (const QVector3D &newPosition) |
| Moves object to new position. More... | |
| virtual void | setSpawnedLocally (bool spawnedLocally) |
| Set whether this PhysicsObject originated in this local game instance or in a remote instance. More... | |
Public Member Functions inherited from terminus::AbstractGraphicsObject | |
| AbstractGraphicsObject (World &world) | |
| virtual | ~AbstractGraphicsObject () |
| virtual void | update () final |
| update object hierarchy beginning at this object More... | |
| virtual void | render (QOpenGLFunctions &gl) final |
| render object hierarchy beginning at this object More... | |
| virtual void | bindCamera (Camera *camera) |
| binds a camera to track this object More... | |
| virtual void | unbindCamera (Camera *camera) |
| release a camera so that it wont track this object any longer More... | |
| virtual void | onUnbindCamera () |
| override this method to perform specific actions once a camera has been released More... | |
| virtual void | moveEvent (QVector3D movement) |
| override this method to react to move events received by a bound camera More... | |
| const QVector3D & | minBB () const |
| const QVector3D & | maxBB () const |
| QVector3D | worldUp () |
| QVector3D | worldFront () |
| QVector3D | worldSide () |
| QVector3D | position () const |
| QQuaternion | rotation () const |
| QVector3D | scale () const |
| QMatrix4x4 | modelMatrix () const |
| QMatrix4x4 | modelMatrixInverted () const |
Protected Member Functions | |
| virtual short | myCollisionType () const override |
| The collision group that this object is member of. More... | |
| virtual short | possibleCollisionTypes () const override |
| The groups of objects that this object will collide with. More... | |
| virtual QVector3D | localCameraCenter () |
| Calculates the camera position vector in model space. More... | |
| virtual QVector3D | localCameraEye () |
| Calculates the camera eye vector in model space. More... | |
Protected Member Functions inherited from terminus::KinematicPhysicsObject | |
| virtual void | initializePhysics (btCollisionShape *collisionShape, btScalar mass) override |
Protected Member Functions inherited from terminus::AbstractPhysicsObject | |
| virtual void | deallocatePhysics () |
Protected Member Functions inherited from terminus::AbstractGraphicsObject | |
| virtual void | localRender (QOpenGLFunctions &gl) const |
| this method contains the default render code using m_geometry, m_program and m_material More... | |
| virtual void | localRenderSetup (QOpenGLFunctions &gl, Program &program) const |
| override this method to customize the rendering process More... | |
| virtual void | localRenderCleanup (QOpenGLFunctions &gl, Program &program) const |
| override this method to customize the rendering process More... | |
| virtual bool | localRenderEnabled () const |
| override this method to disable or enable rendering conditionally More... | |
| virtual void | doForAllChildren (std::function< void(AbstractGraphicsObject &)> callback) |
| override this method to make child objects known More... | |
| void | setPosition (const QVector3D &position) |
| sets the position and invalidates the model matrices More... | |
| void | setRotation (const QQuaternion &rotation) |
| sets the rotation and invalidates the model matrices More... | |
| void | setScale (const QVector3D &scale) |
| sets the scale and invalidates the model matrices More... | |
| void | setScale (float scale) |
| sets the scale uniformly on all three axes and invalidates the model matrices More... | |
| QVector3D | worldToModel (const QVector3D &vWorld) |
| QVector3D | modelToWorld (const QVector3D &vModel) |
| void | dispose () |
| remove this object from the world and delete it as soon as it is safe to do so More... | |
Protected Attributes | |
| QVector3D | m_cameraEyeOffset |
| QVector3D | m_previousEye |
| QVector3D | m_previousCenter |
| Timer::TimerID | m_cameraTimer |
| float | m_positionOffset |
| float | m_health |
| bool | m_disabled |
| Timer::TimerID | m_cooldownTimer |
| Train * | m_train |
Protected Attributes inherited from terminus::AbstractPhysicsObject | |
| std::shared_ptr< BulletWorld > | m_bulletWorld |
| Shared pointer to the bullet world that this object lives in. More... | |
| std::unique_ptr< btRigidBody > | m_btRigidBody |
| bool | m_spawnedLocally |
Protected Attributes inherited from terminus::AbstractGraphicsObject | |
| World & | m_world |
| bool | m_validState |
| Camera * | m_camera |
| std::shared_ptr< std::unique_ptr< Program > > | m_program |
| std::shared_ptr< std::unique_ptr< Geometry > > | m_geometry |
| std::shared_ptr< std::unique_ptr< Material > > | m_material |
| QVector3D | m_position |
| QQuaternion | m_rotation |
| QVector3D | m_scale |
| bool | m_modelMatrixChanged |
| QMatrix4x4 | m_modelMatrix |
| bool | m_modelMatrixInvertedChanged |
| QMatrix4x4 | m_modelMatrixInverted |
The AbstractWagon class provides a common interface for all wagon types and contains common functionality like position calculation &c.
|
virtual |
|
virtual |
moves the camera according to this wagons position and orientation
Reimplemented from terminus::AbstractGraphicsObject.
|
virtual |
|
pure virtual |
Implemented in terminus::EngineWagon, terminus::WeaponWagon, and terminus::RepairWagon.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Determines whether the primary view direction should be left or right.
|
virtual |
|
protectedvirtual |
Calculates the camera position vector in model space.
|
protectedvirtual |
Calculates the camera eye vector in model space.
|
overridevirtual |
Updates wagon position and rotation.
Reimplemented from terminus::KinematicPhysicsObject.
Reimplemented in terminus::EngineWagon, terminus::RepairWagon, and terminus::WeaponWagon.
|
virtual |
Reimplemented in terminus::EngineWagon.
|
overrideprotectedvirtual |
The collision group that this object is member of.
Implements terminus::AbstractPhysicsObject.
|
overridevirtual |
saves the previous camera position to animate the camera transition
Reimplemented from terminus::AbstractGraphicsObject.
|
overridevirtual |
Shakes the camera if the wagon was hit by a Projectile.
| other | The AbstractPhysicsObject that hit this wagon |
Reimplemented from terminus::AbstractPhysicsObject.
|
overrideprotectedvirtual |
The groups of objects that this object will collide with.
Implements terminus::AbstractPhysicsObject.
|
finalvirtual |
Invokes wagon-specific primary action if the wagon is enabled and is not on cooldown.
|
finalvirtual |
Invokes wagon-specific primary action without any checks.
|
pure virtual |
The method that every wagon should override in order to define the wagon-specific primary action.
Implemented in terminus::EngineWagon, terminus::RepairWagon, and terminus::WeaponWagon.
|
virtual |
|
virtual |
rotates the camera position in model space
| rotation |
Reimplemented from terminus::AbstractGraphicsObject.
|
virtual |
|
virtual |
Sets the distance between this wagon and the first wagon on the spline.
| accumulatedOffset | The distance on the spline, in abstract units |
|
virtual |
Reimplemented in terminus::EngineWagon, terminus::WeaponWagon, and terminus::RepairWagon.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
1.8.9.1