static void dVector3Copy(final DVector3C a, DVector3 c) { // c.v[0] = a.v[0]; // c.v[1] = a.v[1]; // c.v[2] = a.v[2]; c.set(a); }
void dBodySetForce (double x, double y, double z) { facc.set(x, y, z); } void dBodySetForce (DVector3C xyz)
/** * Get the side lengths of a box. * * @param result the returned side lengths * * @see #dGeomBoxSetLengths(DVector3C) */ public void dGeomBoxGetLengths (DVector3 result) { result.set(side); }
/** * Creates a vector initialised with the first three values of v2. * @param v2 v2 */ public DVector3(double[] v2) { this(); set(v2); }
/** * Creates a (i,j,k) vector. * @param i value at position 0 * @param j value at position 1 * @param k value at position 2 */ public DVector3(double i, double j, double k) { this(); set(i, j, k); }
void Vector3Negate( DVector3C in, DVector3 out ) { // out[0] = -in[0]; // out[1] = -in[1]; // out[2] = -in[2]; // out[3] = REAL(0.0); out.set(in).scale(-1); }
@Override protected DxPosR clone() { try { DxPosR p = (DxPosR) super.clone(); p.pos.set( pos );// = pos.clone(); p.R.set( R );// = R.clone(); return p; } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } } }
/** * Copy the position of a geom into a vector. * * @param geom the geom to query * @param pos a copy of the geom position * @see #dGeomGetPosition(DGeom) */ //ODE_API public static void dGeomCopyPosition (DGeom geom, DVector3 pos) { pos.set(geom.getPosition()); }
public void dJointGetPRAnchor( DVector3 result ) { if ( node[1].body!=null ) getAnchor2( result, _anchor2 ); else { // result.v[0] = anchor2.v[0]; // result.v[1] = anchor2.v[1]; // result.v[2] = anchor2.v[2]; result.set(_anchor2); } }
public void dBodySetPosition (DVector3C xyz) { _posr.pos.set(xyz); // notify all attached geoms that this body has moved for (DxGeom geom2 = geom; geom2 != null; geom2 = geom2.dGeomGetBodyNext ()) geom2.dGeomMoved (); }
static void FetchTransformedTriangle(DxGimpact TriMesh, int Index, DVector3 Out[]){ TriMesh.m_collision_trimesh.gim_trimesh_locks_work_data(); vec3f[] vOut = { new vec3f(), new vec3f(), new vec3f() }; TriMesh.m_collision_trimesh.gim_trimesh_get_triangle_vertices(Index, vOut[0], vOut[1], vOut[2]); Out[0].set( vOut[0].f ); Out[1].set( vOut[1].f ); Out[2].set( vOut[2].f ); TriMesh.m_collision_trimesh.gim_trimesh_unlocks_work_data(); }
public void dBodySetPosition (double x, double y, double z) { _posr.pos.set(x, y, z); // notify all attached geoms that this body has moved for (DxGeom geom2 = geom; geom2 != null; geom2 = geom2.dGeomGetBodyNext ()) geom2.dGeomMoved (); }
static void FetchTransformedTriangle(DxGimpact TriMesh, int Index, DVector3 Out[]){ TriMesh.m_collision_trimesh.gim_trimesh_locks_work_data(); vec3f[] vOut = { new vec3f(), new vec3f(), new vec3f() }; TriMesh.m_collision_trimesh.gim_trimesh_get_triangle_vertices(Index, vOut[0], vOut[1], vOut[2]); Out[0].set( vOut[0].f ); Out[1].set( vOut[1].f ); Out[2].set( vOut[2].f ); TriMesh.m_collision_trimesh.gim_trimesh_unlocks_work_data(); }
public void dBodySetPosition (double x, double y, double z) { _posr.pos.set(x, y, z); // notify all attached geoms that this body has moved for (DxGeom geom2 = geom; geom2 != null; geom2 = geom2.dGeomGetBodyNext ()) geom2.dGeomMoved (); }
private static void dMultiplyHelper0_331(DVector3 res, DMatrix3C a, DVector3C b) { double res_0 = a.dotRow(0, b); double res_1 = a.dotRow(1, b); double res_2 = a.dotRow(2, b); /* Only assign after all the calculations are over to avoid incurring memory aliasing*/ res.set(res_0, res_1, res_2); }
private static void dMultiplyHelper0_133(DVector3 res, DVector3C a, DMatrix3C b) { double res_0 = a.dotCol(b, 0); double res_1 = a.dotCol(b, 1); double res_2 = a.dotCol(b, 2); /* Only assign after all the calculations are over to avoid incurring memory aliasing*/ res.set(res_0, res_1, res_2); }
void dGeomVectorFromWorld(double px, double py, double pz, DVector3 result) { if ((_gflags & GEOM_PLACEABLE) == 0) { result.set(px, py, pz); return; } recomputePosr(); DVector3 p = new DVector3(px, py, pz); dMultiply1_331 (result,_final_posr.R(),p); }
public static void dAddScaledVectors3(DVector3 res, DVector3C a, DVector3C b, double a_scale, double b_scale) { double res_0, res_1, res_2; res_0 = a_scale * a.get0() + b_scale * b.get0(); res_1 = a_scale * a.get1() + b_scale * b.get1(); res_2 = a_scale * a.get2() + b_scale * b.get2(); // Only assign after all the calculations are over to avoid incurring memory aliasing res.set( res_0, res_1, res_2 ); }
void dGeomGetRelPointPos (double px, double py, double pz, DVector3 result) { if ((_gflags & GEOM_PLACEABLE) == 0) { result.set(px, py, pz); return; } recomputePosr(); DVector3 prel,p = new DVector3(); prel = new DVector3(px, py, pz); dMultiply0_331 (p,_final_posr.R(),prel); result.eqSum(p, _final_posr.pos()); }
public static void dRFromZAxis (DMatrix3 R, DVector3C xyz) { DVector3 n = new DVector3(),p = new DVector3(),q = new DVector3(); n.set(xyz); n.normalize(); OdeMath.dPlaneSpace (n,p,q); R.set( p.get0(), q.get0(), n.get0(), p.get1(), q.get1(), n.get1(), p.get2(), q.get2(), n.get2()); }