My Project: dynamics.mod/NewtonDynamics/source/physics/dgCollisionNull.h Source File

My Project

dgCollisionNull.h
Go to the documentation of this file.
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 #ifndef _dgCollisionNull_H__
23 #define _dgCollisionNull_H__
24
25
26 #include "dgCollisionConvex.h"
27
28 class dgCollisionNull: public dgCollisionConvex
29 {
30 public:
31 dgCollisionNull(dgMemoryAllocator* const allocator, dgUnsigned32 signature);
32 dgCollisionNull(dgWorld* const world, dgDeserialize deserialization, void* const userData);
33 virtual ~dgCollisionNull();
34
35
36 protected:
37 virtual dgFloat32 GetVolume () const;
38 virtual void CalcAABB (const dgMatrix& matrix, dgVector& p0, dgVector& p1) const;
39
40 virtual dgVector SupportVertex (const dgVector& dir, dgInt32* const vertexIndex) const;
41
42 virtual void DebugCollision (const dgMatrix& matrix, dgCollision::OnDebugCollisionMeshCallback callback, void* const userData) const;
43
44 virtual dgVector CalculateVolumeIntegral (const dgMatrix& globalMatrix, const dgVector& plane, const dgCollisionInstance& parentScale) const;
45 virtual dgFloat32 RayCast (const dgVector& localP0, const dgVector& localP1, dgFloat32 maxT, dgContactPoint& contactOut, const dgBody* const body, void* const userData, OnRayPrecastAction preFilter) const;
46
47 private:
48 virtual dgInt32 CalculateSignature () const;
49 virtual void SetCollisionBBox (const dgVector& p0, const dgVector& p1);
50
51 virtual void Serialize(dgSerialize callback, void* const userData) const;
52
53
54 friend class dgWorld;
55 };
56
57
58 #endif
59
dgCollisionNull::CalculateVolumeIntegral
virtual dgVector CalculateVolumeIntegral(const dgMatrix &globalMatrix, const dgVector &plane, const dgCollisionInstance &parentScale) const
Definition: dgCollisionNull.cpp:96
dgCollisionNull::GetVolume
virtual dgFloat32 GetVolume() const
Definition: dgCollisionNull.cpp:85
dgCollisionNull::RayCast
virtual dgFloat32 RayCast(const dgVector &localP0, const dgVector &localP1, dgFloat32 maxT, dgContactPoint &contactOut, const dgBody *const body, void *const userData, OnRayPrecastAction preFilter) const
Definition: dgCollisionNull.cpp:90
dgCollisionNull
Definition: dgCollisionNull.h:28
dgCollision::OnDebugCollisionMeshCallback
void(dgApi * OnDebugCollisionMeshCallback)(void *userData, int vertexCount, const dgFloat32 *FaceArray, int faceId)
Definition: dgCollision.h:220
dgBody
Definition: dgBody.h:44
dgCollisionNull::dgCollisionNull
dgCollisionNull(dgMemoryAllocator *const allocator, dgUnsigned32 signature)
Definition: dgCollisionNull.cpp:34
userData
void *const userData
Definition: dgBroadPhase.h:35
dgFloat32
float dgFloat32
Definition: dgTypes.h:233
dgInt32
int dgInt32
Definition: dgTypes.h:218
dgVector
Definition: dgVector.h:639
dgContactPoint
Definition: dgContact.h:78
dgSerialize
void(dgApi * dgSerialize)(void *const userData, const void *const buffer, size_t size)
Definition: dgTypes.h:280
dgCollisionNull::~dgCollisionNull
virtual ~dgCollisionNull()
Definition: dgCollisionNull.cpp:52
dgDeserialize
void(dgApi * dgDeserialize)(void *const userData, void *buffer, size_t size)
Definition: dgTypes.h:279
OnRayPrecastAction
dgUnsigned32(dgApi * OnRayPrecastAction)(const dgBody *const body, const dgCollisionInstance *const collision, void *const userData)
Definition: dgBroadPhase.h:36
dgCollisionInstance
Definition: dgCollisionInstance.h:30
dgUnsigned32
unsigned dgUnsigned32
Definition: dgTypes.h:219
dgCollisionConvex
Definition: dgCollisionConvex.h:42
dgCollisionNull::DebugCollision
virtual void DebugCollision(const dgMatrix &matrix, dgCollision::OnDebugCollisionMeshCallback callback, void *const userData) const
Definition: dgCollisionNull.cpp:62
dgMatrix
Definition: dgMatrix.h:40
dgMemoryAllocator
Definition: dgMemory.h:73
dgCollisionNull::SupportVertex
virtual dgVector SupportVertex(const dgVector &dir, dgInt32 *const vertexIndex) const
Definition: dgCollisionNull.cpp:79
dgWorld
Definition: dgWorld.h:129
dgCollisionConvex.h
dgCollisionNull::CalcAABB
virtual void CalcAABB(const dgMatrix &matrix, dgVector &p0, dgVector &p1) const
Definition: dgCollisionNull.cpp:72