/** * TZ */ @Override public void setI(DMatrix3C I) { _I.set(I); }
/** * TZ */ @Override public void setI(DMatrix3C I) { _I.set(I); }
public DMatrix3(DMatrix3C matrix3) { this(); set(matrix3); }
public DMatrix3(DMatrix3C matrix3) { this(); set(matrix3); }
/** * Copy the rotation of a body. * * @param b the body to query * @param R a copy of the rotation matrix * @see #dBodyGetRotation(DBody) */ //ODE_API public static void dBodyCopyRotation (DBody b, DMatrix3 R){ R.set(b.getRotation()); }
/** * make a random matrix with entries between +/- range. A has size 3*3. * @param A A * @param range range */ public static void dMakeRandomMatrix (DMatrix3 A, double range) { for (int i=0; i<3; i++) { for (int j=0; j<3; j++) A.set(i, j, (dRandReal()*2.0-1.0)*range ); } } /**
@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); } } }
@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 rotation of a body. * * @param b the body to query * @param R a copy of the rotation matrix * @see #dBodyGetRotation(DBody) */ //ODE_API public static void dBodyCopyRotation (DBody b, DMatrix3 R){ R.set(b.getRotation()); }
/** * make a random matrix with entries between +/- range. A has size 3*3. * @param A A * @param range range */ public static void dMakeRandomMatrix (DMatrix3 A, double range) { for (int i=0; i<3; i++) { for (int j=0; j<3; j++) A.set(i, j, (dRandReal()*2.0-1.0)*range ); } } /**
private void dGeomCopyRotation(DMatrix3 R) { R.set(dGeomGetRotation()); }
private void dGeomCopyOffsetRotation (DMatrix3 R) { R.set(dGeomGetOffsetRotation()); }
private void dGeomCopyRotation(DMatrix3 R) { R.set(dGeomGetRotation()); }
public void dGeomSetOffsetRotation (final DMatrix3C R) { //dAASSERT (g, R); dUASSERT (_gflags & GEOM_PLACEABLE,"geom must be placeable"); dUASSERT (body, "geom must be on a body"); DxSpace.CHECK_NOT_LOCKED (parent_space); if (offset_posr == null) { dGeomCreateOffset (); } // memcpy (g.offset_posr.R,R,sizeof(dMatrix3)); offset_posr.Rw().set(R); dGeomMoved(); }
public void dBodySetRotation (DMatrix3C R) { //memcpy(b->posr.R, R, sizeof(dMatrix3)); _posr.Rw().set(R); dOrthogonalizeR(_posr.Rw()); dQfromR (_q, R); dNormalize4 (_q); // notify all attached geoms that this body has moved for (DxGeom geom2 = geom; geom2 != null; geom2 = geom2.dGeomGetBodyNext ()) { geom2.dGeomMoved (); } }
public void dBodySetRotation (DMatrix3C R) { //memcpy(b->posr.R, R, sizeof(dMatrix3)); _posr.Rw().set(R); dOrthogonalizeR(_posr.Rw()); dQfromR (_q, R); dNormalize4 (_q); // notify all attached geoms that this body has moved for (DxGeom geom2 = geom; geom2 != null; geom2 = geom2.dGeomGetBodyNext ()) { geom2.dGeomMoved (); } }
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()); }
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()); }