ScummVM API documentation
dgCollisionNull.h
1 /* Copyright (c) <2003-2011> <Julio Jerez, Newton Game Dynamics>
2 *
3 * This software is provided 'as-is', without any express or implied
4 * warranty. In no event will the authors be held liable for any damages
5 * arising from the use of this software.
6 *
7 * Permission is granted to anyone to use this software for any purpose,
8 * including commercial applications, and to alter it and redistribute it
9 * freely, subject to the following restrictions:
10 *
11 * 1. The origin of this software must not be misrepresented; you must not
12 * claim that you wrote the original software. If you use this software
13 * in a product, an acknowledgment in the product documentation would be
14 * appreciated but is not required.
15 *
16 * 2. Altered source versions must be plainly marked as such, and must not be
17 * misrepresented as being the original software.
18 *
19 * 3. This notice may not be removed or altered from any source distribution.
20 */
21 
22 #if !defined(AFX_dgCollisionNull_H__4969D514_69A9_4D96_82B2_E5B0EA3D413F__INCLUDED_)
23 #define AFX_dgCollisionNull_H__4969D514_69A9_4D96_82B2_E5B0EA3D413F__INCLUDED_
24 
25 
26 #include "dgCollisionConvex.h"
27 
29 public:
30  dgCollisionNull(dgMemoryAllocator *const allocator, dgUnsigned32 signature);
31  dgCollisionNull(dgWorld *const world, dgDeserialize deserialization, void *const userData);
32  virtual ~dgCollisionNull();
33 
34 
35 protected:
36  virtual dgFloat32 GetVolume() const;
37  virtual void CalculateInertia(dgVector &inertia, dgVector &origin) const;
38  virtual void CalcAABB(const dgMatrix &matrix, dgVector &p0, dgVector &p1) const;
39  virtual void CalcAABBSimd(const dgMatrix &matrix, dgVector &p0, dgVector &p1) const;
40 
41  virtual dgVector SupportVertex(const dgVector &dir) const;
42  virtual dgVector SupportVertexSimd(const dgVector &dir) const;
43 
44 
45  virtual void DebugCollision(const dgMatrix &matrix, OnDebugCollisionMeshCallback callback, void *const userData) const;
46 
47  virtual dgVector CalculateVolumeIntegral(const dgMatrix &globalMatrix, GetBuoyancyPlane bouyancyPlane, void *const context) const;
48 // virtual bool RayHit (const dgVector& localP0, const dgVector& localP1, dgFloat32 thickness, dgContactPoint& contactOut) const;
49 
50  virtual dgFloat32 RayCast(const dgVector &localP0, const dgVector &localP1, dgContactPoint &contactOut, OnRayPrecastAction preFilter, const dgBody *const body, void *const userData) const;
51  virtual dgFloat32 RayCastSimd(const dgVector &localP0, const dgVector &localP1, dgContactPoint &contactOut, OnRayPrecastAction preFilter, const dgBody *const body, void *const userData) const;
52 
53 // virtual dgInt32 ClosestPoints (const dgBody& myBody, const dgVector& boxMin, const dgVector& boxMax,
54 // dgInt32 count, const dgVector& globalPoint,
55 // dgVector globalPointOut[], dgInt32 attribOut[]) const;
56 
57 private:
58  virtual dgInt32 CalculateSignature() const;
59  virtual void SetCollisionBBox(const dgVector &p0, const dgVector &p1);
60 
61  virtual void Serialize(dgSerialize callback, void *const userData) const;
62 
63 
64  friend class dgWorld;
65 };
66 
67 
68 #endif // !defined(AFX_dgCollisionNull_H__4969D514_69A9_4D96_82B2_E5B0EA3D413F__INCLUDED_)
69 
Definition: dgCollisionNull.h:28
Definition: dgBody.h:85
Definition: dgVector.h:86
Definition: dgContact.h:88
Definition: dgCollisionConvex.h:39
Definition: dgMatrix.h:41
Definition: dgMemory.h:80
Definition: dgWorld.h:118