Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
collisionfilter.h
1 #pragma once
2 
3 #include <cinttypes>
4 
5 
6 class WorldObject;
7 enum class WorldObjectType;
8 
10 public:
11  CollisionFilter(WorldObject* owner, uint32_t collisionMask = 0xFFFFFFFF);
12 
13  uint32_t collisionMask() const;
14 
15  void setCollideableWith(WorldObjectType objectType, bool collides);
16  bool isCollideableWith(const CollisionFilter* other) const;
17 
18  virtual WorldObject* owner() const;
19  virtual WorldObject* creator() const;
20 
21 
22 protected:
23  uint32_t m_collisionMask;
24  WorldObject* m_owner;
25 
26  bool areMasksCollidable(const CollisionFilter* other) const;
27  virtual bool specialIsCollideableWith(const CollisionFilter* other) const;
28 };
29 
Definition: collisionfilter.h:9
Definition: worldobject.h:43