Sign in to follow this  
Kiyanov E

PhysX. NxCookTriangleMesh return false

Recommended Posts

Kiyanov E    122
Why NxCookTriangleMesh can return false ? Documentation says that NxCookTriangleMesh return true on success.
NxTriangleMeshDesc		heightfieldDesc;
		heightfieldDesc.numVertices		=	33*33;
		heightfieldDesc.numTriangles	=	32*32*2;
		heightfieldDesc.pointStrideBytes	=	sizeof(DHMVertex);
		heightfieldDesc.triangleStrideBytes	=	sizeof(DIndex)	*	3;
		heightfieldDesc.points				=	chunk;
		heightfieldDesc.triangles			=	indices;
		heightfieldDesc.flags				=	NX_MF_HARDWARE_MESH;

		heightfieldDesc.heightFieldVerticalAxis	=	NX_Z;
		heightfieldDesc.heightFieldVerticalExtent	=	-1000;

		NxTriangleMeshShapeDesc	heightfieldShapeDesc;
		bool	cookInited = NxInitCooking();

		MemoryWriteBuffer	stream;

		bool	status = NxCookTriangleMesh(heightfieldDesc,stream);
chunk and indices are valid pointers.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this