Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
VelocityComponent.hpp
1 // Copyright (C) 2017 Jérôme Leclercq
2 // This file is part of the "Nazara Development Kit"
3 // For conditions of distribution and use, see copyright notice in Prerequesites.hpp
4 
5 #pragma once
6 
7 #ifndef NDK_COMPONENTS_VELOCITYCOMPONENT_HPP
8 #define NDK_COMPONENTS_VELOCITYCOMPONENT_HPP
9 
10 #include <Nazara/Math/Vector3.hpp>
11 #include <NDK/Component.hpp>
12 
13 namespace Ndk
14 {
15  class VelocityComponent;
16 
17  using VelocityComponentHandle = Nz::ObjectHandle<VelocityComponent>;
18 
19  class NDK_API VelocityComponent : public Component<VelocityComponent>, public Nz::HandledObject<VelocityComponent>
20  {
21  public:
23  ~VelocityComponent() = default;
24 
25  Nz::Vector3f linearVelocity;
26 
27  VelocityComponent& operator=(const Nz::Vector3f& vel);
28 
29  static ComponentIndex componentIndex;
30  };
31 }
32 
33 #include <NDK/Components/VelocityComponent.inl>
34 
35 #endif // NDK_COMPONENTS_VELOCITYCOMPONENT_HPP
TODO: For now is unable to display different color in the history, it needs a RichTextDrawer to do so...
Definition: Algorithm.hpp:12
NDK class that represents the component for velocity.
Definition: VelocityComponent.hpp:19
static Vector3 Zero()
Shorthand for the vector (0, 0, 0)
Definition: Vector3.inl:1244