 |
Newton Dynamics
4.00
|
|
22 #ifndef __ND_SHAPE_H__
23 #define __ND_SHAPE_H__
25 #include "ndCollisionStdafx.h"
66 m_staticProceduralMesh,
70 m_boundingBoxHierachy,
91 ndUnsigned64 m_alignPad;
96 ndUnsigned64 m_intData;
97 ndFloat32 m_floatData;
146 ndInt32 m_vertexCount;
147 ndInt32 m_strideInBytes;
164 ndInt32 m_vertexCount;
165 ndInt32 m_indexCount;
172 ndInt32 m_gridsDiagonals;
173 ndFloat32 m_verticalScale;
174 ndFloat32 m_horizonalScale_x;
175 ndFloat32 m_horizonalScale_z;
180 D_MSV_NEWTON_ALIGN_32
187 ndShapeID m_collisionType;
203 ndFloat32 m_paramArray[32];
205 } D_GCC_NEWTON_ALIGN_32;
207 D_MSV_NEWTON_ALIGN_32
212 D_COLLISION_API
virtual ~
ndShape();
214 D_COLLISION_API ndInt32 GetRefCount()
const;
215 D_COLLISION_API
virtual ndInt32 Release()
const;
216 D_COLLISION_API
virtual const ndShape* AddRef()
const;
218 virtual ndShapeBox* GetAsShapeBox() {
return nullptr; }
219 virtual ndShapeNull* GetAsShapeNull() {
return nullptr; }
220 virtual ndShapeCone* GetAsShapeCone() {
return nullptr; }
221 virtual ndShapePoint* GetAsShapePoint() {
return nullptr; }
222 virtual ndShapeConvex* GetAsShapeConvex() {
return nullptr; }
223 virtual ndShapeSphere* GetAsShapeSphere() {
return nullptr; }
234 virtual ndInt32 GetConvexVertexCount()
const;
238 ndFloat32 GetUmbraClipSize()
const;
240 D_COLLISION_API
virtual void MassProperties();
245 virtual ndFloat32 GetVolume()
const = 0;
246 virtual ndFloat32 GetBoxMinRadius()
const = 0;
247 virtual ndFloat32 GetBoxMaxRadius()
const = 0;
250 virtual ndVector SupportVertex(
const ndVector& dir, ndInt32*
const vertexIndex)
const = 0;
252 virtual ndVector SupportVertexSpecial(
const ndVector& dir, ndFloat32 skinMargin, ndInt32*
const vertexIndex)
const = 0;
253 virtual ndInt32 CalculatePlaneIntersection(
const ndVector& normal,
const ndVector& point,
ndVector*
const contactsOut)
const = 0;
263 D_COLLISION_API
ndShape(ndShapeID
id);
272 ndShapeID m_collisionId;
275 } D_GCC_NEWTON_ALIGN_32;
277 inline ndInt32 ndShape::GetConvexVertexCount()
const
291 return ndGetZeroMatrix();
294 inline ndVector ndShape::GetObbOrigin()
const
299 inline ndVector ndShape::GetObbSize()
const
304 inline ndFloat32 ndShape::GetUmbraClipSize()
const
306 return ndFloat32(3.0f) * GetBoxMaxRadius();
Definition: ndShape.h:102
Definition: ndShape.h:133
Definition: ndShape.h:119
Definition: ndShape.h:153
Definition: ndShape.h:145
Definition: ndShapeStaticMesh.h:32
Definition: ndShapeNull.h:29
Definition: ndShape.h:169
Definition: ndShapeChamferCylinder.h:32
Definition: ndShape.h:209
Definition: ndShapeStaticProceduralMesh.h:29
Definition: ndShapeHeightfield.h:29
Definition: ndShapeConvexPolygon.h:32
Definition: ndRayCastNotify.h:31
Definition: ndShapeConvex.h:34
Definition: ndShape.h:126
Definition: ndShapeCone.h:31
Definition: ndShape.h:114
Definition: ndShapePoint.h:30
Definition: ndShapeCapsule.h:29
Definition: ndMatrix.h:42
Definition: ndShape.h:163
Definition: ndShape.h:109
Definition: ndShapeInstance.h:38
Definition: ndShapeBox.h:29
Definition: ndShape.h:182
Definition: ndContainersAlloc.h:60
Definition: ndShape.h:158
Definition: ndShapeCompound.h:33
Definition: ndShapeStatic_bvh.h:29
Definition: ndShapeSphere.h:31
Definition: ndShapeInstance.h:62
Definition: ndShape.h:139
Definition: ndSaveLoadSytem.h:93
Definition: ndVectorArmNeon.h:41
Definition: ndShapeCylinder.h:31