Cafu Engine
CollisionModel_anim.hpp
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
6 
7 #ifndef CAFU_CLIPSYS_COLLISION_MODEL_ANIM_HPP_INCLUDED
8 #define CAFU_CLIPSYS_COLLISION_MODEL_ANIM_HPP_INCLUDED
9 
10 #include "CollisionModel_base.hpp"
11 
12 
13 namespace cf
14 {
15  namespace ClipSys
16  {
17  /// This class represents an animated collision model.
18  /// Its main advantage is that it supports collision models that are animated,
19  /// its main disadvantage is the limitations with which many types of queries can only be answered.
21  {
22  public:
23 
24  /// The constructor.
26 
27  /// The destructor.
29 
30 
31  // The CollisionModelT interface.
32  BoundingBox3dT GetBoundingBox() const override;
33  unsigned long GetContents() const override;
34  void SaveToFile(std::ostream& OutFile, SceneGraph::aux::PoolT& Pool) const override;
35  void TraceConvexSolid(const TraceSolidT& TraceSolid, const Vector3dT& Start, const Vector3dT& Ray, unsigned long ClipMask, TraceResultT& Result) const override;
36  unsigned long GetContents(const Vector3dT& Point, double BoxRadius, unsigned long ContMask) const override;
37  btCollisionShape* GetBulletAdapter() const override;
38 
39 
40  private:
41  };
42  }
43 }
44 
45 #endif
~CollisionModelAnimT()
The destructor.
BoundingBox3dT GetBoundingBox() const override
Returns the bounding box of this collision model.
Definition: _aux.hpp:111
This class represents a solid object that can be traced through collision worlds, models and shapes...
Definition: TraceSolid.hpp:30
btCollisionShape * GetBulletAdapter() const override
Returns an adapter class for using CollisionModelT instances also as Bullet btCollisionShape instance...
unsigned long GetContents() const override
Returns the contents of this collision model.
void SaveToFile(std::ostream &OutFile, SceneGraph::aux::PoolT &Pool) const override
Saves the model to OutFile.
CollisionModelAnimT()
The constructor.
This class describes the result of tracing an object (a ray, a bounding-box, or a convex solid) throu...
Definition: TraceResult.hpp:36
This is the base class for collision models, defining their common interface.
Definition: CollisionModel_base.hpp:29
void TraceConvexSolid(const TraceSolidT &TraceSolid, const Vector3dT &Start, const Vector3dT &Ray, unsigned long ClipMask, TraceResultT &Result) const override
Traces the given TraceSolidT instance from Start along Ray (up to the input value of Result...
This class represents an animated collision model.
Definition: CollisionModel_anim.hpp:20