Jump to content
  • Advertisement
Sign in to follow this  
Kiyanov E

PhysX. NxCookTriangleMesh return false

This topic is 3835 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!