/** * Instead, please use a.dot(b). * @param a a * @param b b * @return dot product */ public static double dCalcVectorDot3(DVector3C a, DVector3C b) { return a.dot(b); } public static double dCalcVectorDot3(double[] a, int o1, DVector3C b) { return dDOTpq(a,o1,b); }
/** * Instead, please use a.dot(b). * @param a a * @param b b * @return dot product */ public static double dCalcVectorDot3(DVector3C a, DVector3C b) { return a.dot(b); } public static double dCalcVectorDot3(double[] a, int o1, DVector3C b) { return dDOTpq(a,o1,b); }
double dVector3Dot(final DVector3C a,final DVector3C b) { return a.dot(b); }
double dVector3Dot(final DVector3C a,final DVector3C b) { return a.dot(b); }
/** * get the dot product of two n*1 vectors. if n ≤ 0 then * zero will be returned (in which case a and b need not be valid). * @param a a * @param b b * @param n n * @return ret */ //ODE_API // double dDot (final double *a, final double *b, int n); public static double dDot (final DVector3C a, final DVector3 b, int n) { return a.dot(b); } public static double dDot (final double[] a, final double[] b, int n) {
/** * get the dot product of two n*1 vectors. if n ≤ 0 then * zero will be returned (in which case a and b need not be valid). * @param a a * @param b b * @param n n * @return ret */ //ODE_API // double dDot (final double *a, final double *b, int n); public static double dDot (final DVector3C a, final DVector3 b, int n) { return a.dot(b); } public static double dDot (final double[] a, final double[] b, int n) {
@Deprecated //Please use a.dot(b); public static double dDOT(DVector3C a, DVector3C b) { return a.dot(b); } /**
@Deprecated //Please use a.dot(b); public static double dDOT(DVector3C a, DVector3C b) { return a.dot(b); } /**
boolean _cldClosestPointOnTwoLines( DVector3C vPoint1, DVector3C vLenVec1, DVector3C vPoint2, DVector3C vLenVec2, RefDouble fvalue1, RefDouble fvalue2) { // calculate denominator DVector3 vp = new DVector3(); SUBTRACT(vPoint2,vPoint1,vp); double fuaub = vLenVec1.dot(vLenVec2); double fq1 = vLenVec1.dot(vp); double fq2 = -vLenVec2.dot(vp); double fd = 1.0f - fuaub * fuaub; // if denominator is positive if (fd > 0.0f) { // calculate points of closest approach fd = 1.0f/fd; fvalue1.d = (fq1 + fuaub*fq2)*fd; fvalue2.d = (fuaub*fq1 + fq2)*fd; return true; // otherwise } else { // lines are parallel fvalue1.d = 0.0f; fvalue2.d = 0.0f; return false; } }
boolean _cldClosestPointOnTwoLines( DVector3C vPoint1, DVector3C vLenVec1, DVector3C vPoint2, DVector3C vLenVec2, RefDouble fvalue1, RefDouble fvalue2) { // calculate denominator DVector3 vp = new DVector3(); SUBTRACT(vPoint2,vPoint1,vp); double fuaub = vLenVec1.dot(vLenVec2); double fq1 = vLenVec1.dot(vp); double fq2 = -vLenVec2.dot(vp); double fd = 1.0f - fuaub * fuaub; // if denominator is positive if (fd > 0.0f) { // calculate points of closest approach fd = 1.0f/fd; fvalue1.d = (fq1 + fuaub*fq2)*fd; fvalue2.d = (fuaub*fq1 + fq2)*fd; return true; // otherwise } else { // lines are parallel fvalue1.d = 0.0f; fvalue2.d = 0.0f; return false; } }
boolean _cldClosestPointOnTwoLines( DVector3C vPoint1, DVector3C vLenVec1, DVector3C vPoint2, DVector3C vLenVec2, RefDouble fvalue1, RefDouble fvalue2) { // calculate denominator DVector3 vp = new DVector3(); SUBTRACT(vPoint2,vPoint1,vp); double fuaub = vLenVec1.dot(vLenVec2); double fq1 = vLenVec1.dot(vp); double fq2 = -vLenVec2.dot(vp); double fd = 1.0f - fuaub * fuaub; // if denominator is positive if (fd > 0.0f) { // calculate points of closest approach fd = 1.0f/fd; fvalue1.d = (fq1 + fuaub*fq2)*fd; fvalue2.d = (fuaub*fq1 + fq2)*fd; return true; // otherwise } else { // lines are parallel fvalue1.d = 0.0f; fvalue2.d = 0.0f; return false; } }
boolean _cldClosestPointOnTwoLines( DVector3C vPoint1, DVector3C vLenVec1, DVector3C vPoint2, DVector3C vLenVec2, RefDouble fvalue1, RefDouble fvalue2) { // calculate denominator DVector3 vp = new DVector3(); SUBTRACT(vPoint2,vPoint1,vp); double fuaub = vLenVec1.dot(vLenVec2); double fq1 = vLenVec1.dot(vp); double fq2 = -vLenVec2.dot(vp); double fd = 1.0f - fuaub * fuaub; // if denominator is positive if (fd > 0.0f) { // calculate points of closest approach fd = 1.0f/fd; fvalue1.d = (fq1 + fuaub*fq2)*fd; fvalue2.d = (fuaub*fq1 + fq2)*fd; return true; // otherwise } else { // lines are parallel fvalue1.d = 0.0f; fvalue2.d = 0.0f; return false; } }
if (1.0 - dFabs(in_Normal.dot(contact.normal)) < dEpsilon)
if (1.0 - dFabs(in_Normal.dot(contact.normal)) < dEpsilon)
contact.side2 = -1; double k = o1.final_posr().pos().dot( plane.getNormal() );//dDOT (o1._final_posr.pos,plane.getPlanePos()); double depth = plane.getDepth() - k + sphere._radius; if (depth >= 0) {
contact.side2 = -1; double k = o1.final_posr().pos().dot( plane.getNormal() );//dDOT (o1._final_posr.pos,plane.getPlanePos()); double depth = plane.getDepth() - k + sphere._radius; if (depth >= 0) {
double distance2 = Plane.getNormal().dot( v2 ) - Plane.getDepth(); // Ax + By + Cz - D if((distance2 <= (0.0)))
double sign = ( planePos.dot( o1.final_posr().R().viewCol(2) ) > 0) ? (-1.0) : (1.0);