Newton Dynamics
4.00
ndConvexCastNotify.h
1
/* Copyright (c) <2003-2022> <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 __ND_CONVEXCAST_NOTIFY_H__
23
#define __ND_CONVEXCAST_NOTIFY_H__
24
25
#include "ndCollisionStdafx.h"
26
#include "ndContact.h"
27
28
class
ndBody
;
29
class
ndScene
;
30
class
ndShapeInstance
;
31
32
D_MSV_NEWTON_ALIGN_32
33
class
ndConvexCastNotify
:
public
ndClassAlloc
34
{
35
public
:
36
ndConvexCastNotify
()
37
:m_normal(ndVector::m_zero)
38
,m_closestPoint0(ndVector::m_zero)
39
,m_closestPoint1(ndVector::m_zero)
40
,m_contacts()
41
,m_param(ndFloat32 (1.2f))
42
{
43
}
44
45
virtual
~
ndConvexCastNotify
()
46
{
47
}
48
49
virtual
ndUnsigned32 OnRayPrecastAction(
const
ndBody
*
const
,
const
ndShapeInstance
*
const
)
50
{
51
ndAssert(0);
52
return
1;
53
}
54
55
//virtual ndFloat32 OnRayCastAction(const ndContactPoint& contact, ndFloat32 intersetParam)
56
virtual
ndFloat32 OnRayCastAction(
const
ndContactPoint
&, ndFloat32)
57
{
58
ndAssert(0);
59
return
0;
60
}
61
62
D_COLLISION_API
bool
CastShape(
const
ndShapeInstance
& castingInstance,
const
ndMatrix
& globalOrigin,
const
ndVector
& globalDest,
ndBodyKinematic
*
const
targetBody);
63
D_COLLISION_API
bool
CastShape(
const
ndShapeInstance
& castingInstance,
const
ndMatrix
& globalOrigin,
const
ndVector
& globalDest,
const
ndShapeInstance
& targetShape,
const
ndMatrix
& targetMatrix);
64
65
ndVector
m_normal;
66
ndVector
m_closestPoint0;
67
ndVector
m_closestPoint1;
68
ndFixSizeArray<ndContactPoint, 8>
m_contacts;
69
ndFloat32 m_param;
70
} D_GCC_NEWTON_ALIGN_32;
71
72
#endif
ndClassAlloc
Base class for providing memory allocation for all other engine classes.
Definition:
ndClassAlloc.h:30
ndScene
Definition:
ndScene.h:59
ndBody
Definition:
ndBody.h:43
ndFixSizeArray< ndContactPoint, 8 >
ndContactPoint
Definition:
ndContact.h:39
ndBodyKinematic
Definition:
ndBodyKinematic.h:40
ndMatrix
Definition:
ndMatrix.h:42
ndConvexCastNotify
Definition:
ndConvexCastNotify.h:34
ndShapeInstance
Definition:
ndShapeInstance.h:62
ndVector
Definition:
ndVectorArmNeon.h:41
newton-dynamics
newton-4.00
sdk
dCollision
ndConvexCastNotify.h
Generated by
1.8.20