HoverRace  2.0
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
HoverRace::ObjFac1::TestElement Class Reference

Used to test and build new FreeElements. More...

#include <TestElement.h>

+ Inheritance diagram for HoverRace::ObjFac1::TestElement:

Classes

struct  Cylinder
 

Public Member Functions

 TestElement (ObjFacTools::ResourceLib &resourceLib, int pActorRes)
 
 ~TestElement ()
 
int Simulate (MR_SimulationTime pDuration, Model::Track &track, int pRoom) override
 Advance the simulation. More...
 
- Public Member Functions inherited from HoverRace::ObjFacTools::FreeElementBase
 FreeElementBase (const Util::ObjectFromFactoryId &id)
 
 ~FreeElementBase ()
 
void Render (VideoServices::Viewport3D *pDest, MR_SimulationTime pTime) override
 
- Public Member Functions inherited from HoverRace::Model::FreeElement
 FreeElement (const Util::ObjectFromFactoryId &id={0, 0})
 
virtual ~FreeElement ()
 
virtual bool AssignPermNumber (int pNumber)
 Assign a permanent hook number. More...
 
virtual ElementNetState GetNetState () const
 
virtual void PlayExternalSounds (int pDB, int pPan)
 
virtual void PlayInternalSounds ()
 
virtual void SetNetState (int pDataLen, const MR_UInt8 *pData)
 
virtual void SetOwnerId (int pOwnerId)
 
- Public Member Functions inherited from HoverRace::Model::Element
 Element (const Util::ObjectFromFactoryId &id)
 
virtual ~Element ()
 
virtual void AddRenderer ()
 
void ApplyEffects (const ContactEffectList *pList, MR_SimulationTime pTime, MR_SimulationTime pDuration, BOOL pValidDirection, MR_Angle pHorizontalDirection, MR_Int32 pZMin, MR_Int32 pZMax, Track &track)
 
void Serialize (Parcel::ObjStream &) overridefinal
 
- Public Member Functions inherited from HoverRace::Util::ObjectFromFactory
 ObjectFromFactory (const ObjectFromFactoryId &pId) noexcept
 
virtual ~ObjectFromFactory ()
 
const ObjectFromFactoryIdGetTypeId () const noexcept
 

Protected Member Functions

void ApplyEffect (const Model::ContactEffect *pEffect, MR_SimulationTime pTime, MR_SimulationTime pDuration, BOOL pValidDirection, MR_Angle pHorizontalDirection, MR_Int32 pZMin, MR_Int32 pZMax, Model::Track &track) override
 
const Model::ContactEffectListGetEffectList () override
 
const Model::ShapeInterfaceGetGivingContactEffectShape () override
 Get the shape that gives an effect when touching while moving. More...
 
const Model::ShapeInterfaceGetObstacleShape () override
 Get the shape that stops other elements' movement. More...
 
const Model::ShapeInterfaceGetReceivingContactEffectShape () override
 Get the shape that gives an effect when touched by a moving element. More...
 

Private Types

using SUPER = ObjFacTools::FreeElementBase
 

Private Attributes

Cylinder mCollisionShape
 
Model::PhysicalCollision mContactEffect
 
Model::ContactEffectList mContactEffectList
 
Cylinder mContactShape
 
MR_SimulationTime mElapsedFrameTime
 
int mXSpeed
 
int mYSpeed
 

Additional Inherited Members

- Static Public Member Functions inherited from HoverRace::Util::ObjectFromFactory
template<class T >
static void SerializeShared (Parcel::ObjStream &archive, typename std::enable_if< std::is_base_of< ObjectFromFactory, T >::value, std::shared_ptr< T >>::type &obj)
 Serialize a shared pointer to a serializable object. More...
 
- Public Attributes inherited from HoverRace::Model::FreeElement
MR_Angle mOrientation
 
MR_3DCoordinate mPosition
 
- Protected Attributes inherited from HoverRace::ObjFacTools::FreeElementBase
const ResActormActor
 
int mCurrentFrame
 
int mCurrentSequence
 

Detailed Description

Used to test and build new FreeElements.

Member Typedef Documentation

Constructor & Destructor Documentation

HoverRace::ObjFac1::TestElement::TestElement ( ObjFacTools::ResourceLib resourceLib,
int  pActorRes 
)
HoverRace::ObjFac1::TestElement::~TestElement ( )
inline

Member Function Documentation

void HoverRace::ObjFac1::TestElement::ApplyEffect ( const Model::ContactEffect pEffect,
MR_SimulationTime  pTime,
MR_SimulationTime  pDuration,
BOOL  pValidDirection,
MR_Angle  pHorizontalDirection,
MR_Int32  pZMin,
MR_Int32  pZMax,
Model::Track track 
)
overrideprotectedvirtual

Reimplemented from HoverRace::Model::Element.

const Model::ContactEffectList * HoverRace::ObjFac1::TestElement::GetEffectList ( )
overrideprotectedvirtual

Reimplemented from HoverRace::Model::Element.

const Model::ShapeInterface * HoverRace::ObjFac1::TestElement::GetGivingContactEffectShape ( )
overrideprotectedvirtual

Get the shape that gives an effect when touching while moving.

Returns
The shape, or nullptr if none.

Reimplemented from HoverRace::Model::FreeElement.

const Model::ShapeInterface * HoverRace::ObjFac1::TestElement::GetObstacleShape ( )
overrideprotectedvirtual

Get the shape that stops other elements' movement.

Returns
The shape, or nullptr if none.

Reimplemented from HoverRace::Model::FreeElement.

const Model::ShapeInterface * HoverRace::ObjFac1::TestElement::GetReceivingContactEffectShape ( )
overrideprotectedvirtual

Get the shape that gives an effect when touched by a moving element.

Returns
The shape, or nullptr if none.

Reimplemented from HoverRace::Model::FreeElement.

int HoverRace::ObjFac1::TestElement::Simulate ( MR_SimulationTime  pTimeSlice,
Model::Track track,
int  pRoom 
)
overridevirtual

Advance the simulation.

Parameters
pTimeSliceThe time slice to simulate over.
trackThe track.
pRoomThe room number.
Returns
The new room number.

Reimplemented from HoverRace::Model::FreeElement.

Member Data Documentation

Cylinder HoverRace::ObjFac1::TestElement::mCollisionShape
private
Model::PhysicalCollision HoverRace::ObjFac1::TestElement::mContactEffect
private
Model::ContactEffectList HoverRace::ObjFac1::TestElement::mContactEffectList
private
Cylinder HoverRace::ObjFac1::TestElement::mContactShape
private
MR_SimulationTime HoverRace::ObjFac1::TestElement::mElapsedFrameTime
private
int HoverRace::ObjFac1::TestElement::mXSpeed
private
int HoverRace::ObjFac1::TestElement::mYSpeed
private

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