29#ifndef GU_CONVEX_MESH_DATA_H
30#define GU_CONVEX_MESH_DATA_H
32#include "foundation/PxPlane.h"
33#include "foundation/PxBitAndData.h"
35#include "foundation/PxIntrinsics.h"
36#include "GuCenterExtents.h"
37#include "CmSerialize.h"
46 struct BigConvexRawData;
76 flip(data.mPlane.n.x);
77 flip(data.mPlane.n.y);
78 flip(data.mPlane.n.z);
154 const char* tmp =
reinterpret_cast<const char*
>(
mPolygons);
156 return reinterpret_cast<const PxVec3*
>(tmp);
161 const char* tmp =
reinterpret_cast<const char*
>(
mPolygons);
164 return reinterpret_cast<const PxU8*
>(tmp);
169 const char* tmp =
reinterpret_cast<const char*
>(
mPolygons);
173 return reinterpret_cast<const PxU8*
>(tmp);
181 const char* tmp =
reinterpret_cast<const char*
>(
mPolygons);
186 return reinterpret_cast<const PxU16*
>(tmp);
193 const char* tmp =
reinterpret_cast<const char*
>(
mPolygons);
199 tmp +=
sizeof(PxU16) *
mNbEdges * 2;
200 return reinterpret_cast<const PxU8*
>(tmp);
A padded version of CenterExtents, to safely load its data using SIMD.
Definition GuCenterExtents.h:114
Definition GuCenterExtents.h:44
Represents a signed distance field.
Definition GuSDF.h:88
Representation of a plane.
Definition PxPlane.h:49
PxVec3 n
The normal to the plane.
Definition PxPlane.h:152
float d
The distance from the origin.
Definition PxPlane.h:153
3 Element vector class.
Definition PxVec3.h:50
PX_CUDA_CALLABLE PX_FORCE_INLINE float dot(const PxVec3 &v) const
returns the scalar product of this and other.
Definition PxVec3.h:276
#define PX_RESTRICT
Definition PxPreprocessor.h:355
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
#define PX_COMPILE_TIME_ASSERT(exp)
Definition PxPreprocessor.h:428
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PxEMPTY
Definition Px.h:87
Definition GuBigConvexData.h:61
Definition GuConvexMeshData.h:109
HullPolygonData * mPolygons
Array of mNbPolygons structures.
Definition GuConvexMeshData.h:128
PX_FORCE_INLINE const PxU8 * getFacesByVertices8() const
< for each edge, gives 2 adjacent polygons; used by convex-convex code to come up with all the convex...
Definition GuConvexMeshData.h:167
BigConvexRawData * mBigConvexRawData
Hill climbing data, only for large convexes! else NULL.
Definition GuConvexMeshData.h:129
CenterExtents mAABB
bounds TODO: compute this on the fly from first 6 vertices in the vertex array. We'll of course need ...
Definition GuConvexMeshData.h:118
PX_FORCE_INLINE const PxU8 * getVertexData8() const
< Vertex indices indexed by hull polygons
Definition GuConvexMeshData.h:191
PX_FORCE_INLINE const PxU16 * getVerticesByEdges16() const
< Vertex indices indexed by unique edges
Definition GuConvexMeshData.h:177
PxBitAndWord mNbEdges
the highest bit indicate whether we have grb data, the other 15 bits indicate the number of edges in ...
Definition GuConvexMeshData.h:123
PX_FORCE_INLINE const PxVec3 * getHullVertices() const
< Convex hull vertices
Definition GuConvexMeshData.h:152
PxU8 mNbPolygons
Number of planar polygons composing the hull.
Definition GuConvexMeshData.h:126
PX_FORCE_INLINE const PxU8 * getFacesByEdges8() const
< for each edge, gives 2 adjacent polygons; used by convex-convex code to come up with all the convex...
Definition GuConvexMeshData.h:159
PxU8 mNbHullVertices
Number of vertices in the convex hull.
Definition GuConvexMeshData.h:125
Definition GuConvexMeshData.h:49
PxPlane mPlane
Plane equation for this polygon //Could drop 4th elem as it can be computed from any vertex as: d = -...
Definition GuConvexMeshData.h:61
PxU8 mMinIndex
Index of the polygon vertex that has minimal projection along this plane's normal.
Definition GuConvexMeshData.h:64
PxU8 mNbVerts
Number of vertices/edges in the polygon.
Definition GuConvexMeshData.h:63
PxU16 mVRef8
Offset of vertex references in hull vertex data (CS: can we assume indices are tightly packed and off...
Definition GuConvexMeshData.h:62
Definition GuConvexMeshData.h:87