Moderators: Sascha Willems, walaber
int attribute,i;
float f0[3],f1[3];
f0[0]=p0.x;
f0[1]=p0.y;
f0[2]=p0.z;
f1[0]=p1.x;
f1[1]=p1.y;
f1[2]=p1.z;
float normal[3];
d = NewtonCollisionRayCast(collisions[0],f0,f1,&normal,&attribute);
class dgContactPoint
{
public:
dgVector m_point;
dgVector m_normal;
const dgBody* m_body0;
const dgBody* m_body1;
const dgCollisionInstance* m_collision0;
const dgCollisionInstance* m_collision1;
// this was a int32 in core 200
dgInt64 m_shapeId0;
dgInt64 m_shapeId1;
dgFloat32 m_penetration;
dgUnsigned16 m_deformableIndex0;
dgUnsigned16 m_deformableIndex1;
}DG_GCC_VECTOR_ALIGMENT;
// set a ray cast callback for all face ray cast
dVector p0 (0, 100, 0, 0);
dVector p1 (0, -100, 0, 0);
dVector normal;
int* id[2];
dFloat parameter;
parameter = NewtonCollisionRayCast (collision, &p0[0], &p1[0], &normal[0], id);
// or like this
int* id;
dFloat parameter;
parameter = NewtonCollisionRayCast (collision, &p0[0], &p1[0], &normal[0], &id);
dFloat NewtonCollisionRayCast(const NewtonCollision* const collisionPtr, const dFloat* const p0, const dFloat* const p1, dFloat* const normal, dLong* const attribute)
Users browsing this forum: No registered users and 2 guests