This class represents an animated collision model. More...
#include "CollisionModel_anim.hpp"
Public Member Functions | |
CollisionModelAnimT () | |
The constructor. More... | |
~CollisionModelAnimT () | |
The destructor. More... | |
BoundingBox3dT | GetBoundingBox () const override |
Returns the bounding box of this collision model. More... | |
unsigned long | GetContents () const override |
Returns the contents of this collision model. More... | |
void | SaveToFile (std::ostream &OutFile, SceneGraph::aux::PoolT &Pool) const override |
Saves the model to OutFile. More... | |
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.Fraction) through the collision model, and reports the first collision, if any. More... | |
unsigned long | GetContents (const Vector3dT &Point, double BoxRadius, unsigned long ContMask) const override |
Determines the volume contents of the model at the given point / in the given box. More... | |
btCollisionShape * | GetBulletAdapter () const override |
Returns an adapter class for using CollisionModelT instances also as Bullet btCollisionShape instances. More... | |
Public Member Functions inherited from cf::ClipSys::CollisionModelT | |
virtual | ~CollisionModelT () |
The (virtual) destructor. More... | |
This class represents an animated collision model.
Its main advantage is that it supports collision models that are animated, its main disadvantage is the limitations with which many types of queries can only be answered.
cf::ClipSys::CollisionModelAnimT::CollisionModelAnimT | ( | ) |
The constructor.
cf::ClipSys::CollisionModelAnimT::~CollisionModelAnimT | ( | ) |
The destructor.
|
overridevirtual |
Returns the bounding box of this collision model.
Implements cf::ClipSys::CollisionModelT.
|
overridevirtual |
Returns an adapter class for using CollisionModelT instances also as Bullet btCollisionShape instances.
Implements cf::ClipSys::CollisionModelT.
|
overridevirtual |
Returns the contents of this collision model.
Implements cf::ClipSys::CollisionModelT.
|
overridevirtual |
Determines the volume contents of the model at the given point / in the given box.
The function considers all brush volumes in the collision model that contain the given point or intersect the given box, and returns their combined ("or'ed") contents.
Point | The point in model space at which the volume contents of this model is to be determined. |
BoxRadius | When nonzero, this is the radius of an imaginary box around Point. |
ContMask | Only volumes whose contents matches this mask participate in the test. This is for optimization, because it allows the implementation to cull volumes that are not of interest early. |
Implements cf::ClipSys::CollisionModelT.
|
overridevirtual |
Saves the model to OutFile.
TODO: Review serialization/deser. of class hierarchies (e.g. compare to cf::SceneGraph)! Right now this is fixed and works for CollisionModelStaticTs only!!!
Implements cf::ClipSys::CollisionModelT.
|
overridevirtual |
Traces the given TraceSolidT instance from Start along Ray (up to the input value of Result.Fraction) through the collision model, and reports the first collision, if any.
TraceSolid | The TraceSolidT instance that is traced from Start along Ray. |
Start | The start point in model space where the trace begins. |
Ray | The ray along which the trace is performed. Note that with F being the input value of Result.Fraction, the endpoint is at Start+Ray*F. |
ClipMask | Only surfaces whose clip flags match this mask participate in the test. This is for optimization, because it allows the implementation to cull surfaces that are not of interest early. |
Result | The start value of Fraction is input via this reference, and the result of the trace returned. Using an input/output parameter for returning the result, rather than a true return type, suggests itself because it makes cascaded calls to this function natural (i.e. from (possibly many) super-objects and to (possibly many) sub-objects). |
Implements cf::ClipSys::CollisionModelT.