Emergency 20 Dokumentation  4.2.0
DoorComponent-inl.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Includes ]
6 //[-------------------------------------------------------]
8 
9 
10 //[-------------------------------------------------------]
11 //[ Namespace ]
12 //[-------------------------------------------------------]
13 namespace em5
14 {
15 
16 
17  //[-------------------------------------------------------]
18  //[ Public methods ]
19  //[-------------------------------------------------------]
21  qsf::Component(prototype),
22  mLocalRotationAxis(qsf::CoordinateSystem::getUp()),
23  mMaximumRotationAngle(75.0f),
24  mDoorType(DOORTYPE_UNDEFINED),
25  mOpeningAnimationLength(qsf::Time::fromSeconds(1.0f)),
26  mClosingAnimationLength(qsf::Time::fromSeconds(1.0f)),
27  mState(DOOR_CLOSED),
28  mAnimationPosition(0.0f),
29  mIsPlayingAudioStarted(false)
30  {
31  // Nothing to do in here
32  }
33 
35  {
36  // Nothing to do in here
37  }
38 
40  {
41  return mState;
42  }
43 
45  {
46  return mOpeningAnimation;
47  }
48 
50  {
51  mOpeningAnimation = animation;
52  }
53 
55  {
56  return mClosingAnimation;
57  }
58 
60  {
61  mClosingAnimation = animation;
62  }
63 
65  {
66  return mCuttingAnimation;
67  }
68 
70  {
71  mCuttingAnimation = animation;
72  }
73 
74  inline const glm::vec3& DoorComponent::getDoorOffset() const
75  {
76  return mDoorOffset;
77  }
78 
79  inline const glm::quat& DoorComponent::getDoorRotation() const
80  {
81  return mDoorRotation;
82  }
83 
84 
85 //[-------------------------------------------------------]
86 //[ Namespace ]
87 //[-------------------------------------------------------]
88 } // em5
Definition: ActionPriority.h:13
DoorState getDoorState() const
Return current door state.
Definition: DoorComponent-inl.h:39
DoorState
Definition: DoorComponent.h:54
virtual ~DoorComponent()
Destructor.
Definition: DoorComponent-inl.h:34
void setCuttingAnimation(const qsf::AssetProxy &animation)
Definition: DoorComponent-inl.h:69
const glm::vec3 & getDoorOffset() const
Definition: DoorComponent-inl.h:74
const glm::quat & getDoorRotation() const
Definition: DoorComponent-inl.h:79
void setClosingAnimation(const qsf::AssetProxy &animation)
Definition: DoorComponent-inl.h:59
Definition: PickupPersonByParamedicAction.h:21
Asset proxy class.
Definition: AssetProxy.h:57
const qsf::AssetProxy & getCuttingAnimation() const
Definition: DoorComponent-inl.h:64
void setOpeningAnimation(const qsf::AssetProxy &animation)
Definition: DoorComponent-inl.h:49
const qsf::AssetProxy & getClosingAnimation() const
Definition: DoorComponent-inl.h:54
const qsf::AssetProxy & getOpeningAnimation() const
Definition: DoorComponent-inl.h:44
DoorComponent(qsf::Prototype *prototype)
Constructor.
Definition: DoorComponent-inl.h:20
Prototype class.
Definition: Prototype.h:100