OPCODE Collision Detection Library, example code
Page 1 of 1
OPCODE Collision Detection Library, example code
Hello,
I would like to use the collision detection routine from the OPCODE library, newest version 1.3
There exist documentations, e.g. Opcode.pdf and OpcodeUserManual.pdf, but they do not agree with
the source code, neither the current nor the previous version 1.2.
Does anyone have a simple and working example to check if to meshes collide?
I only would like to define the meshes using triangles and connectivities (no callback function).
I have compiled the OPCODE library statically and dynamically using no callbacks but pointers successfully, but failed to build up a small example as listed below.
Thanks in advance!
Regards
Oliver
I would like to use the collision detection routine from the OPCODE library, newest version 1.3
There exist documentations, e.g. Opcode.pdf and OpcodeUserManual.pdf, but they do not agree with
the source code, neither the current nor the previous version 1.2.
Does anyone have a simple and working example to check if to meshes collide?
I only would like to define the meshes using triangles and connectivities (no callback function).
I have compiled the OPCODE library statically and dynamically using no callbacks but pointers successfully, but failed to build up a small example as listed below.
Thanks in advance!
Regards
Oliver
- Code:
#include <Opcode.h>
using namespace Opcode;
int main(void)
{
IceMaths::IndexedTriangle *Tri0 = new IceMaths::IndexedTriangle[10];
IceMaths::Point *Pnt0 = new IceMaths::Point[10];
MeshInterface Mesh0;
Mesh0.SetNbTriangles(10);
Mesh0.SetNbVertices(10);
Mesh0.SetPointers(Tri0, Pnt0);
OPCODECREATE OPCC;
OPCC.SetMeshInterface(&Mesh0);
OPCC.Build();
AABBTreeCollider TC;
TC.SetFirstContact(true);
TC.SetFullBoxBoxTest(false);
TC.SetFullPrimBoxTest(false);
TC.SetTemporalCoherence(false);
Oliver1967- Guest
Re: OPCODE Collision Detection Library, example code
Have a look at this sample code:
https://opcode.iftopic.com/t2-simple-mesh-mesh-collision
https://opcode.iftopic.com/t2-simple-mesh-mesh-collision
Similar topics
» Mesh - mesh collision detection in OPCODE
» Accuracy of OPCODE
» How can I contact the developer of OPCODE?
» Simple Mesh-Mesh collision
» Accuracy of OPCODE
» How can I contact the developer of OPCODE?
» Simple Mesh-Mesh collision
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|