HoverRace  2.0
BumperGate.h
Go to the documentation of this file.
1 
2 // BumperGate.h
3 //
4 // Copyright (c) 1995-1998 - Richard Langlois and Grokksoft Inc.
5 //
6 // Licensed under GrokkSoft HoverRace SourceCode License v1.0(the "License");
7 // you may not use this file except in compliance with the License.
8 //
9 // A copy of the license should have been attached to the package from which
10 // you have taken this file. If you can not find the license you can not use
11 // this file.
12 //
13 //
14 // The author makes no representations about the suitability of
15 // this software for any purpose. It is provided "as is" "AS IS",
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17 // implied.
18 //
19 // See the License for the specific language governing permissions
20 // and limitations under the License.
21 //
22 
23 #pragma once
24 
25 #include "../ObjFacTools/FreeElementBase.h"
26 #include "../Model/RaceEffects.h"
27 #include "../Model/PhysicalCollision.h"
28 
29 namespace HoverRace {
30 namespace ObjFac1 {
31 
32 class BumperGate :
34  protected Model::CylinderShape
35 {
37 
38 public:
41 
42 protected:
43  // Shape interface
44  MR_Int32 ZMin() const override;
45  MR_Int32 ZMax() const override;
46  MR_Int32 AxisX() const override;
47  MR_Int32 AxisY() const override;
48  MR_Int32 RayLen() const override;
49 
50 protected:
51  // ContactEffectShapeInterface
52  const Model::ContactEffectList *GetEffectList() override;
55 
56  int Simulate(MR_SimulationTime pTimeSlice, Model::Track &track,
57  int pRoom) override;
58 
59  void ApplyEffect(const Model::ContactEffect *pEffect,
60  MR_SimulationTime pTime, MR_SimulationTime pDuration,
61  BOOL pValidDirection, MR_Angle pHorizontalDirection,
62  MR_Int32 pZMin, MR_Int32 pZMax, Model::Track &track) override;
63 
64 private:
69 
70 };
71 
72 } // namespace ObjFac1
73 } // namespace HoverRace
std::vector< ContactEffect * > ContactEffectList
Definition: ContactEffect.h:56
Model::ContactEffectList mEffectList
Definition: BumperGate.h:68
Definition: BumperGate.h:32
MR_Int32 RayLen() const override
Definition: BumperGate.cpp:82
MR_Int32 AxisX() const override
Definition: BumperGate.cpp:72
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
Definition: BumperGate.cpp:131
Definition: FreeElementBase.h:48
int mLastState
Definition: BumperGate.h:66
BumperGate(ObjFacTools::ResourceLib &resourceLib)
Definition: BumperGate.cpp:48
Definition: Shapes.h:50
MR_SimulationTime mTimeSinceLastCollision
Definition: BumperGate.h:65
MR_Int16 MR_Angle
Definition: WorldCoordinates.h:96
MR_Int32 MR_SimulationTime
Definition: WorldCoordinates.h:106
Base class for all contact effects.
Definition: ContactEffect.h:44
A track level.
Definition: Track.h:57
Definition: Shapes.h:75
MR_Int32 ZMin() const override
Definition: BumperGate.cpp:62
int32_t MR_Int32
Definition: MR_Types.h:43
~BumperGate()
Definition: BumperGate.h:40
const Model::ContactEffectList * GetEffectList() override
Definition: BumperGate.cpp:87
Base class for object created with a Dll Factory.
Definition: DllObjectFactory.h:86
Definition: PhysicalCollision.h:58
const Model::ShapeInterface * GetReceivingContactEffectShape() override
Get the shape that gives an effect when touched by a moving element.
Definition: BumperGate.cpp:97
Definition: Announcement.h:24
const Model::ShapeInterface * GetGivingContactEffectShape() override
Get the shape that gives an effect when touching while moving.
Definition: BumperGate.cpp:102
int Simulate(MR_SimulationTime pTimeSlice, Model::Track &track, int pRoom) override
Advance the simulation.
Definition: BumperGate.cpp:108
Model::PhysicalCollision mCollisionEffect
Definition: BumperGate.h:67
Legacy resource manager for ObjFac1.dat resources.
Definition: ResourceLib.h:55
MR_Int32 AxisY() const override
Definition: BumperGate.cpp:77
MR_Int32 ZMax() const override
Definition: BumperGate.cpp:67