AnnTriggerObject.hpp
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include "systemMacro.h"
10 #include <AnnTypes.h>
11 #include "AnnAbstractMovable.hpp"
12 #include <BulletCollision/CollisionShapes/btCollisionShape.h>
13 #include <BulletDynamics/Dynamics/btRigidBody.h>
14 
15 namespace Annwvyn
16 {
17  //Anticipated declaration of AnnEngine class
18  class AnnEngine;
19  class AnnPhysicsGameEngine;
20 
23  {
24  public:
27 
29  static btCollisionShape* box(const float& w, const float& h, const float& l);
30 
32  static btCollisionShape* sphere(const float& r);
33  };
34 
37  {
38  public:
40  AnnTriggerObject(const std::string& name);
41 
42  std::string getName() const;
43 
45  virtual ~AnnTriggerObject();
46 
49  void setPosition(AnnVect3 pos) override;
50 
52  void setOrientation(AnnQuaternion orient) override;
53 
55  AnnVect3 getPosition() override;
56 
58  AnnQuaternion getOrientation() override;
59 
61  bool getContactInformation() const;
62 
64  void setShape(btCollisionShape* shp);
65 
66  private:
68 
71  void setContactInformation(bool contact);
72 
73  friend class AnnEngine;
74  friend class AnnGameObjectManager;
75  friend class AnnPhysicsEngine;
76 
79 
82 
85 
88  };
89 }
file for defining macros used for symbol export regarding the way the OS does things.
bool lastFrameContactWithPlayer
State of the last frame.
bool contactWithPlayer
True if trigger triggers.
Main engine class. Creating an instance of this class make the engine start.
Definition: AnnEngine.hpp:70
Class that abstract the physics engine initialization and collision information queries for Annwvyn...
A 3D Vector.
Definition: AnnVect3.hpp:16
Object for representing a volume that trigger an event.
Namespace containing the totality of Annwvyn components.
Definition: AnnGetter.cpp:8
Shape generator. Just a bunch of static methods. You will need to de-alliocate them by hand...
Represent a Quaternion.
Abstract Class that represent an bobject that you can set the orientation.
Game object manager. Create, destroy and keep track of objects, lights and other movable stuff...
Data types definition for Annwvyn.
#define AnnDllExport
Definition: systemMacro.h:24
std::unique_ptr< btCollisionShape > shape
Pointer to the shape.
std::unique_ptr< btRigidBody > body
Pointer to the body.