PhysX SDK 3.2 API Reference: PxCooking Class Reference

PhysX SDK 3.2 API

PxCooking Class Reference
[Cooking]

#include <PxCooking.h>

List of all members.


Public Member Functions

virtual void release ()=0
 Closes this instance of the interface.
virtual void setParams (const PxCookingParams &params)=0
 Sets cooking parameters.
virtual const PxCookingParamsgetParams ()=0
 Gets cooking parameters.
virtual bool platformMismatch ()=0
 Checks endianness is the same between cooking & target platforms.
virtual bool cookTriangleMesh (const PxTriangleMeshDesc &desc, PxOutputStream &stream)=0
 Cooks a triangle mesh. The results are written to the stream.
virtual bool cookConvexMesh (const PxConvexMeshDesc &desc, PxOutputStream &stream)=0
 Cooks a convex mesh. The results are written to the stream.
virtual bool cookClothFabric (const PxClothMeshDesc &desc, const PxVec3 &gravityDir, PxOutputStream &stream)=0
 Cooks a triangle mesh to a PxClothFabric.
virtual PxBinaryConvertercreateBinaryConverter (physx::PxErrorCallback *error=NULL)=0
 Creates binary converter.

Protected Member Functions

virtual ~PxCooking ()

Constructor & Destructor Documentation

virtual PxCooking::~PxCooking (  )  [inline, protected, virtual]


Member Function Documentation

virtual bool PxCooking::cookClothFabric ( const PxClothMeshDesc desc,
const PxVec3 gravityDir,
PxOutputStream stream 
) [pure virtual]

Cooks a triangle mesh to a PxClothFabric.

Parameters:
desc The cloth mesh descriptor on which the generation of the cooked mesh depends.
gravityDir A normalized vector which specifies the direction of gravity. This information allows the cooker to generate a fabric with higher quality simulation behavior.
stream The stream the cooked fabric is written to.
Returns:
True if cooking was successful

virtual bool PxCooking::cookConvexMesh ( const PxConvexMeshDesc desc,
PxOutputStream stream 
) [pure virtual]

Cooks a convex mesh. The results are written to the stream.

To create a triangle mesh object it is necessary to first 'cook' the mesh data into a form which allows the SDK to perform efficient collision detection.

cookConvexMesh() allows a mesh description to be cooked into a binary stream suitable for loading and performing collision detection at runtime.

Example

//TODO: Add Code Snippet Here

Note:
This method is not reentrant if the convex mesh descriptor has the flag PxConvexFlag::eCOMPUTE_CONVEX set.

The number of vertices and the number of convex polygons in a cooked convex mesh is limited to 256.

If those limits are exceeded in either the user-provided data or the final cooked mesh, an error is reported.

If this happens, using the PxConvexFlag::eINFLATE_CONVEX is usually enough to obtain a valid convex.

Parameters:
[in] desc The convex mesh descriptor to read the mesh from.
[in] stream User stream to output the cooked data.
Returns:
true on success
See also:
cookTriangleMesh() setParams()

virtual bool PxCooking::cookTriangleMesh ( const PxTriangleMeshDesc desc,
PxOutputStream stream 
) [pure virtual]

Cooks a triangle mesh. The results are written to the stream.

To create a triangle mesh object it is necessary to first 'cook' the mesh data into a form which allows the SDK to perform efficient collision detection.

cookTriangleMesh() allows a mesh description to be cooked into a binary stream suitable for loading and performing collision detection at runtime.

Example

//TODO: Add Code Snippet Here

Parameters:
[in] desc The triangle mesh descriptor to read the mesh from.
[in] stream User stream to output the cooked data.
Returns:
true on success
See also:
cookConvexMesh() setParams()

virtual PxBinaryConverter* PxCooking::createBinaryConverter ( physx::PxErrorCallback *  error = NULL  )  [pure virtual]

Creates binary converter.

Parameters:
[in] error User-defined error callback. This is an optional parameter.
Returns:
Binary converter instance.

virtual const PxCookingParams& PxCooking::getParams (  )  [pure virtual]

Gets cooking parameters.

Returns:
Current cooking parameters.
See also:
PxCookingParams setParams()

virtual bool PxCooking::platformMismatch (  )  [pure virtual]

Checks endianness is the same between cooking & target platforms.

Returns:
True if there is and endian mismatch.

virtual void PxCooking::release (  )  [pure virtual]

Closes this instance of the interface.

virtual void PxCooking::setParams ( const PxCookingParams params  )  [pure virtual]

Sets cooking parameters.

Parameters:
[in] params Cooking parameters
See also:
getParams()


The documentation for this class was generated from the following file:



Copyright © 2008-2012 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com