public DContactGeomBuffer createView(int skip) { return new DContactGeomBuffer(this, skip); }
public DContactGeomBuffer createView(int skip) { return new DContactGeomBuffer(this, skip); }
public DContactGeomBuffer getGeomBuffer() { return new DContactGeomBuffer(this); }
public DContactGeomBuffer getGeomBuffer() { return new DContactGeomBuffer(this); }
private void nearCallback (Object data, DGeom o1, DGeom o2) { int n; final int N = 100; //dContactGeom contact[N]; DContactGeomBuffer contacts = new DContactGeomBuffer(N); if (o2 instanceof DRay) { n = OdeHelper.collide (o2,o1,N,contacts);//,sizeof(dContactGeom)); } else { n = OdeHelper.collide (o1,o2,N,contacts);//,sizeof(dContactGeom)); } if (n > 0) { DMatrix3 RI = new DMatrix3(); RI.setIdentity(); DVector3 ss = new DVector3(0.01,0.01,0.01); for (int i=0; i<n; i++) { DContactGeom contact = contacts.get(i); contact.pos.add2( Z_OFFSET ); dsDrawBox (contact.pos,RI,ss); DVector3 n2 = new DVector3(); //for (j=0; j<3; j++) n[j] = contact[i].pos[j] + 0.1*contact[i].normal[j]; n2.eqSum(contact.pos, contact.normal, 0.1); dsDrawLine (contact.pos,n2); } } }
private void nearCallback (Object data, DGeom o1, DGeom o2) { int i,n; final int N = 100; //dContactGeom contact[N]; DContactGeomBuffer contacts = new DContactGeomBuffer(N); if (o2 instanceof DRay) { n = dCollide (o2,o1,N,contacts);//,sizeof(dContactGeom)); } else { n = dCollide (o1,o2,N,contacts);//,sizeof(dContactGeom)); } if (n > 0) { DMatrix3 RI = new DMatrix3(); RI.setIdentity();//dRSetIdentity (RI); DVector3 ss = new DVector3(0.01,0.01,0.01); for (i=0; i<n; i++) { DContactGeom contact = contacts.get(i); contact.pos.add(2, Z_OFFSET ); dsDrawBox (contact.pos,RI,ss); DVector3 n2 = new DVector3(); //for (j=0; j<3; j++) n[j] = contact[i].pos[j] + 0.1*contact[i].normal[j]; n2.eqSum(contact.pos, contact.normal, 0.1); dsDrawLine (contact.pos,n2); } } }
final DVector3[] triangle = new DVector3[] { new DVector3(), new DVector3(), new DVector3() }; int contactcount = 0; DContactGeomBuffer tempContacts = new DContactGeomBuffer(1); for (int i : triindices) { ((DxTriMesh) o2).FetchTransformedTriangle(i, triangle);
final DVector3[] triangle = new DVector3[] { new DVector3(), new DVector3(), new DVector3() }; int contactcount = 0; DContactGeomBuffer tempContacts = new DContactGeomBuffer(1); for (int i : triindices) { ((DxTriMesh) o2).FetchTransformedTriangle(i, triangle);
DVector3 perturbed = new DVector3(); DVector3 pos = new DVector3(contact.pos); DContactGeomBuffer perturbedContacts = new DContactGeomBuffer(1);
DVector3 perturbed = new DVector3(); DVector3 pos = new DVector3(contact.pos); DContactGeomBuffer perturbedContacts = new DContactGeomBuffer(1);
DContactGeomBuffer contacts = new DContactGeomBuffer(8); if(geoms==convex) contactcount = new DxConvex.CollideConvexConvex().dColliderFn(geoms[0],geoms[1],8,contacts);//sizeof(dContactGeom));
RefInt code = new RefInt(); DContactGeomBuffer contacts = new DContactGeomBuffer(48);
private boolean test_ray_and_ccylinder() DContactGeomBuffer contacts = new DContactGeomBuffer(1); DVector3 p=new DVector3(),a=new DVector3(),b=new DVector3(),n=new DVector3(); DMatrix3 R=new DMatrix3();
private boolean test_ray_and_plane() DContactGeomBuffer contacts = new DContactGeomBuffer(1); DVector3 n=new DVector3(),p=new DVector3(),q=new DVector3(),a=new DVector3(), b=new DVector3(),g=new DVector3(),h=new DVector3(); // n,d = plane parameters
RefInt code = new RefInt(); DContactGeomBuffer contacts = new DContactGeomBuffer(48);
private boolean test_ray_and_sphere() DContactGeomBuffer contacts = new DContactGeomBuffer(1); DVector3 p=new DVector3(),q=new DVector3(),q2=new DVector3(), n=new DVector3(),v1=new DVector3();
private boolean test_ray_and_ccylinder() DContactGeomBuffer contacts = new DContactGeomBuffer(1); DVector3 p=new DVector3(),a=new DVector3(),b=new DVector3(),n=new DVector3(); DMatrix3 R=new DMatrix3();
DContactGeomBuffer contacts = new DContactGeomBuffer(1); DVector3 s=new DVector3(),p=new DVector3(),q=new DVector3(),n=new DVector3(), q2=new DVector3(),q3=new DVector3(),q4=new DVector3(); // s = box sides
private boolean test_ray_and_plane() DContactGeomBuffer contacts = new DContactGeomBuffer(1); DVector3 n=new DVector3(),p=new DVector3(),q=new DVector3(),a=new DVector3(), b=new DVector3(),g=new DVector3(),h=new DVector3(); // n,d = plane parameters
DContactGeomBuffer contacts = new DContactGeomBuffer(1); DVector3 s=new DVector3(),p=new DVector3(),q=new DVector3(),n=new DVector3(), q2=new DVector3(),q3=new DVector3(),q4=new DVector3(); // s = box sides