lib/Oimo.js
function(x,y,z,normalX,normalY,normalZ,penetration,flip){
        var p=this.points[this.numPoints++];
        p.position.x=x;
        p.position.y=y;
        p.position.z=z;
        var r=this.body1.rotation;
        var rx=x-this.body1.position.x;
        var ry=y-this.body1.position.y;
        var rz=z-this.body1.position.z;

        var tr = r.elements;
        p.localPoint1.x=rx*tr[0]+ry*tr[3]+rz*tr[6];
        p.localPoint1.y=rx*tr[1]+ry*tr[4]+rz*tr[7];
        p.localPoint1.z=rx*tr[2]+ry*tr[5]+rz*tr[8];
        r=this.body2.rotation;
        rx=x-this.body2.position.x;
        ry=y-this.body2.position.y;
        rz=z-this.body2.position.z;
        p.localPoint2.x=rx*tr[0]+ry*tr[3]+rz*tr[6];
        p.localPoint2.y=rx*tr[1]+ry*tr[4]+rz*tr[7];
        p.localPoint2.z=rx*tr[2]+ry*tr[5]+rz*tr[8];

        p.normalImpulse=0;
        if(flip){
            p.normal.x=-normalX;
            p.normal.y=-normalY;
            p.normal.z=-normalZ;
        }else{
            p.normal.x=normalX;
            p.normal.y=normalY;
            p.normal.z=normalZ;
        }
        p.penetration=penetration;
        p.warmStarted=false;
    }
function(x,y,z,normalX,normalY,normalZ,penetration,flip){
        var p=this.points[this.numPoints++];
        p.position.x=x;
        p.position.y=y;
        p.position.z=z;
        var r=this.body1.rotation;
        var rx=x-this.body1.position.x;
        var ry=y-this.body1.position.y;
        var rz=z-this.body1.position.z;

        var tr = r.elements;
        p.localPoint1.x=rx*tr[0]+ry*tr[3]+rz*tr[6];
        p.localPoint1.y=rx*tr[1]+ry*tr[4]+rz*tr[7];
        p.localPoint1.z=rx*tr[2]+ry*tr[5]+rz*tr[8];
        r=this.body2.rotation;
        rx=x-this.body2.position.x;
        ry=y-this.body2.position.y;
        rz=z-this.body2.position.z;
        p.localPoint2.x=rx*tr[0]+ry*tr[3]+rz*tr[6];
        p.localPoint2.y=rx*tr[1]+ry*tr[4]+rz*tr[7];
        p.localPoint2.z=rx*tr[2]+ry*tr[5]+rz*tr[8];

        p.normalImpulse=0;
        if(flip){
            p.normal.x=-normalX;
            p.normal.y=-normalY;
            p.normal.z=-normalZ;
        }else{
            p.normal.x=normalX;
            p.normal.y=normalY;
            p.normal.z=normalZ;
        }
        p.penetration=penetration;
        p.warmStarted=false;
    }
function ( x , y , z , normalX , normalY , normalZ , penetration , flip ) { var p = this . points [ this . numPoints ++ ] ; p . position . x = x ; p . position . y = y ; p . position . z = z ; var r = this . body1 . rotation ; var rx = x - this . body1 . position . x ; var ry = y - this . body1 . position . y ; var rz = z - this . body1 . position . z ; var tr = r . elements ; p . localPoint1 . x = rx * tr [ 0 ] + ry * tr [ 3 ] + rz * tr [ 6 ] ; p . localPoint1 . y = rx * tr [ 1 ] + ry * tr [ 4 ] + rz * tr [ 7 ] ; p . localPoint1 . z = rx * tr [ 2 ] + ry * tr [ 5 ] + rz * tr [ 8 ] ; r = this . body2 . rotation ; rx = x - this . body2 . position . x ; ry = y - this . body2 . position . y ; rz = z - this . body2 . position . z ; p . localPoint2 . x = rx * tr [ 0 ] + ry * tr [ 3 ] + rz * tr [ 6 ] ; p . localPoint2 . y = rx * tr [ 1 ] + ry * tr [ 4 ] + rz * tr [ 7 ] ; p . localPoint2 . z = rx * tr [ 2 ] + ry * tr [ 5 ] + rz * tr [ 8 ] ; p . normalImpulse = 0 ; if ( flip ) { p . normal . x = - normalX ; p . normal . y = - normalY ; p . normal . z = - normalZ ; } else { p . normal . x = normalX ; p . normal . y = normalY ; p . normal . z = normalZ ; } p . penetration = penetration ; p . warmStarted = false ; }
Add a point into this manifold.
@param   x
@param   y
@param   z
@param   normalX
@param   normalY
@param   normalZ
@param   penetration
@param   flip
Add a point into this manifold .