RavEngine
Loading...
Searching...
No Matches
PxCooking.h
1// Redistribution and use in source and binary forms, with or without
2// modification, are permitted provided that the following conditions
3// are met:
4// * Redistributions of source code must retain the above copyright
5// notice, this list of conditions and the following disclaimer.
6// * Redistributions in binary form must reproduce the above copyright
7// notice, this list of conditions and the following disclaimer in the
8// documentation and/or other materials provided with the distribution.
9// * Neither the name of NVIDIA CORPORATION nor the names of its
10// contributors may be used to endorse or promote products derived
11// from this software without specific prior written permission.
12//
13// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
14// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
17// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24//
25// Copyright (c) 2008-2022 NVIDIA Corporation. All rights reserved.
26// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
27// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
28
29#ifndef PX_COOKING_H
30#define PX_COOKING_H
34#include "common/PxPhysXCommonConfig.h"
35#include "common/PxTolerancesScale.h"
36#include "cooking/Pxc.h"
37
38#include "cooking/PxConvexMeshDesc.h"
39#include "cooking/PxTriangleMeshDesc.h"
40#include "cooking/PxTetrahedronMeshDesc.h"
41#include "cooking/PxMidphaseDesc.h"
42#include "cooking/PxBVHDesc.h"
43#include "geometry/PxTriangleMesh.h"
44#include "geometry/PxTetrahedronMesh.h"
45#include "geometry/PxBVH.h"
46
47#if !PX_DOXYGEN
48namespace physx
49{
50#endif
51
52class PxInsertionCallback;
53class PxFoundation;
54class PxAllocatorCallback;
55class PxHeightFieldDesc;
56
91
94{
95 enum Enum
96 {
103 };
104};
105
110{
111 enum Enum
112 {
117
122
127 };
128};
129
134{
135 enum Enum
136 {
140 eWELD_VERTICES = 1 << 0,
141
151
156
163
168
172 eENABLE_INERTIA = 1 << 5
173
174 };
175};
176
177typedef PxFlags<PxMeshPreprocessingFlag::Enum,PxU32> PxMeshPreprocessingFlags;
178
330
337{
338public:
347 virtual void release() = 0;
348
356 virtual void setParams(const PxCookingParams& params) = 0;
357
365 virtual const PxCookingParams& getParams() const = 0;
366
372 virtual bool platformMismatch() const = 0;
373
390 virtual bool cookTriangleMesh(const PxTriangleMeshDesc& desc, PxOutputStream& stream, PxTriangleMeshCookingResult::Enum* condition = NULL) const = 0;
391
409 virtual PxTriangleMesh* createTriangleMesh(const PxTriangleMeshDesc& desc, PxInsertionCallback& insertionCallback, PxTriangleMeshCookingResult::Enum* condition = NULL) const = 0;
410
424 {
425 return createTriangleMesh(desc, const_cast<PxCooking&>(*this).getStandaloneInsertionCallback());
426 }
427
441 virtual bool validateTriangleMesh(const PxTriangleMeshDesc& desc) const = 0;
442
463 virtual bool cookSoftBodyMesh(const PxTetrahedronMeshDesc& simulationMeshDesc, const PxTetrahedronMeshDesc& collisionMeshDesc,
464 const PxSoftBodySimulationDataDesc& softbodyDataDesc, PxOutputStream& stream) const = 0;
465
484 virtual PxSoftBodyMesh* createSoftBodyMesh(const PxTetrahedronMeshDesc& simulationMeshDesc, const PxTetrahedronMeshDesc& collisionMeshDesc,
485 const PxSoftBodySimulationDataDesc& softbodyDataDesc, PxInsertionCallback& insertionCallback) const = 0;
486
487
503 const PxSoftBodySimulationDataDesc& softbodyDataDesc) const
504 {
505 return createSoftBodyMesh(simulationMeshDesc, collisionMeshDesc, softbodyDataDesc, const_cast<PxCooking&>(*this).getStandaloneInsertionCallback());
506 }
507
525 virtual bool cookTetrahedronMesh(const PxTetrahedronMeshDesc& meshDesc, PxOutputStream& stream) const = 0;
526
543 virtual PxTetrahedronMesh* createTetrahedronMesh(const PxTetrahedronMeshDesc& meshDesc, PxInsertionCallback& insertionCallback) const = 0;
544
545
559 {
560 return createTetrahedronMesh(meshDesc, const_cast<PxCooking&>(*this).getStandaloneInsertionCallback());
561 }
562
581 const PxSoftBodyCollisionData& collisionData, const PxBoundedData* vertexToTet = NULL) const = 0;
582
593
604
621 PxSoftBodyCollisionData& collisionData, PxCollisionMeshMappingData& mappingData, PxInsertionCallback& insertionCallback) const = 0;
622
637 PxCollisionMeshMappingData& mappingData, PxInsertionCallback& insertionCallback) const = 0;
638
639
659 virtual bool cookConvexMesh(const PxConvexMeshDesc& desc, PxOutputStream& stream, PxConvexMeshCookingResult::Enum* condition = NULL) const = 0;
660
678 virtual PxConvexMesh* createConvexMesh(const PxConvexMeshDesc& desc, PxInsertionCallback& insertionCallback, PxConvexMeshCookingResult::Enum* condition = NULL) const = 0;
679
680
694 {
695 return createConvexMesh(desc, const_cast<PxCooking&>(*this).getStandaloneInsertionCallback());
696 }
697
711 virtual bool validateConvexMesh(const PxConvexMeshDesc& desc) const = 0;
712
734 virtual bool computeHullPolygons(const PxSimpleTriangleMesh& mesh, PxAllocatorCallback& inCallback, PxU32& nbVerts, PxVec3*& vertices,
735 PxU32& nbIndices, PxU32*& indices, PxU32& nbPolygons, PxHullPolygon*& hullPolygons) const = 0;
736
751 virtual bool cookHeightField(const PxHeightFieldDesc& desc, PxOutputStream& stream) const = 0;
752
762 virtual PxHeightField* createHeightField(const PxHeightFieldDesc& desc, PxInsertionCallback& insertionCallback) const = 0;
763
764
774 {
775 return createHeightField(desc, const_cast<PxCooking&>(*this).getStandaloneInsertionCallback());
776 }
777
790 virtual bool cookBVH(const PxBVHDesc& desc, PxOutputStream& stream) const = 0;
791
792
802 {
803 return cookBVH(desc, stream);
804 }
805
822 virtual PxBVH* createBVH(const PxBVHDesc& desc, PxInsertionCallback& insertionCallback) const = 0;
823
824
838 {
839 return createBVH(desc, const_cast<PxCooking&>(*this).getStandaloneInsertionCallback());
840 }
841
851 {
852 return createBVH(desc, insertionCallback);
853 }
854
863
864protected:
865 virtual ~PxCooking(){}
866};
867
868#if !PX_DOXYGEN
869} // namespace physx
870#endif
871
890PX_C_EXPORT PX_PHYSX_COOKING_API PX_DEPRECATED physx::PxCooking* PX_CALL_CONV PxCreateCooking(physx::PxU32 version,
891 physx::PxFoundation& foundation,
892 const physx::PxCookingParams& params);
893
894
895
896
897// Immediate cooking
898
899PX_C_EXPORT PX_PHYSX_COOKING_API physx::PxInsertionCallback* PxGetStandaloneInsertionCallback();
900
901// BVH
902PX_C_EXPORT PX_PHYSX_COOKING_API bool PxCookBVH(const physx::PxBVHDesc& desc, physx::PxOutputStream& stream);
903PX_C_EXPORT PX_PHYSX_COOKING_API physx::PxBVH* PxCreateBVH(const physx::PxBVHDesc& desc, physx::PxInsertionCallback& insertionCallback);
904
905PX_FORCE_INLINE physx::PxBVH* PxCreateBVH(const physx::PxBVHDesc& desc)
906{
907 return PxCreateBVH(desc, *PxGetStandaloneInsertionCallback());
908}
909
910// Heightfield
911PX_C_EXPORT PX_PHYSX_COOKING_API bool PxCookHeightField(const physx::PxHeightFieldDesc& desc, physx::PxOutputStream& stream);
912PX_C_EXPORT PX_PHYSX_COOKING_API physx::PxHeightField* PxCreateHeightField(const physx::PxHeightFieldDesc& desc, physx::PxInsertionCallback& insertionCallback);
913
914PX_FORCE_INLINE physx::PxHeightField* PxCreateHeightField(const physx::PxHeightFieldDesc& desc)
915{
916 return PxCreateHeightField(desc, *PxGetStandaloneInsertionCallback());
917}
918
919// Convex meshes
920PX_C_EXPORT PX_PHYSX_COOKING_API bool PxCookConvexMesh(const physx::PxCookingParams& params, const physx::PxConvexMeshDesc& desc, physx::PxOutputStream& stream, physx::PxConvexMeshCookingResult::Enum* condition=NULL);
921PX_C_EXPORT PX_PHYSX_COOKING_API physx::PxConvexMesh* PxCreateConvexMesh(const physx::PxCookingParams& params, const physx::PxConvexMeshDesc& desc, physx::PxInsertionCallback& insertionCallback, physx::PxConvexMeshCookingResult::Enum* condition=NULL);
922
923PX_FORCE_INLINE physx::PxConvexMesh* PxCreateConvexMesh(const physx::PxCookingParams& params, const physx::PxConvexMeshDesc& desc)
924{
925 return PxCreateConvexMesh(params, desc, *PxGetStandaloneInsertionCallback());
926}
927
928PX_C_EXPORT PX_PHYSX_COOKING_API bool PxValidateConvexMesh(const physx::PxCookingParams& params, const physx::PxConvexMeshDesc& desc);
929PX_C_EXPORT PX_PHYSX_COOKING_API bool PxComputeHullPolygons(const physx::PxCookingParams& params, const physx::PxSimpleTriangleMesh& mesh, physx::PxAllocatorCallback& inCallback, physx::PxU32& nbVerts, physx::PxVec3*& vertices,
930 physx::PxU32& nbIndices, physx::PxU32*& indices, physx::PxU32& nbPolygons, physx::PxHullPolygon*& hullPolygons);
931
932// Triangle meshes
933PX_C_EXPORT PX_PHYSX_COOKING_API bool PxValidateTriangleMesh(const physx::PxCookingParams& params, const physx::PxTriangleMeshDesc& desc);
934PX_C_EXPORT PX_PHYSX_COOKING_API physx::PxTriangleMesh* PxCreateTriangleMesh(const physx::PxCookingParams& params, const physx::PxTriangleMeshDesc& desc, physx::PxInsertionCallback& insertionCallback, physx::PxTriangleMeshCookingResult::Enum* condition=NULL);
935PX_C_EXPORT PX_PHYSX_COOKING_API bool PxCookTriangleMesh(const physx::PxCookingParams& params, const physx::PxTriangleMeshDesc& desc, physx::PxOutputStream& stream, physx::PxTriangleMeshCookingResult::Enum* condition=NULL);
936
937PX_FORCE_INLINE physx::PxTriangleMesh* PxCreateTriangleMesh(const physx::PxCookingParams& params, const physx::PxTriangleMeshDesc& desc)
938{
939 return PxCreateTriangleMesh(params, desc, *PxGetStandaloneInsertionCallback());
940}
941
942// Tetrahedron & soft body meshes
943PX_C_EXPORT PX_PHYSX_COOKING_API bool PxCookTetrahedronMesh(const physx::PxCookingParams& params, const physx::PxTetrahedronMeshDesc& meshDesc, physx::PxOutputStream& stream);
944PX_C_EXPORT PX_PHYSX_COOKING_API physx::PxTetrahedronMesh* PxCreateTetrahedronMesh(const physx::PxCookingParams& params, const physx::PxTetrahedronMeshDesc& meshDesc, physx::PxInsertionCallback& insertionCallback);
945
946PX_FORCE_INLINE physx::PxTetrahedronMesh* PxCreateTetrahedronMesh(const physx::PxCookingParams& params, const physx::PxTetrahedronMeshDesc& meshDesc)
947{
948 return PxCreateTetrahedronMesh(params, meshDesc, *PxGetStandaloneInsertionCallback());
949}
950
951PX_C_EXPORT PX_PHYSX_COOKING_API bool PxCookSoftBodyMesh(const physx::PxCookingParams& params, const physx::PxTetrahedronMeshDesc& simulationMeshDesc, const physx::PxTetrahedronMeshDesc& collisionMeshDesc,
952 const physx::PxSoftBodySimulationDataDesc& softbodyDataDesc, physx::PxOutputStream& stream);
953
954PX_C_EXPORT PX_PHYSX_COOKING_API physx::PxSoftBodyMesh* PxCreateSoftBodyMesh(const physx::PxCookingParams& params, const physx::PxTetrahedronMeshDesc& simulationMeshDesc, const physx::PxTetrahedronMeshDesc& collisionMeshDesc,
955 const physx::PxSoftBodySimulationDataDesc& softbodyDataDesc, physx::PxInsertionCallback& insertionCallback);
956
957PX_FORCE_INLINE physx::PxSoftBodyMesh* PxCreateSoftBodyMesh(const physx::PxCookingParams& params, const physx::PxTetrahedronMeshDesc& simulationMeshDesc, const physx::PxTetrahedronMeshDesc& collisionMeshDesc,
958 const physx::PxSoftBodySimulationDataDesc& softbodyDataDesc)
959{
960 return PxCreateSoftBodyMesh(params, simulationMeshDesc, collisionMeshDesc, softbodyDataDesc, *PxGetStandaloneInsertionCallback());
961}
962
963PX_C_EXPORT PX_PHYSX_COOKING_API physx::PxCollisionMeshMappingData* PxComputeModelsMapping(const physx::PxCookingParams& params, physx::PxTetrahedronMeshData& simulationMesh, const physx::PxTetrahedronMeshData& collisionMesh,
964 const physx::PxSoftBodyCollisionData& collisionData, const physx::PxBoundedData* vertexToTet = NULL);
965
966PX_C_EXPORT PX_PHYSX_COOKING_API physx::PxCollisionTetrahedronMeshData* PxComputeCollisionData(const physx::PxCookingParams& params, const physx::PxTetrahedronMeshDesc& collisionMeshDesc);
967
968PX_C_EXPORT PX_PHYSX_COOKING_API physx::PxSimulationTetrahedronMeshData* PxComputeSimulationData(const physx::PxCookingParams& params, const physx::PxTetrahedronMeshDesc& simulationMeshDesc);
969
970PX_C_EXPORT PX_PHYSX_COOKING_API physx::PxSoftBodyMesh* PxAssembleSoftBodyMesh(physx::PxTetrahedronMeshData& simulationMesh, physx::PxSoftBodySimulationData& simulationData, physx::PxTetrahedronMeshData& collisionMesh,
972
973PX_C_EXPORT PX_PHYSX_COOKING_API physx::PxSoftBodyMesh* PxAssembleSoftBodyMesh_Sim(physx::PxSimulationTetrahedronMeshData& simulationMesh, physx::PxCollisionTetrahedronMeshData& collisionMesh,
974 physx::PxCollisionMeshMappingData& mappingData, physx::PxInsertionCallback& insertionCallback);
975
977#endif
Abstract base class for an application defined memory allocator that can be used by the Nv library.
Definition PxAllocatorCallback.h:53
Descriptor class for #PxBVH.
Definition PxBVHDesc.h:51
Class representing a bounding volume hierarchy.
Definition PxBVH.h:63
Contains information about how to update the collision mesh's vertices given a deformed simulation te...
Definition PxTetrahedronMesh.h:283
Conbines PxTetrahedronMeshData and PxSoftBodyCollisionData.
Definition PxTetrahedronMesh.h:330
Descriptor class for #PxConvexMesh.
Definition PxConvexMeshDesc.h:156
A convex mesh.
Definition PxConvexMesh.h:83
Provides methods to cook (where cooking means to prepare the data and convert it to the right format ...
Definition PxCooking.h:337
virtual bool cookBVH(const PxBVHDesc &desc, PxOutputStream &stream) const =0
Cooks a bounding volume hierarchy. The results are written to the stream.
PX_FORCE_INLINE PxConvexMesh * createConvexMesh(const PxConvexMeshDesc &desc) const
Cooks and creates a convex mesh without going through a stream. Convenience function for standalone o...
Definition PxCooking.h:693
virtual bool cookTetrahedronMesh(const PxTetrahedronMeshDesc &meshDesc, PxOutputStream &stream) const =0
Cooks a tetrahedron mesh. The results are written to the stream.
virtual PxInsertionCallback & getStandaloneInsertionCallback()=0
Gets standalone object insertion interface.
virtual PxSoftBodyMesh * createSoftBodyMesh(const PxTetrahedronMeshDesc &simulationMeshDesc, const PxTetrahedronMeshDesc &collisionMeshDesc, const PxSoftBodySimulationDataDesc &softbodyDataDesc, PxInsertionCallback &insertionCallback) const =0
Cooks and creates a softbody mesh without going through a stream.
PX_DEPRECATED PX_FORCE_INLINE PxBVHStructure * createBVHStructure(const PxBVHStructureDesc &desc, PxInsertionCallback &insertionCallback) const
Backward compatibility helper. Cooks and creates a bounding volume hierarchy without going through a ...
Definition PxCooking.h:850
virtual PxSoftBodyMesh * assembleSoftBodyMesh(PxSimulationTetrahedronMeshData &simulationMesh, PxCollisionTetrahedronMeshData &collisionMesh, PxCollisionMeshMappingData &mappingData, PxInsertionCallback &insertionCallback) const =0
Bundles all data required for softbody simulation.
virtual void setParams(const PxCookingParams &params)=0
Sets cooking parameters.
virtual PxSimulationTetrahedronMeshData * computeSimulationData(const PxTetrahedronMeshDesc &simulationMeshDesc) const =0
Computes data to accelerate collision detection of tetrahedral meshes.
virtual PxSoftBodyMesh * assembleSoftBodyMesh(PxTetrahedronMeshData &simulationMesh, PxSoftBodySimulationData &simulationData, PxTetrahedronMeshData &collisionMesh, PxSoftBodyCollisionData &collisionData, PxCollisionMeshMappingData &mappingData, PxInsertionCallback &insertionCallback) const =0
Bundles all data required for softbody simulation.
PX_FORCE_INLINE PxSoftBodyMesh * createSoftBodyMesh(const PxTetrahedronMeshDesc &simulationMeshDesc, const PxTetrahedronMeshDesc &collisionMeshDesc, const PxSoftBodySimulationDataDesc &softbodyDataDesc) const
Cooks and creates a softbody mesh without going through a stream. Convenience function for standalone...
Definition PxCooking.h:502
virtual bool cookHeightField(const PxHeightFieldDesc &desc, PxOutputStream &stream) const =0
Cooks a heightfield. The results are written to the stream.
virtual bool platformMismatch() const =0
Checks endianness is the same between cooking & target platforms.
PX_FORCE_INLINE PxTriangleMesh * createTriangleMesh(const PxTriangleMeshDesc &desc) const
Cooks and creates a triangle mesh without going through a stream. Convenience function for standalone...
Definition PxCooking.h:423
virtual bool validateConvexMesh(const PxConvexMeshDesc &desc) const =0
Verifies if the convex mesh is valid. Prints an error message for each inconsistency found.
virtual PxConvexMesh * createConvexMesh(const PxConvexMeshDesc &desc, PxInsertionCallback &insertionCallback, PxConvexMeshCookingResult::Enum *condition=NULL) const =0
Cooks and creates a convex mesh without going through a stream.
virtual bool cookTriangleMesh(const PxTriangleMeshDesc &desc, PxOutputStream &stream, PxTriangleMeshCookingResult::Enum *condition=NULL) const =0
Cooks a triangle mesh. The results are written to the stream.
virtual bool computeHullPolygons(const PxSimpleTriangleMesh &mesh, PxAllocatorCallback &inCallback, PxU32 &nbVerts, PxVec3 *&vertices, PxU32 &nbIndices, PxU32 *&indices, PxU32 &nbPolygons, PxHullPolygon *&hullPolygons) const =0
Computed hull polygons from given vertices and triangles. Polygons are needed for PxConvexMeshDesc ra...
PX_FORCE_INLINE PxHeightField * createHeightField(const PxHeightFieldDesc &desc) const
Cooks and creates a heightfield mesh and inserts it into PxPhysics. Convenience function for standalo...
Definition PxCooking.h:773
virtual PxHeightField * createHeightField(const PxHeightFieldDesc &desc, PxInsertionCallback &insertionCallback) const =0
Cooks and creates a heightfield mesh and inserts it into PxPhysics.
virtual PxBVH * createBVH(const PxBVHDesc &desc, PxInsertionCallback &insertionCallback) const =0
Cooks and creates a bounding volume hierarchy without going through a stream.
virtual const PxCookingParams & getParams() const =0
Gets cooking parameters.
virtual bool validateTriangleMesh(const PxTriangleMeshDesc &desc) const =0
Verifies if the triangle mesh is valid. Prints an error message for each inconsistency found.
virtual PxCollisionTetrahedronMeshData * computeCollisionData(const PxTetrahedronMeshDesc &collisionMeshDesc) const =0
Computes data to accelerate collision detection of tetrahedral meshes.
virtual bool cookConvexMesh(const PxConvexMeshDesc &desc, PxOutputStream &stream, PxConvexMeshCookingResult::Enum *condition=NULL) const =0
Cooks a convex mesh. The results are written to the stream.
PX_DEPRECATED PX_FORCE_INLINE bool cookBVHStructure(const PxBVHStructureDesc &desc, PxOutputStream &stream) const
Backward compatibility helper. Cooks a bounding volume hierarchy. The results are written to the stre...
Definition PxCooking.h:801
PX_FORCE_INLINE PxBVH * createBVH(const PxBVHDesc &desc) const
Cooks and creates a bounding volume hierarchy without going through a stream. Convenience function fo...
Definition PxCooking.h:837
virtual PxTetrahedronMesh * createTetrahedronMesh(const PxTetrahedronMeshDesc &meshDesc, PxInsertionCallback &insertionCallback) const =0
Cooks and creates a tetrahedron mesh without going through a stream.
virtual void release()=0
Closes this instance of the interface.
PX_FORCE_INLINE PxTetrahedronMesh * createTetrahedronMesh(const PxTetrahedronMeshDesc &meshDesc) const
Cooks and creates a tetrahedron mesh without going through a stream. Convenience function for standal...
Definition PxCooking.h:558
virtual PxTriangleMesh * createTriangleMesh(const PxTriangleMeshDesc &desc, PxInsertionCallback &insertionCallback, PxTriangleMeshCookingResult::Enum *condition=NULL) const =0
Cooks and creates a triangle mesh without going through a stream.
virtual bool cookSoftBodyMesh(const PxTetrahedronMeshDesc &simulationMeshDesc, const PxTetrahedronMeshDesc &collisionMeshDesc, const PxSoftBodySimulationDataDesc &softbodyDataDesc, PxOutputStream &stream) const =0
Cooks a softbody mesh. The results are written to the stream.
virtual PxCollisionMeshMappingData * computeModelsMapping(PxTetrahedronMeshData &simulationMesh, const PxTetrahedronMeshData &collisionMesh, const PxSoftBodyCollisionData &collisionData, const PxBoundedData *vertexToTet=NULL) const =0
Computes the mapping between collision and simulation mesh.
Foundation SDK singleton class.
Definition PxFoundation.h:57
Descriptor class for #PxHeightField.
Definition PxHeightFieldDesc.h:53
A height field class.
Definition PxHeightField.h:84
Callback interface that permits TriangleMesh, Heightfield, ConvexMesh or BVH to be used directly with...
Definition PxInsertionCallback.h:57
Structure describing parameters affecting midphase mesh structure.
Definition PxMidphaseDesc.h:51
Output stream class for I/O.
Definition PxIO.h:114
A structure describing a triangle mesh.
Definition PxSimpleTriangleMesh.h:83
Conbines PxTetrahedronMeshData and PxSoftBodyCollisionData.
Definition PxTetrahedronMesh.h:348
Stores data to accelerate collision detection of a tetrahedral mesh.
Definition PxTetrahedronMesh.h:297
A softbody mesh, containing structures to store collision shape, simulation shape and deformation sta...
Definition PxTetrahedronMesh.h:214
‍**
Definition PxTetrahedronMeshDesc.h:194
Stores data to compute and store the state of a deformed tetrahedral mesh.
Definition PxTetrahedronMesh.h:319
Contains raw geometry information describing the tetmesh's vertices and its elements (tetrahedra)
Definition PxTetrahedronMesh.h:308
Descriptor class for #PxTetrahedronMesh (contains only pure geometric data).
Definition PxTetrahedronMeshDesc.h:52
A tetramedron mesh, also called a 'tetrahedron soup'.
Definition PxTetrahedronMesh.h:115
Class to define the scale at which simulation runs. Most simulation tolerances are calculated in term...
Definition PxTolerancesScale.h:53
Descriptor class for #PxTriangleMesh.
Definition PxTriangleMeshDesc.h:55
A triangle mesh, also called a 'polygon soup'.
Definition PxTriangleMesh.h:118
3 Element vector class.
Definition PxVec3.h:50
PX_C_EXPORT PX_PHYSX_COOKING_API PX_DEPRECATED physx::PxCooking *PX_CALL_CONV PxCreateCooking(physx::PxU32 version, physx::PxFoundation &foundation, const physx::PxCookingParams &params)
Create an instance of the cooking interface.
Definition Cooking.cpp:194
#define PX_CALL_CONV
Definition PxPreprocessor.h:299
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
#define PX_DEPRECATED
Definition PxPreprocessor.h:418
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PX_DEPRECATED PxBVHDesc PxBVHStructureDesc
Definition PxBVHDesc.h:137
PX_DEPRECATED PxBVH PxBVHStructure
Definition PxPhysics.h:73
Definition PxCoreUtilityTypes.h:96
Result from convex cooking.
Definition PxCooking.h:61
Enum
Definition PxCooking.h:63
@ ePOLYGONS_LIMIT_REACHED
Convex mesh cooking succeeded, but the algorithm has reached the 255 polygons limit....
Definition PxCooking.h:83
@ eSUCCESS
Convex mesh cooking succeeded.
Definition PxCooking.h:67
@ eFAILURE
Something unrecoverable happened. Check the error stream to find out what.
Definition PxCooking.h:88
@ eZERO_AREA_TEST_FAILED
Convex mesh cooking failed, algorithm couldn't find 4 initial vertices without a small triangle.
Definition PxCooking.h:74
Enumeration for convex mesh cooking algorithms.
Definition PxCooking.h:94
Enum
Definition PxCooking.h:96
@ eQUICKHULL
The Quickhull algorithm constructs the hull from the given input points. The resulting hull will only...
Definition PxCooking.h:102
Structure describing parameters affecting mesh cooking.
Definition PxCooking.h:185
bool suppressTriangleMeshRemapTable
When true, the face remap table is not created. This saves a significant amount of memory,...
Definition PxCooking.h:238
PxReal maxWeightRatioInTet
Maximum mass ratio allowed on vertices touched by a single tet. If a any tetrahedron exceeds the mass...
Definition PxCooking.h:313
float areaTestEpsilon
Zero-size area epsilon used in convex hull computation.
Definition PxCooking.h:198
PxConvexMeshCookingType::Enum convexMeshCookingType
Convex hull creation algorithm.
Definition PxCooking.h:229
PxMidphaseDesc midphaseDesc
Controls the desired midphase desc structure for triangle meshes.
Definition PxCooking.h:295
bool buildTriangleAdjacencies
When true, the triangle adjacency information is created. You can get the adjacency triangles for a g...
Definition PxCooking.h:246
PxMeshPreprocessingFlags meshPreprocessParams
Mesh pre-processing parameters. Used to control options like whether the mesh cooking performs vertex...
Definition PxCooking.h:269
bool buildGPUData
When true, addigional information required for GPU-accelerated rigid body simulation is created....
Definition PxCooking.h:253
PxU32 gaussMapLimit
Vertex limit beyond which additional acceleration structures are computed for each convex mesh....
Definition PxCooking.h:304
float planeTolerance
Plane tolerance used in convex hull computation.
Definition PxCooking.h:220
PxTolerancesScale scale
Tolerance scale is used to check if cooked triangles are not too huge. This check will help with simu...
Definition PxCooking.h:262
PxReal meshWeldTolerance
Mesh weld tolerance. If mesh welding is enabled, this controls the distance at which vertices are wel...
Definition PxCooking.h:286
Polygon data.
Definition PxConvexMesh.h:50
Enum for the set of mesh pre-processing parameters.
Definition PxCooking.h:134
Enum
Definition PxCooking.h:136
@ eFORCE_32BIT_INDICES
When set, 32-bit indices will always be created regardless of triangle count.
Definition PxCooking.h:162
@ eENABLE_INERTIA
When set, inertia tensor is calculated for the mesh.
Definition PxCooking.h:172
@ eDISABLE_ACTIVE_EDGES_PRECOMPUTE
When set, active edges are set for each triangle edge. This makes cooking faster but slow up contact ...
Definition PxCooking.h:155
@ eDISABLE_CLEAN_MESH
When set, mesh cleaning is disabled. This makes cooking faster.
Definition PxCooking.h:150
@ eWELD_VERTICES
When set, mesh welding is performed. See PxCookingParams::meshWeldTolerance. Clean mesh must be enabl...
Definition PxCooking.h:140
@ eENABLE_VERT_MAPPING
When set, a list of triangles will be created for each associated vertex in the mesh.
Definition PxCooking.h:167
Result from triangle mesh cooking.
Definition PxCooking.h:110
Enum
Definition PxCooking.h:112
@ eLARGE_TRIANGLE
a triangle is too large for well-conditioned results. Tessellate the mesh for better behavior,...
Definition PxCooking.h:121
@ eFAILURE
Something unrecoverable happened. Check the error stream to find out what.
Definition PxCooking.h:126
@ eSUCCESS
Everything is A-OK.
Definition PxCooking.h:116