MemoryOutputStream is not a member of PxToolkit

206 views Asked by At

I'm trying create a PhysX actor w/ a custom mesh., following the official doc:

static const PxVec3 convexVerts[] = {PxVec3(0,1,0),PxVec3(1,0,0),PxVec3(-1,0,0),PxVec3(0,0,1),PxVec3(0,0,-1)};


PxConvexMeshDesc convexDesc;
convexDesc.points.count     = 5;
convexDesc.points.stride    = sizeof(PxVec3);
convexDesc.points.data      = convexVerts;
convexDesc.flags            = PxConvexFlag::eCOMPUTE_CONVEX;
convexDesc.vertexLimit      = 256;

PxToolkit::MemoryOutputStream buf;
if(!cooking.cookConvexMesh(convexDesc, buf))
    return NULL;
PxToolkit::MemoryInputData input(buf.getData(), buf.getSize());
PxConvexMesh* convexMesh = thePhysics->createConvexMesh(input);
PxShape* aConvexShape = aConvexActor->createShape(PxConvexMeshGeometry(convexMesh), aMaterial);

Taken from the official docs.

But when I try to compile:

error C2039: 'MemoryOutputStream' is not a member of PxToolkit.

I've included the PxToolkit.lib file I manually built using VS 2013,as well as the headers. And indeed MOS is not in the PxTkStream.cpp.

1

There are 1 answers

0
tomer zeitune On

a bit late but you should just use PxDefaultMemoryInputData and PxDefaultMemoryOutputStream according to the docs