[ODE] Trimesh creation problems
Sergey Beloshitsky
sergey at rostok-games.com.ua
Wed Feb 9 20:33:30 MST 2005
I have looked at your code, think problem is in your data, look at
example source code that work with TriMesh
also you may look at ode-doc at trimesh geom class, there is some
example code.
make sure that Lib3dsPoint is sequence of 3 floats/doubles(for Double),
it may also contain data at the end
Lib3dsFace(object->Model->meshes->faces) must contain chunks of 3
indexes to data in Lib3dsPoint
David Rogers wrote:
> I tried that still with no luck. Perhaps it's my data, I'll check on
> that unless anyone has any other ideas. For reference, with
> dGeomTriMeshDataBuildSingle, here is a screenshot of the trace.
>
>
>
>
> dave
>
>
> On Feb 9, 2005, at 8:06 AM, Sergey Beloshitsky wrote:
>
> maybe you should chage dGeomTriMeshDataBuildDouble on
> dGeomTriMeshDataBuildSingle
> David Rogers wrote:
>
> Hi all,
>
> I'm using some 3ds models in my project and just using ODE for
> collisions. Lib3ds is getting all the info for the models for
> me and doing a great job at it. But when I call
> dGeomTriMeshDataBuildDouble to put the data from my models in,
> I get a crash. I've traced it back and it's somewhere deep
> within OPCODE. More specifically, line 133 of
> OPC_MeshInterface.h. Here is my problem code:
>
> dTriMeshDataID Data;
> int VertexStride = sizeof(Lib3dsPoint);
> int TriStride = sizeof(Lib3dsFace);
> gfloat *PointList = model_Get3DSPointList(object);
>
>
> if(object->Model) {
> Data = dGeomTriMeshDataCreate();
>
> /* Crashes in this call */
> dGeomTriMeshDataBuildDouble(Data,
> object->Model->meshes->pointL, VertexStride,
> object->Model->meshes->points,
> object->Model->meshes->faceL, object->Model->meshes->faces,
> TriStride);
>
> object->TriMesh = dCreateTriMesh(space, Data, 0, 0, 0);
> }
>
> Any help would be greatly appreciated. If any more code/info
> is needed, I can get it out there later today, it's too late
> and I'm sleepy.
>
> Thanks again!
>
> Dave Rogers
>
>
> "Final Score: Freedom 27, Liberty 15. It was noble effort for
> Liberty which as you know has been playing hurt since the
> Patriot Act."
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
>
>
>
> --
> Шукай в телефоні мій слід...
>
>
> "Final Score: Freedom 27, Liberty 15. It was noble effort for Liberty
> which as you know has been playing hurt since the Patriot Act."
>
--
Шукай в телефоні мій слід...
More information about the ODE
mailing list