> On the other hand, deep inside OPCODE, it crashes inside a function
> called TransformPoint() in OPC_Common.h. The data is coming from
> OBBCollider::_Collide(const AABBNoLeafNode*) which grabs a pointer to
> the triangles using the following line:
>
> VertexPointers VP;
> mIMesh->GetTriangle(VP, prim_index);
>
VertexPointers VP - is a temporary storage used internally for type
conversions.
Also, there are no lines
> VertexPointers VP;
> mIMesh->GetTriangle(VP, prim_index);
>
in
void OBBCollider::_Collide(const AABBNoLeafNode* node)
{
// Perform OBB-AABB overlap test
if(!BoxBoxOverlap(node->mAABB.mExtents, node->mAABB.mCenter)) return;
TEST_BOX_IN_OBB(node->mAABB.mCenter, node->mAABB.mExtents)
if(node->HasPosLeaf()) { OBB_PRIM(node->GetPosPrimitive(), OPC_CONTACT) }
else _Collide(node->GetPos());
if(ContactFound()) return;
if(node->HasNegLeaf()) { OBB_PRIM(node->GetNegPrimitive(), OPC_CONTACT) }
else _Collide(node->GetNeg());
}
Oleh Derevenko
-- ICQ: 36361783
Update to latest revision first.
Oleh Derevenko
-- ICQ: 36361783
Oleh Derevenko
-- ICQ: 36361783
----- Original Message -----
From: "Oleh Derevenko" <od...@eleks.lviv.ua>
To: <ode-...@googlegroups.com>
Sent: 25 червня 2008 р. 17:10
Subject: [ode-users] Re: OPCODE crashes, can't get at trimesh data
>
For example it could be, feeding floats of wrong size, mismatch of number of
triangles passed as parameter and actual index data size, any other
parameter inconsistencies, invalid library build, after all.
There are too many possible sources of problem. Try some simple trimesh and
evaluate the data you pass to trimesh creation calls to make sure the data
is correct.
Oleh Derevenko
-- ICQ: 36361783
Sincerely,
jw
Try to use the bunny data from the demos. It's in bunny_geom.h.
--
Daniel K. O.
"The only way to succeed is to build success yourself"
Are you keeping the data live after the function? ODE does not copy the
data, only the pointers.
Sincerely,
jw