diff --git a/README.md b/README.md index d8acaa8..4538d17 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -OimoPhysics 1.2.2 +OimoPhysics 1.2.4 --- A lightweight 3D physics engine. diff --git a/bin/js/OimoPhysics.js b/bin/js/OimoPhysics.js index af3887a..655920c 100644 --- a/bin/js/OimoPhysics.js +++ b/bin/js/OimoPhysics.js @@ -1,5 +1,4 @@ -/* OimoPhysics 1.2.2 (c) 2022 saharan, The MIT License */ -// Generated by Haxe 4.2.2 +/* OimoPhysics 1.2.4 (c) 2022 saharan, The MIT License */ (function ($global) { "use strict"; class HxOverrides { static now() { @@ -36835,24 +36834,6 @@ class oimo_dynamics_rigidbody_RigidBody { } } removeShape(shape) { - let prev = shape._prev; - let next = shape._next; - if(prev != null) { - prev._next = next; - } - if(next != null) { - next._prev = prev; - } - if(shape == this._shapeList) { - this._shapeList = this._shapeList._next; - } - if(shape == this._shapeListLast) { - this._shapeListLast = this._shapeListLast._prev; - } - shape._next = null; - shape._prev = null; - this._numShapes--; - shape._rigidBody = null; if(this._world != null) { let _this = this._world; _this._broadPhase.destroyProxy(shape._proxy); @@ -36957,6 +36938,24 @@ class oimo_dynamics_rigidbody_RigidBody { } _this._numShapes--; } + let prev = shape._prev; + let next = shape._next; + if(prev != null) { + prev._next = next; + } + if(next != null) { + next._prev = prev; + } + if(shape == this._shapeList) { + this._shapeList = this._shapeList._next; + } + if(shape == this._shapeListLast) { + this._shapeListLast = this._shapeListLast._prev; + } + shape._next = null; + shape._prev = null; + this._numShapes--; + shape._rigidBody = null; this.updateMass(); let s = this._shapeList; while(s != null) { diff --git a/bin/js/OimoPhysics.min.js b/bin/js/OimoPhysics.min.js index d0a9b0b..e6e98e4 100644 --- a/bin/js/OimoPhysics.min.js +++ b/bin/js/OimoPhysics.min.js @@ -1,4 +1,4 @@ -/* OimoPhysics 1.2.2 (c) 2022 saharan, The MIT License */var pc="function"==typeof Object.create?Object.create:function($e){function Ab(){}Ab.prototype=$e;return new Ab},yk;if("function"==typeof Object.setPrototypeOf)yk=Object.setPrototypeOf;else{var zk;a:{var Tk={a:!0},Uk={};try{Uk.__proto__=Tk;zk=Uk.a;break a}catch($e){}zk=!1}yk=zk?function($e,Ab){$e.__proto__=Ab;if($e.__proto__!==Ab)throw new TypeError($e+" is not extensible");return $e}:null}var ql=yk; +/* OimoPhysics 1.2.4 (c) 2022 saharan, The MIT License */var pc="function"==typeof Object.create?Object.create:function($e){function Ab(){}Ab.prototype=$e;return new Ab},yk;if("function"==typeof Object.setPrototypeOf)yk=Object.setPrototypeOf;else{var zk;a:{var Tk={a:!0},Uk={};try{Uk.__proto__=Tk;zk=Uk.a;break a}catch($e){}zk=!1}yk=zk?function($e,Ab){$e.__proto__=Ab;if($e.__proto__!==Ab)throw new TypeError($e+" is not extensible");return $e}:null}var ql=yk; function rl($e,Ab){$e.prototype=pc(Ab.prototype);$e.prototype.constructor=$e;if(ql)ql($e,Ab);else for(var Eh in Ab)if("prototype"!=Eh)if(Object.defineProperties){var qk=Object.getOwnPropertyDescriptor(Ab,Eh);qk&&Object.defineProperty($e,Eh,qk)}else $e[Eh]=Ab[Eh];$e.Si=Ab.prototype} (function(){function $e(){this.position=new z;this.rotation=new ia;this.friction=ra.defaultFriction;this.restitution=ra.defaultRestitution;this.density=ra.defaultDensity;this.collisionGroup=ra.defaultCollisionGroup;this.collisionMask=ra.defaultCollisionMask;this.contactCallback=this.geometry=null}function Ab(a){this.uc=-1;this.ra=new Ob;this.za=new Ob;this.g=new Ob;var b=a.position;this.ra.F=b.x;this.ra.G=b.y;this.ra.H=b.z;b=a.rotation;this.ra.A=b.e00;this.ra.j=b.e01;this.ra.m=b.e02;this.ra.o=b.e10; this.ra.v=b.e11;this.ra.s=b.e12;this.ra.u=b.e20;this.ra.l=b.e21;this.ra.B=b.e22;b=this.za;var e=this.ra;b.F=e.F;b.G=e.G;b.H=e.H;b.A=e.A;b.j=e.j;b.m=e.m;b.o=e.o;b.v=e.v;b.s=e.s;b.u=e.u;b.l=e.l;b.B=e.B;b=this.g;e=this.ra;b.F=e.F;b.G=e.G;b.H=e.H;b.A=e.A;b.j=e.j;b.m=e.m;b.o=e.o;b.v=e.v;b.s=e.s;b.u=e.u;b.l=e.l;b.B=e.B;this.kh=a.restitution;this.dh=a.friction;this.Qh=a.density;this.Tb=a.geometry;this.$g=a.collisionGroup;this.ah=a.collisionMask;this.ld=a.contactCallback;this.D=new Pb;this.Eb=null;this.qc= @@ -818,11 +818,11 @@ function(a){var b=a.x;var e=a.y;a=a.z;var d=this.g.A*b+this.g.j*e+this.g.m*a;var J.prototype.Vg=function(){return this.Zb};J.prototype.Ze=function(){return this.Mf};J.prototype.yi=function(){return this.Od};J.prototype.wf=function(a){null==this.vc?this.vc=a:(this.Jb.U=a,a.sa=this.Jb);this.Jb=a;this.nf++;a.hc=this;if(null!=this.pc){var b=this.pc;a.Eb=b.nc.eg(a,a.D);a.uc=b.Ci++;b.nf++}this.Wg();for(a=this.vc;null!=a;){b=a.U;var e=this.za,d=this.g,c=a.za,f=a.ra;var h=e.A*f.A+e.j*f.o+e.m*f.u;var k=e.A*f.j+e.j*f.v+e.m*f.l;var g=e.A*f.m+e.j*f.s+e.m*f.B;var l=e.o*f.A+e.v*f.o+e.s*f.u; var m=e.o*f.j+e.v*f.v+e.s*f.l;var n=e.o*f.m+e.v*f.s+e.s*f.B;var q=e.u*f.A+e.l*f.o+e.B*f.u;var p=e.u*f.j+e.l*f.v+e.B*f.l;var r=e.u*f.m+e.l*f.s+e.B*f.B;c.A=h;c.j=k;c.m=g;c.o=l;c.v=m;c.s=n;c.u=q;c.l=p;c.B=r;h=e.A*f.F+e.j*f.G+e.m*f.H;k=e.o*f.F+e.v*f.G+e.s*f.H;f=e.u*f.F+e.l*f.G+e.B*f.H;c.F=h;c.G=k;c.H=f;c.F+=e.F;c.G+=e.G;c.H+=e.H;e=a.g;c=a.ra;f=d.A*c.A+d.j*c.o+d.m*c.u;h=d.A*c.j+d.j*c.v+d.m*c.l;k=d.A*c.m+d.j*c.s+d.m*c.B;g=d.o*c.A+d.v*c.o+d.s*c.u;l=d.o*c.j+d.v*c.v+d.s*c.l;m=d.o*c.m+d.v*c.s+d.s*c.B;n=d.u* c.A+d.l*c.o+d.B*c.u;q=d.u*c.j+d.l*c.v+d.B*c.l;p=d.u*c.m+d.l*c.s+d.B*c.B;e.A=f;e.j=h;e.m=k;e.o=g;e.v=l;e.s=m;e.u=n;e.l=q;e.B=p;f=d.A*c.F+d.j*c.G+d.m*c.H;h=d.o*c.F+d.v*c.G+d.s*c.H;c=d.u*c.F+d.l*c.G+d.B*c.H;e.F=f;e.G=h;e.H=c;e.F+=d.F;e.G+=d.G;e.H+=d.H;a.Tb.Yb(a.D,a.za);d=a.D.wa;e=a.D.xa;c=a.D.ya;f=a.D.ta;h=a.D.ua;k=a.D.va;a.Tb.Yb(a.D,a.g);a.D.wa=da.D.ta?f:a.D.ta;a.D.ua=h>a.D.ua?h:a.D.ua;a.D.va=k>a.D.va?k:a.D.va;null!=a.Eb&&(d= -a.g.F-a.za.F,e=a.g.G-a.za.G,c=a.g.H-a.za.H,f=a.qc,f.x=d,f.y=e,f.z=c,a.hc.pc.nc.fd(a.Eb,a.D,a.qc));a=b}};J.prototype.Kh=function(a){var b=a.sa,e=a.U;null!=b&&(b.U=e);null!=e&&(e.sa=b);a==this.vc&&(this.vc=this.vc.U);a==this.Jb&&(this.Jb=this.Jb.sa);a.U=null;a.sa=null;this.nf--;a.hc=null;if(null!=this.pc){b=this.pc;b.nc.fg(a.Eb);a.Eb=null;a.uc=-1;for(var d=a.hc.Zb;null!=d;){e=d.U;var c=d.zd;if(c.ic==a||c.jc==a){d=d.Fc;d.Ob=!1;d.Kb=0;d=b.Xf;var f=c.sa,h=c.U;null!=f&&(f.U=h);null!=h&&(h.sa=f);c==d.md&& -(d.md=d.md.U);c==d.Nd&&(d.Nd=d.Nd.sa);c.U=null;c.sa=null;c.xd&&(f=c.ic.ld,h=c.jc.ld,f==h&&(h=null),null!=f&&f.endContact(c),null!=h&&h.endContact(c));f=c.Bb.sa;h=c.Bb.U;null!=f&&(f.U=h);null!=h&&(h.sa=f);c.Bb==c.J.Zb&&(c.J.Zb=c.J.Zb.U);c.Bb==c.J.oc&&(c.J.oc=c.J.oc.sa);c.Bb.U=null;c.Bb.sa=null;f=c.Cb.sa;h=c.Cb.U;null!=f&&(f.U=h);null!=h&&(h.sa=f);c.Cb==c.K.Zb&&(c.K.Zb=c.K.Zb.U);c.Cb==c.K.oc&&(c.K.oc=c.K.oc.sa);c.Cb.U=null;c.Cb.sa=null;c.J.Pd--;c.K.Pd--;c.Bb.Fc=null;c.Cb.Fc=null;c.Bb.zd=null;c.Cb.zd= -null;c.ic=null;c.jc=null;c.J=null;c.K=null;c.xd=!1;c.Eg.de();c.Ra.de();c.Yf=null;f=c.ee;f.ic=null;f.jc=null;f.J=null;f.K=null;f.Jg=null;f.Kg=null;c.U=d.$e;d.$e=c;d.pg--}d=e}b.nf--}this.Wg();for(a=this.vc;null!=a;){b=a.U;c=this.za;e=this.g;d=a.za;f=a.ra;h=c.A*f.A+c.j*f.o+c.m*f.u;var k=c.A*f.j+c.j*f.v+c.m*f.l;var g=c.A*f.m+c.j*f.s+c.m*f.B;var l=c.o*f.A+c.v*f.o+c.s*f.u;var m=c.o*f.j+c.v*f.v+c.s*f.l;var n=c.o*f.m+c.v*f.s+c.s*f.B;var q=c.u*f.A+c.l*f.o+c.B*f.u;var p=c.u*f.j+c.l*f.v+c.B*f.l;var r=c.u*f.m+ -c.l*f.s+c.B*f.B;d.A=h;d.j=k;d.m=g;d.o=l;d.v=m;d.s=n;d.u=q;d.l=p;d.B=r;h=c.A*f.F+c.j*f.G+c.m*f.H;k=c.o*f.F+c.v*f.G+c.s*f.H;f=c.u*f.F+c.l*f.G+c.B*f.H;d.F=h;d.G=k;d.H=f;d.F+=c.F;d.G+=c.G;d.H+=c.H;c=a.g;d=a.ra;f=e.A*d.A+e.j*d.o+e.m*d.u;h=e.A*d.j+e.j*d.v+e.m*d.l;k=e.A*d.m+e.j*d.s+e.m*d.B;g=e.o*d.A+e.v*d.o+e.s*d.u;l=e.o*d.j+e.v*d.v+e.s*d.l;m=e.o*d.m+e.v*d.s+e.s*d.B;n=e.u*d.A+e.l*d.o+e.B*d.u;q=e.u*d.j+e.l*d.v+e.B*d.l;p=e.u*d.m+e.l*d.s+e.B*d.B;c.A=f;c.j=h;c.m=k;c.o=g;c.v=l;c.s=m;c.u=n;c.l=q;c.B=p;f=e.A*d.F+ -e.j*d.G+e.m*d.H;h=e.o*d.F+e.v*d.G+e.s*d.H;d=e.u*d.F+e.l*d.G+e.B*d.H;c.F=f;c.G=h;c.H=d;c.F+=e.F;c.G+=e.G;c.H+=e.H;a.Tb.Yb(a.D,a.za);e=a.D.wa;c=a.D.xa;d=a.D.ya;f=a.D.ta;h=a.D.ua;k=a.D.va;a.Tb.Yb(a.D,a.g);a.D.wa=ea.D.ta?f:a.D.ta;a.D.ua=h>a.D.ua?h:a.D.ua;a.D.va=k>a.D.va?k:a.D.va;null!=a.Eb&&(e=a.g.F-a.za.F,c=a.g.G-a.za.G,d=a.g.H-a.za.H,f=a.qc,f.x=e,f.y=c,f.z=d,a.hc.pc.nc.fd(a.Eb,a.D,a.qc));a=b}};J.prototype.Sc=function(){return this.Xb}; +a.g.F-a.za.F,e=a.g.G-a.za.G,c=a.g.H-a.za.H,f=a.qc,f.x=d,f.y=e,f.z=c,a.hc.pc.nc.fd(a.Eb,a.D,a.qc));a=b}};J.prototype.Kh=function(a){if(null!=this.pc){var b=this.pc;b.nc.fg(a.Eb);a.Eb=null;a.uc=-1;for(var e=a.hc.Zb;null!=e;){var d=e.U,c=e.zd;if(c.ic==a||c.jc==a){e=e.Fc;e.Ob=!1;e.Kb=0;e=b.Xf;var f=c.sa,h=c.U;null!=f&&(f.U=h);null!=h&&(h.sa=f);c==e.md&&(e.md=e.md.U);c==e.Nd&&(e.Nd=e.Nd.sa);c.U=null;c.sa=null;c.xd&&(f=c.ic.ld,h=c.jc.ld,f==h&&(h=null),null!=f&&f.endContact(c),null!=h&&h.endContact(c)); +f=c.Bb.sa;h=c.Bb.U;null!=f&&(f.U=h);null!=h&&(h.sa=f);c.Bb==c.J.Zb&&(c.J.Zb=c.J.Zb.U);c.Bb==c.J.oc&&(c.J.oc=c.J.oc.sa);c.Bb.U=null;c.Bb.sa=null;f=c.Cb.sa;h=c.Cb.U;null!=f&&(f.U=h);null!=h&&(h.sa=f);c.Cb==c.K.Zb&&(c.K.Zb=c.K.Zb.U);c.Cb==c.K.oc&&(c.K.oc=c.K.oc.sa);c.Cb.U=null;c.Cb.sa=null;c.J.Pd--;c.K.Pd--;c.Bb.Fc=null;c.Cb.Fc=null;c.Bb.zd=null;c.Cb.zd=null;c.ic=null;c.jc=null;c.J=null;c.K=null;c.xd=!1;c.Eg.de();c.Ra.de();c.Yf=null;f=c.ee;f.ic=null;f.jc=null;f.J=null;f.K=null;f.Jg=null;f.Kg=null;c.U= +e.$e;e.$e=c;e.pg--}e=d}b.nf--}b=a.sa;d=a.U;null!=b&&(b.U=d);null!=d&&(d.sa=b);a==this.vc&&(this.vc=this.vc.U);a==this.Jb&&(this.Jb=this.Jb.sa);a.U=null;a.sa=null;this.nf--;a.hc=null;this.Wg();for(a=this.vc;null!=a;){b=a.U;c=this.za;d=this.g;e=a.za;f=a.ra;h=c.A*f.A+c.j*f.o+c.m*f.u;var k=c.A*f.j+c.j*f.v+c.m*f.l;var g=c.A*f.m+c.j*f.s+c.m*f.B;var l=c.o*f.A+c.v*f.o+c.s*f.u;var m=c.o*f.j+c.v*f.v+c.s*f.l;var n=c.o*f.m+c.v*f.s+c.s*f.B;var q=c.u*f.A+c.l*f.o+c.B*f.u;var p=c.u*f.j+c.l*f.v+c.B*f.l;var r=c.u* +f.m+c.l*f.s+c.B*f.B;e.A=h;e.j=k;e.m=g;e.o=l;e.v=m;e.s=n;e.u=q;e.l=p;e.B=r;h=c.A*f.F+c.j*f.G+c.m*f.H;k=c.o*f.F+c.v*f.G+c.s*f.H;f=c.u*f.F+c.l*f.G+c.B*f.H;e.F=h;e.G=k;e.H=f;e.F+=c.F;e.G+=c.G;e.H+=c.H;c=a.g;e=a.ra;f=d.A*e.A+d.j*e.o+d.m*e.u;h=d.A*e.j+d.j*e.v+d.m*e.l;k=d.A*e.m+d.j*e.s+d.m*e.B;g=d.o*e.A+d.v*e.o+d.s*e.u;l=d.o*e.j+d.v*e.v+d.s*e.l;m=d.o*e.m+d.v*e.s+d.s*e.B;n=d.u*e.A+d.l*e.o+d.B*e.u;q=d.u*e.j+d.l*e.v+d.B*e.l;p=d.u*e.m+d.l*e.s+d.B*e.B;c.A=f;c.j=h;c.m=k;c.o=g;c.v=l;c.s=m;c.u=n;c.l=q;c.B=p;f=d.A* +e.F+d.j*e.G+d.m*e.H;h=d.o*e.F+d.v*e.G+d.s*e.H;e=d.u*e.F+d.l*e.G+d.B*e.H;c.F=f;c.G=h;c.H=e;c.F+=d.F;c.G+=d.G;c.H+=d.H;a.Tb.Yb(a.D,a.za);d=a.D.wa;c=a.D.xa;e=a.D.ya;f=a.D.ta;h=a.D.ua;k=a.D.va;a.Tb.Yb(a.D,a.g);a.D.wa=da.D.ta?f:a.D.ta;a.D.ua=h>a.D.ua?h:a.D.ua;a.D.va=k>a.D.va?k:a.D.va;null!=a.Eb&&(d=a.g.F-a.za.F,c=a.g.G-a.za.G,e=a.g.H-a.za.H,f=a.qc,f.x=d,f.y=c,f.z=e,a.hc.pc.nc.fd(a.Eb,a.D,a.qc));a=b}};J.prototype.Sc=function(){return this.Xb}; J.prototype.di=function(a){this.Xb=a;this.Wg()};J.prototype.fi=function(){this.Ob=!1;this.Kb=0};J.prototype.ei=function(){this.Ob=!0;this.Kb=0};J.prototype.Jh=function(){return this.Ob};J.prototype.Eh=function(){return this.Kb};J.prototype.tg=function(a){this.Oh=a;this.Ob=!1;this.Kb=0};J.prototype.be=function(){return this.gh};J.prototype.vh=function(a){this.gh=a};J.prototype.mg=function(){return this.Xg};J.prototype.Lh=function(a){this.Xg=a};J.prototype.tb=function(){return this.sa};J.prototype.Pb= function(){return this.U};Ab.prototype.Ma=function(){return this.dh};Ab.prototype.Rb=function(a){this.dh=a};Ab.prototype.Ya=function(){return this.kh};Ab.prototype.Wb=function(a){this.kh=a};Ab.prototype.Sa=function(){var a=this.ra,b=new Ob;b.F=a.F;b.G=a.G;b.H=a.H;b.A=a.A;b.j=a.j;b.m=a.m;b.o=a.o;b.v=a.v;b.s=a.s;b.u=a.u;b.l=a.l;b.B=a.B;return b};Ab.prototype.Wa=function(a){var b=this.ra;a.F=b.F;a.G=b.G;a.H=b.H;a.A=b.A;a.j=b.j;a.m=b.m;a.o=b.o;a.v=b.v;a.s=b.s;a.u=b.u;a.l=b.l;a.B=b.B};Ab.prototype.C=function(){var a= this.g,b=new Ob;b.F=a.F;b.G=a.G;b.H=a.H;b.A=a.A;b.j=a.j;b.m=a.m;b.o=a.o;b.v=a.v;b.s=a.s;b.u=a.u;b.l=a.l;b.B=a.B;return b};Ab.prototype.I=function(a){var b=this.g;a.F=b.F;a.G=b.G;a.H=b.H;a.A=b.A;a.j=b.j;a.m=b.m;a.o=b.o;a.v=b.v;a.s=b.s;a.u=b.u;a.l=b.l;a.B=b.B};Ab.prototype.Sb=function(a){var b=this.ra;b.F=a.F;b.G=a.G;b.H=a.H;b.A=a.A;b.j=a.j;b.m=a.m;b.o=a.o;b.v=a.v;b.s=a.s;b.u=a.u;b.l=a.l;b.B=a.B;if(null!=this.hc)for(a=this.hc,a.Wg(),b=a.vc;null!=b;){var e=b.U,d=a.za,c=a.g,f=b.za,h=b.ra;var k=d.A*h.A+ diff --git a/bin/js_modules/OimoPhysics.js b/bin/js_modules/OimoPhysics.js index 6230100..28c2b52 100644 --- a/bin/js_modules/OimoPhysics.js +++ b/bin/js_modules/OimoPhysics.js @@ -1,4 +1,3 @@ -// Generated by Haxe 4.2.2 var oimo = oimo || {}; if(!oimo.collision) oimo.collision = {}; if(!oimo.collision.broadphase) oimo.collision.broadphase = {}; @@ -1854,7 +1853,7 @@ oimo.collision.broadphase.bvh.BvhStrategy = class oimo_collision_broadphase_bvh_ let newArea = ((combinedMaxX - combinedMinX) * (ey1 + ez1) + ey1 * ez1) * 2; let creatingCost = newArea * 2; let incrementalCost = (newArea - ((currentNode._aabbMaxX - currentNode._aabbMinX) * (ey + ez) + ey * ez) * 2) * 2; - let descendingCost1; + let descendingCost1 = incrementalCost; combinedMinX = c11._aabbMinX < leaf._aabbMinX ? c11._aabbMinX : leaf._aabbMinX; combinedMinY = c11._aabbMinY < leaf._aabbMinY ? c11._aabbMinY : leaf._aabbMinY; combinedMinZ = c11._aabbMinZ < leaf._aabbMinZ ? c11._aabbMinZ : leaf._aabbMinZ; @@ -1872,7 +1871,7 @@ oimo.collision.broadphase.bvh.BvhStrategy = class oimo_collision_broadphase_bvh_ let ez1 = c11._aabbMaxZ - c11._aabbMinZ; descendingCost1 = incrementalCost + (((combinedMaxX - combinedMinX) * (ey + ez) + ey * ez) * 2 - ((c11._aabbMaxX - c11._aabbMinX) * (ey1 + ez1) + ey1 * ez1) * 2); } - let descendingCost2; + let descendingCost2 = incrementalCost; combinedMinX = c21._aabbMinX < leaf._aabbMinX ? c21._aabbMinX : leaf._aabbMinX; combinedMinY = c21._aabbMinY < leaf._aabbMinY ? c21._aabbMinY : leaf._aabbMinY; combinedMinZ = c21._aabbMinZ < leaf._aabbMinZ ? c21._aabbMinZ : leaf._aabbMinZ; @@ -2720,7 +2719,7 @@ oimo.collision.geometry.CapsuleGeometry = class oimo_collision_geometry_CapsuleG let dx = endX - beginX; let dz = endZ - beginZ; let tminxz = 0; - let tmaxxz; + let tmaxxz = 1; let a = dx * dx + dz * dz; let b = beginX * dx + beginZ * dz; let c = beginX * beginX + beginZ * beginZ - this._radius * this._radius; @@ -2740,6 +2739,7 @@ oimo.collision.geometry.CapsuleGeometry = class oimo_collision_geometry_CapsuleG return false; } tminxz = 0; + tmaxxz = 1; } let crossY = beginY + (endY - beginY) * tminxz; let min; @@ -2961,7 +2961,7 @@ oimo.collision.geometry.ConeGeometry = class oimo_collision_geometry_ConeGeometr out.z = rz * invLen; } _rayCastLocal(beginX,beginY,beginZ,endX,endY,endZ,hit) { - let p1y; + let p1y = beginY; let halfH = this._halfHeight; let dx = endX - beginX; let dy = endY - beginY; @@ -3385,7 +3385,7 @@ oimo.collision.geometry.CylinderGeometry = class oimo_collision_geometry_Cylinde return false; } let tminxz = 0; - let tmaxxz; + let tmaxxz = 1; let a = dx * dx + dz * dz; let b = beginX * dx + beginZ * dz; let c = beginX * beginX + beginZ * beginZ - this._radius * this._radius; @@ -4662,27 +4662,27 @@ oimo.collision.narrowphase.detector.BoxBoxDetector = class oimo_collision_narrow c12X = -c12X; c12Y = -c12Y; c12Z = -c12Z; - - - - + let tmp = b1; + b1 = b2; + b2 = tmp; + let tmp1 = w1; w1 = w2; - - + w2 = tmp1; + let tmp2 = h1; h1 = h2; - - + h2 = tmp2; + let tmp3 = d1; d1 = d2; - - - - + d2 = tmp3; + tmpX = c1X; + tmpY = c1Y; + tmpZ = c1Z; c1X = c2X; c1Y = c2Y; c1Z = c2Z; - - - + c2X = tmpX; + c2Y = tmpY; + c2Z = tmpZ; tmpX = x1X; tmpY = x1Y; tmpZ = x1Z; @@ -4854,7 +4854,7 @@ oimo.collision.narrowphase.detector.BoxBoxDetector = class oimo_collision_narrow incId = 4; } if(-incDot < minIncDot) { - + minIncDot = -incDot; incId = 5; } let incV1X; @@ -5525,7 +5525,7 @@ oimo.collision.narrowphase.detector.CapsuleCapsuleDetector = class oimo_collisio t2 = 0; } else if(d11 == 0) { t1 = 0; - + t2 = p12d2; if(p12d2 < 0) { t2 = 0; } else if(p12d2 > d22) { @@ -5535,7 +5535,7 @@ oimo.collision.narrowphase.detector.CapsuleCapsuleDetector = class oimo_collisio } } else if(d22 == 0) { t2 = 0; - + t1 = p21d1; if(p21d1 < 0) { t1 = 0; } else if(p21d1 > d11) { @@ -5560,7 +5560,7 @@ oimo.collision.narrowphase.detector.CapsuleCapsuleDetector = class oimo_collisio t2 = t1 * d12 + p12d2; if(t2 < 0) { t2 = 0; - + t1 = p21d1; if(p21d1 < 0) { t1 = 0; } else if(p21d1 > d11) { @@ -13608,15 +13608,15 @@ oimo.common.Mat3 = class oimo_common_Mat3 { let e10 = this.e01; let e20 = this.e02; let e21 = this.e12; - + this.e00 = this.e00; this.e01 = this.e10; this.e02 = this.e20; this.e10 = e10; - + this.e11 = this.e11; this.e12 = this.e21; this.e20 = e20; this.e21 = e21; - + this.e22 = this.e22; return this; } determinant() { @@ -14125,29 +14125,29 @@ oimo.common.Mat4 = class oimo_common_Mat4 { this.e21 *= sz; this.e22 *= sz; this.e23 *= sz; - - - - + this.e30 = this.e30; + this.e31 = this.e31; + this.e32 = this.e32; + this.e33 = this.e33; return this; } appendScaleEq(sx,sy,sz) { this.e00 *= sx; this.e01 *= sy; this.e02 *= sz; - + this.e03 = this.e03; this.e10 *= sx; this.e11 *= sy; this.e12 *= sz; - + this.e13 = this.e13; this.e20 *= sx; this.e21 *= sy; this.e22 *= sz; - + this.e23 = this.e23; this.e30 *= sx; this.e31 *= sy; this.e32 *= sz; - + this.e33 = this.e33; return this; } prependRotationEq(rad,axisX,axisY,axisZ) { @@ -14183,10 +14183,10 @@ oimo.common.Mat4 = class oimo_common_Mat4 { this.e21 = e21; this.e22 = e22; this.e23 = e23; - - - - + this.e30 = this.e30; + this.e31 = this.e31; + this.e32 = this.e32; + this.e33 = this.e33; return this; } appendRotationEq(rad,axisX,axisY,axisZ) { @@ -14213,19 +14213,19 @@ oimo.common.Mat4 = class oimo_common_Mat4 { this.e00 = this.e00 * r00 + this.e01 * r10 + this.e02 * r20; this.e01 = e01; this.e02 = e02; - + this.e03 = this.e03; this.e10 = this.e10 * r00 + this.e11 * r10 + this.e12 * r20; this.e11 = e11; this.e12 = e12; - + this.e13 = this.e13; this.e20 = this.e20 * r00 + this.e21 * r10 + this.e22 * r20; this.e21 = e21; this.e22 = e22; - + this.e23 = this.e23; this.e30 = this.e30 * r00 + this.e31 * r10 + this.e32 * r20; this.e31 = e31; this.e32 = e32; - + this.e33 = this.e33; return this; } prependTranslationEq(tx,ty,tz) { @@ -14241,10 +14241,10 @@ oimo.common.Mat4 = class oimo_common_Mat4 { this.e21 += tz * this.e31; this.e22 += tz * this.e32; this.e23 += tz * this.e33; - - - - + this.e30 = this.e30; + this.e31 = this.e31; + this.e32 = this.e32; + this.e33 = this.e33; return this; } appendTranslationEq(tx,ty,tz) { @@ -14252,25 +14252,21 @@ oimo.common.Mat4 = class oimo_common_Mat4 { let e13 = this.e10 * tx + this.e11 * ty + this.e12 * tz + this.e13; let e23 = this.e20 * tx + this.e21 * ty + this.e22 * tz + this.e23; let e33 = this.e30 * tx + this.e31 * ty + this.e32 * tz + this.e33; - - - - + this.e00 = this.e00; + this.e01 = this.e01; + this.e02 = this.e02; this.e03 = e03; - - - - + this.e10 = this.e10; + this.e11 = this.e11; + this.e12 = this.e12; this.e13 = e13; - - - - + this.e20 = this.e20; + this.e21 = this.e21; + this.e22 = this.e22; this.e23 = e23; - - - - + this.e30 = this.e30; + this.e31 = this.e31; + this.e32 = this.e32; this.e33 = e33; return this; } @@ -14284,22 +14280,22 @@ oimo.common.Mat4 = class oimo_common_Mat4 { let e30 = this.e03; let e31 = this.e13; let e32 = this.e23; - + this.e00 = this.e00; this.e01 = this.e10; this.e02 = this.e20; this.e03 = this.e30; this.e10 = e10; - + this.e11 = this.e11; this.e12 = this.e21; this.e13 = this.e31; this.e20 = e20; this.e21 = e21; - + this.e22 = this.e22; this.e23 = this.e32; this.e30 = e30; this.e31 = e31; this.e32 = e32; - + this.e33 = this.e33; return this; } determinant() { @@ -16167,10 +16163,10 @@ oimo.dynamics.World = class oimo_dynamics_World { this._shapeIdCount = 0; } _updateContacts() { - let st = Date.now() / 1000; + let st = HxOverrides.now() / 1000; this._contactManager._updateContacts(); - oimo.dynamics.common.Performance.broadPhaseCollisionTime = (Date.now() / 1000 - st) * 1000; - let st1 = Date.now() / 1000; + oimo.dynamics.common.Performance.broadPhaseCollisionTime = (HxOverrides.now() / 1000 - st) * 1000; + let st1 = HxOverrides.now() / 1000; let c = this._contactManager._contactList; while(c != null) { let n = c._next; @@ -16179,10 +16175,10 @@ oimo.dynamics.World = class oimo_dynamics_World { } c = n; } - oimo.dynamics.common.Performance.narrowPhaseCollisionTime = (Date.now() / 1000 - st1) * 1000; + oimo.dynamics.common.Performance.narrowPhaseCollisionTime = (HxOverrides.now() / 1000 - st1) * 1000; } _solveIslands() { - let st = Date.now() / 1000; + let st = HxOverrides.now() / 1000; if(oimo.common.Setting.disableSleeping) { let b = this._rigidBodyList; while(b != null) { @@ -16240,7 +16236,7 @@ oimo.dynamics.World = class oimo_dynamics_World { this._solversInIslands[--this._numSolversInIslands]._addedToIsland = false; this._solversInIslands[this._numSolversInIslands] = null; } - oimo.dynamics.common.Performance.dynamicsTime = (Date.now() / 1000 - st) * 1000; + oimo.dynamics.common.Performance.dynamicsTime = (HxOverrides.now() / 1000 - st) * 1000; } buildIsland(base) { let stackCount = 1; @@ -17880,10 +17876,10 @@ oimo.dynamics.World = class oimo_dynamics_World { } this._timeStep.dt = timeStep; this._timeStep.invDt = 1 / timeStep; - let st = Date.now() / 1000; + let st = HxOverrides.now() / 1000; this._updateContacts(); this._solveIslands(); - oimo.dynamics.common.Performance.totalTime = (Date.now() / 1000 - st) * 1000; + oimo.dynamics.common.Performance.totalTime = (HxOverrides.now() / 1000 - st) * 1000; } addRigidBody(rigidBody) { if(rigidBody._world != null) { @@ -18719,7 +18715,7 @@ oimo.dynamics.common.DebugDraw = class oimo_dynamics_common_DebugDraw { _this2.x *= radiusX; _this2.y *= radiusX; _this2.z *= radiusX; - + ex = _this2; let _this3 = this.p; let _this4 = _this3.sizeVec3 == 0 ? new oimo.common.Vec3() : _this3.stackVec3[--_this3.sizeVec3]; _this4.x = ey.x; @@ -18729,7 +18725,7 @@ oimo.dynamics.common.DebugDraw = class oimo_dynamics_common_DebugDraw { _this5.x *= radiusY; _this5.y *= radiusY; _this5.z *= radiusY; - + ey = _this5; let angDiff = endAngle - startAngle; if(angDiff < 0) { angDiff = -angDiff; @@ -19092,7 +19088,7 @@ oimo.dynamics.common.DebugDraw = class oimo_dynamics_common_DebugDraw { _this2.x = -_this2.x; _this2.y = -_this2.y; _this2.z = -_this2.z; - + n1 = _this2; this.triangle(_this10,v2,v3,_this2,_this2,_this2,color); let _this3 = this.p; if(_this2 != null) { @@ -19558,12 +19554,12 @@ oimo.dynamics.common.DebugDraw = class oimo_dynamics_common_DebugDraw { let _g1 = 0; while(_g1 < 8) { let i = _g1++; - let v1; + let v1 = _this7; let v2 = this.tmpCircleVerts1[i]; let v3 = this.tmpCircleVerts1[(i + 1) % 8]; let n1 = ey; this.triangle(_this7,v2,v3,n1,n1,n1,color); - + v1 = _this10; v2 = this.tmpCircleVerts2[(i + 1) % 8]; v3 = this.tmpCircleVerts2[i]; let _this = this.p; @@ -19575,7 +19571,7 @@ oimo.dynamics.common.DebugDraw = class oimo_dynamics_common_DebugDraw { _this2.x = -_this2.x; _this2.y = -_this2.y; _this2.z = -_this2.z; - + n1 = _this2; this.triangle(_this10,v2,v3,_this2,_this2,_this2,color); let _this3 = this.p; if(_this2 != null) { @@ -21657,7 +21653,7 @@ oimo.dynamics.constraint.contact.ManifoldUpdater = class oimo_dynamics_constrain maxDepthIndex = 2; } if(p4._depth > maxDepth) { - + maxDepth = p4._depth; maxDepthIndex = 3; } let rp1X; @@ -21948,7 +21944,7 @@ oimo.dynamics.constraint.contact.ManifoldUpdater = class oimo_dynamics_constrain target = 2; } if(a4 > max && maxDepthIndex != 3) { - + max = a4; target = 3; } return target; @@ -26451,13 +26447,13 @@ oimo.dynamics.constraint.joint.RagdollJoint = class oimo_dynamics_constraint_joi swingVX *= invLen * this._swingAngle; swingVY *= invLen * this._swingAngle; swingVZ *= invLen * this._swingAngle; - + let __tmp__X1; let __tmp__Y1; let __tmp__Z1; - + __tmp__X1 = basis1Mat00 * swingVX + basis1Mat10 * swingVY + basis1Mat20 * swingVZ; __tmp__Y1 = basis1Mat01 * swingVX + basis1Mat11 * swingVY + basis1Mat21 * swingVZ; __tmp__Z1 = basis1Mat02 * swingVX + basis1Mat12 * swingVY + basis1Mat22 * swingVZ; - + swingVX = __tmp__X1; swingVY = __tmp__Y1; swingVZ = __tmp__Z1; let x1 = swingVY; @@ -29741,7 +29737,7 @@ oimo.dynamics.constraint.solver.direct.MassMatrix = class oimo_dynamics_constrai let _g3 = this._maxSubmatrixId; while(_g2 < _g3) { let i = _g2++; - let t; + let t = i; t = (i & 85) + (i >> 1 & 85); t = (t & 51) + (t >> 2 & 51); t = (t & 15) + (t >> 4 & 15); @@ -36183,24 +36179,6 @@ oimo.dynamics.rigidbody.RigidBody = class oimo_dynamics_rigidbody_RigidBody { } } removeShape(shape) { - let prev = shape._prev; - let next = shape._next; - if(prev != null) { - prev._next = next; - } - if(next != null) { - next._prev = prev; - } - if(shape == this._shapeList) { - this._shapeList = this._shapeList._next; - } - if(shape == this._shapeListLast) { - this._shapeListLast = this._shapeListLast._prev; - } - shape._next = null; - shape._prev = null; - this._numShapes--; - shape._rigidBody = null; if(this._world != null) { let _this = this._world; _this._broadPhase.destroyProxy(shape._proxy); @@ -36305,6 +36283,24 @@ oimo.dynamics.rigidbody.RigidBody = class oimo_dynamics_rigidbody_RigidBody { } _this._numShapes--; } + let prev = shape._prev; + let next = shape._next; + if(prev != null) { + prev._next = next; + } + if(next != null) { + next._prev = prev; + } + if(shape == this._shapeList) { + this._shapeList = this._shapeList._next; + } + if(shape == this._shapeListLast) { + this._shapeListLast = this._shapeListLast._prev; + } + shape._next = null; + shape._prev = null; + this._numShapes--; + shape._rigidBody = null; this.updateMass(); let s = this._shapeList; while(s != null) { @@ -36949,7 +36945,11 @@ oimo.dynamics.rigidbody.ShapeConfig = class oimo_dynamics_rigidbody_ShapeConfig if(!oimo.m) oimo.m = {}; oimo.m.M = class oimo_m_M { } - +if(typeof(performance) != "undefined" ? typeof(performance.now) == "function" : false) { + HxOverrides.now = performance.now.bind(performance); +} +{ +} oimo.collision.broadphase.BroadPhaseType._BRUTE_FORCE = 1; oimo.collision.broadphase.BroadPhaseType._BVH = 2; oimo.collision.broadphase.BroadPhaseType.BRUTE_FORCE = 1; diff --git a/build-doc.hxml b/build-doc.hxml index 5cf9dab..c36b50e 100644 --- a/build-doc.hxml +++ b/build-doc.hxml @@ -4,4 +4,4 @@ -main export.Export --interp -xml docs/doc.xml --cmd haxelib run dox -i docs/doc.xml -o docs -in "oimo.(collision|common|dynamics)" -ex "oimo.dynamics.constraint.(info|solver.common)" --title "OimoPhysics API documentation" -D website https://github.com/saharan/OimoPhysics -D source-path https://github.com/saharan/OimoPhysics/tree/master/src/ -D description "OimoPhysics API Documentation" -D version 1.2.2 +-cmd haxelib run dox -i docs/doc.xml -o docs -in "oimo.(collision|common|dynamics)" -ex "oimo.dynamics.constraint.(info|solver.common)" --title "OimoPhysics API documentation" -D website https://github.com/saharan/OimoPhysics -D source-path https://github.com/saharan/OimoPhysics/tree/master/src/ -D description "OimoPhysics API Documentation" -D version 1.2.4 diff --git a/docs/404.html b/docs/404.html index 2d22163..c8208f1 100644 --- a/docs/404.html +++ b/docs/404.html @@ -1 +1 @@ -File not found - OimoPhysics API documentation

404 Page not found

Page not found, sorry.

\ No newline at end of file +File not found - OimoPhysics API documentation

404 Page not found

Page not found, sorry.

\ No newline at end of file diff --git a/docs/doc.xml b/docs/doc.xml index 9a2ca26..c4e7902 100644 --- a/docs/doc.xml +++ b/docs/doc.xml @@ -2441,7 +2441,10 @@
- + + + +
* this class just imports all the classes in the library
@@ -3137,17 +3140,6 @@ @see https://haxe.org/manual/std-vector.html - - The IO is set into nonblocking mode and some data cannot be read or written - An integer value is outside its allowed range - An operation on Bytes is outside of its valid range - - - Other errors - - The possible IO errors that can occur - - @@ -3320,6 +3312,17 @@ + + The IO is set into nonblocking mode and some data cannot be read or written + An integer value is outside its allowed range + An operation on Bytes is outside of its valid range + + + Other errors + + The possible IO errors that can occur + + An Input is an abstract reader. See other classes in the `haxe.io` package for several possible implementations. @@ -14642,14 +14645,6 @@ * Expression Macro - - - - - - - - Use `sys.io.File.read` to create a `FileInput`. @@ -14658,18 +14653,6 @@ - - - - - - - - - - - - Use `sys.io.File.write` to create a `FileOutput`. diff --git a/docs/index.html b/docs/index.html index 941ed8d..e1567a7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,4 +6,4 @@ display: inline-block; float: none; text-shadow: 0 0 0 transparent; -

top level version 1.2.2

OimoPhysics API Documentation

oimo
\ No newline at end of file +

top level version 1.2.4

OimoPhysics API Documentation

oimo
\ No newline at end of file diff --git a/docs/oimo/collision/broadphase/BroadPhase.html b/docs/oimo/collision/broadphase/BroadPhase.html index 0ca6d67..4b51d85 100644 --- a/docs/oimo/collision/broadphase/BroadPhase.html +++ b/docs/oimo/collision/broadphase/BroadPhase.html @@ -19,4 +19,4 @@ than the containing AABBs, two proxies may overlap even though their inner AABBs are separate.

moveProxy(proxy:Proxy, aabb:Aabb, displacement:Vec3):Void

Moves the proxy proxy to the axis-aligned bounding box aabb. displacement is the difference between current and previous center of the AABB. This is used for predicting movement of the proxy.

rayCast(begin:Vec3, end:Vec3, callback:BroadPhaseProxyCallback):Void

Performs a ray casting. callback.process is called for all proxies the line segment -from begin to end intersects.

\ No newline at end of file +from begin to end intersects.

\ No newline at end of file diff --git a/docs/oimo/collision/broadphase/BroadPhaseProxyCallback.html b/docs/oimo/collision/broadphase/BroadPhaseProxyCallback.html index 51b5e27..d7d5828 100644 --- a/docs/oimo/collision/broadphase/BroadPhaseProxyCallback.html +++ b/docs/oimo/collision/broadphase/BroadPhaseProxyCallback.html @@ -6,4 +6,4 @@ display: inline-block; float: none; text-shadow: 0 0 0 transparent; -

A callback class for queries in a broad phase.

Constructor

new()

Default constructor.

Methods

process(proxy:Proxy):Void

This is called every time a broad phase algorithm reports a proxy proxy.

\ No newline at end of file +

A callback class for queries in a broad phase.

Constructor

new()

Default constructor.

Methods

process(proxy:Proxy):Void

This is called every time a broad phase algorithm reports a proxy proxy.

\ No newline at end of file diff --git a/docs/oimo/collision/broadphase/BroadPhaseType.html b/docs/oimo/collision/broadphase/BroadPhaseType.html index 7130b27..ee55fcc 100644 --- a/docs/oimo/collision/broadphase/BroadPhaseType.html +++ b/docs/oimo/collision/broadphase/BroadPhaseType.html @@ -7,4 +7,4 @@ float: none; text-shadow: 0 0 0 transparent;

Types of broad-phase algorithms.

Static variables

@:value(_BRUTE_FORCE)staticread onlyBRUTE_FORCE:Int = _BRUTE_FORCE

The brute force algorithm searches all the possible pairs of the proxies every time. -This is very slow and so users should not choose this algorithm without exceptional reasons.

@:value(_BVH)staticread onlyBVH:Int = _BVH

The BVH algorithm uses bounding volume hierarchy for detecting overlapping pairs of proxies efficiently.

\ No newline at end of file +This is very slow and so users should not choose this algorithm without exceptional reasons.

@:value(_BVH)staticread onlyBVH:Int = _BVH

The BVH algorithm uses bounding volume hierarchy for detecting overlapping pairs of proxies efficiently.

\ No newline at end of file diff --git a/docs/oimo/collision/broadphase/Proxy.html b/docs/oimo/collision/broadphase/Proxy.html index 7980a4b..085feb9 100644 --- a/docs/oimo/collision/broadphase/Proxy.html +++ b/docs/oimo/collision/broadphase/Proxy.html @@ -13,4 +13,4 @@ a proxy through BroadPhase class.

Variables

userData:Any

Extra field that users can use for their own purposes. Do not modify this property if you use the physics part of the library, as the physics part of the library uses this property for connecting proxies and shapes of rigid bodies.

Methods

getFatAabb():Aabb

Returns the fat AABB of the proxy.

getFatAabbTo(aabb:Aabb):Void

Sets aabb to the fat AABB of the proxy.

-

This does not create a new instance of Aabb.

getId():Int

Returns the unique id of the proxy.

\ No newline at end of file +

This does not create a new instance of Aabb.

getId():Int

Returns the unique id of the proxy.

\ No newline at end of file diff --git a/docs/oimo/collision/broadphase/ProxyPair.html b/docs/oimo/collision/broadphase/ProxyPair.html index b644355..fb6dd0e 100644 --- a/docs/oimo/collision/broadphase/ProxyPair.html +++ b/docs/oimo/collision/broadphase/ProxyPair.html @@ -8,4 +8,4 @@ float: none; text-shadow: 0 0 0 transparent;

A pair between two proxies. Broad-phase collision algorithms collect pairs of proxies -as linked list of ProxyPair.

Methods

getNext():ProxyPair

Returns the next pair.

getProxy1():Proxy

Returns the first proxy of the pair.

getProxy2():Proxy

Returns the second proxy of the pair.

\ No newline at end of file +as linked list of ProxyPair.

Methods

getNext():ProxyPair

Returns the next pair.

getProxy1():Proxy

Returns the first proxy of the pair.

getProxy2():Proxy

Returns the second proxy of the pair.

\ No newline at end of file diff --git a/docs/oimo/collision/broadphase/bruteforce/BruteForceBroadPhase.html b/docs/oimo/collision/broadphase/bruteforce/BruteForceBroadPhase.html index 3732ea4..a0b121f 100644 --- a/docs/oimo/collision/broadphase/bruteforce/BruteForceBroadPhase.html +++ b/docs/oimo/collision/broadphase/bruteforce/BruteForceBroadPhase.html @@ -9,4 +9,4 @@

Brute force implementation of broad-phase collision detection. Time complexity is O(n^2).

Methods

Inherited Variables

Inherited Methods

Defined by BroadPhase

inlinegetProxyPairList():ProxyPair

Returns the linked list of collected pairs of proxies.

inlinegetTestCount():Int

Returns the number of broad-phase AABB tests.

inlineisIncremental():Bool

Returns whether to collect only pairs created in the last step. If this returns true, the pairs that are not collected might still be overlapping. Otherwise, such pairs are guaranteed to be separated.

inlineisOverlapping(proxy1:Proxy, proxy2:Proxy):Bool

Returns whether the pair of proxy1 and proxy2 is overlapping. As proxies can be larger -than the containing AABBs, two proxies may overlap even though their inner AABBs are separate.

\ No newline at end of file +than the containing AABBs, two proxies may overlap even though their inner AABBs are separate.

\ No newline at end of file diff --git a/docs/oimo/collision/broadphase/bruteforce/index.html b/docs/oimo/collision/broadphase/bruteforce/index.html index 3750dc5..1ae4351 100644 --- a/docs/oimo/collision/broadphase/bruteforce/index.html +++ b/docs/oimo/collision/broadphase/bruteforce/index.html @@ -6,4 +6,4 @@ display: inline-block; float: none; text-shadow: 0 0 0 transparent; -

oimo.collision.broadphase.bruteforce

OimoPhysics API Documentation

..
BruteForceBroadPhase

Brute force implementation of broad-phase collision detection. Time complexity is O(n^2).

\ No newline at end of file +

oimo.collision.broadphase.bruteforce

OimoPhysics API Documentation

..
BruteForceBroadPhase

Brute force implementation of broad-phase collision detection. Time complexity is O(n^2).

\ No newline at end of file diff --git a/docs/oimo/collision/broadphase/bvh/BvhBroadPhase.html b/docs/oimo/collision/broadphase/bvh/BvhBroadPhase.html index 4353122..afd1fed 100644 --- a/docs/oimo/collision/broadphase/bvh/BvhBroadPhase.html +++ b/docs/oimo/collision/broadphase/bvh/BvhBroadPhase.html @@ -11,4 +11,4 @@ Average time complexity is O(NlogN) or lower.

Methods

inlinegetTreeBalance():Int

Returns the balance of the bounding volume tree.

Inherited Variables

Inherited Methods

Defined by BroadPhase

inlinegetProxyPairList():ProxyPair

Returns the linked list of collected pairs of proxies.

inlinegetTestCount():Int

Returns the number of broad-phase AABB tests.

inlineisIncremental():Bool

Returns whether to collect only pairs created in the last step. If this returns true, the pairs that are not collected might still be overlapping. Otherwise, such pairs are guaranteed to be separated.

inlineisOverlapping(proxy1:Proxy, proxy2:Proxy):Bool

Returns whether the pair of proxy1 and proxy2 is overlapping. As proxies can be larger -than the containing AABBs, two proxies may overlap even though their inner AABBs are separate.

\ No newline at end of file +than the containing AABBs, two proxies may overlap even though their inner AABBs are separate.

\ No newline at end of file diff --git a/docs/oimo/collision/broadphase/bvh/index.html b/docs/oimo/collision/broadphase/bvh/index.html index b40c24b..1700cb2 100644 --- a/docs/oimo/collision/broadphase/bvh/index.html +++ b/docs/oimo/collision/broadphase/bvh/index.html @@ -7,4 +7,4 @@ float: none; text-shadow: 0 0 0 transparent;

oimo.collision.broadphase.bvh

OimoPhysics API Documentation

..
BvhBroadPhase

The broad-phase collision detection algorithm based on bounding volume hierarchy (BVH). -Average time complexity is O(NlogN) or lower.

\ No newline at end of file +Average time complexity is O(NlogN) or lower.

\ No newline at end of file diff --git a/docs/oimo/collision/broadphase/index.html b/docs/oimo/collision/broadphase/index.html index 0c7b55e..76641a9 100644 --- a/docs/oimo/collision/broadphase/index.html +++ b/docs/oimo/collision/broadphase/index.html @@ -9,4 +9,4 @@

oimo.collision.broadphase

OimoPhysics API Documentation

..
bruteforce
bvh
BroadPhase

The abstract class of a broad-phase collision detection algorithm.

BroadPhaseProxyCallback

A callback class for queries in a broad phase.

BroadPhaseType

Types of broad-phase algorithms.

Proxy

A proxy is an object that can be added to a broad-phase collision detection algorithm. Users of the collision part of the library can move an axis-aligned bounding box of a proxy through BroadPhase class.

ProxyPair

A pair between two proxies. Broad-phase collision algorithms collect pairs of proxies -as linked list of ProxyPair.

\ No newline at end of file +as linked list of ProxyPair.

\ No newline at end of file diff --git a/docs/oimo/collision/geometry/Aabb.html b/docs/oimo/collision/geometry/Aabb.html index a43930f..8268805 100644 --- a/docs/oimo/collision/geometry/Aabb.html +++ b/docs/oimo/collision/geometry/Aabb.html @@ -12,4 +12,4 @@

This does not create a new instance of Aabb.

inlinegetMax():Vec3

Returns the maximum point of the axis-aligned bounding box.

inlinegetMaxTo(max:Vec3):Void

Sets the maximum point of the axis-aligned bounding box to max.

This does not create a new instance of Vec3.

inlinegetMin():Vec3

Returns the minimum point of the axis-aligned bounding box.

inlinegetMinTo(min:Vec3):Void

Sets the minimum point of the axis-aligned bounding box to min.

This does not create a new instance of Vec3.

inlineinit(min:Vec3, max:Vec3):Aabb

Sets the minimum and maximum point and returns this.

-

Equivallent to setMin(min).setMax(max).

inlineoverlap(other:Aabb):Bool

Returns whether this and other intersect.

inlinesetMax(max:Vec3):Aabb

Sets the maximum point of the axis-aligned bounding box to max and returns this.

inlinesetMin(min:Vec3):Aabb

Sets the minimum point of the axis-aligned bounding box to min and returns this.

\ No newline at end of file +

Equivallent to setMin(min).setMax(max).

inlineoverlap(other:Aabb):Bool

Returns whether this and other intersect.

inlinesetMax(max:Vec3):Aabb

Sets the maximum point of the axis-aligned bounding box to max and returns this.

inlinesetMin(min:Vec3):Aabb

Sets the minimum point of the axis-aligned bounding box to min and returns this.

\ No newline at end of file diff --git a/docs/oimo/collision/geometry/BoxGeometry.html b/docs/oimo/collision/geometry/BoxGeometry.html index 1bbd888..6ad5b20 100644 --- a/docs/oimo/collision/geometry/BoxGeometry.html +++ b/docs/oimo/collision/geometry/BoxGeometry.html @@ -7,4 +7,4 @@ float: none; text-shadow: 0 0 0 transparent;

A box collision geometry.

Constructor

new(halfExtents:Vec3)

Creates a box collision geometry of half-extents halfExtents.

Methods

inlinegetHalfExtents():Vec3

Returns the half-extents of the box.

inlinegetHalfExtentsTo(halfExtents:Vec3):Void

Sets halfExtents to the half-extents of the box.

Inherited Variables

Inherited Methods

Defined by ConvexGeometry

inlinegetGjkMergin():Float

Returns the GJK mergin around the "core" of the convex geometry.

inlinesetGjkMergin(gjkMergin:Float):Void

Sets the GJK mergin around the "core" to gjkMergin.

Defined by Geometry

inlinegetType():Int

Returns the type of the collision geometry.

-

See GeometryType for details.

inlinegetVolume():Float

Returns the volume of the collision geometry.

\ No newline at end of file +

See GeometryType for details.

inlinegetVolume():Float

Returns the volume of the collision geometry.

\ No newline at end of file diff --git a/docs/oimo/collision/geometry/CapsuleGeometry.html b/docs/oimo/collision/geometry/CapsuleGeometry.html index f9adc4e..4a2b72a 100644 --- a/docs/oimo/collision/geometry/CapsuleGeometry.html +++ b/docs/oimo/collision/geometry/CapsuleGeometry.html @@ -7,4 +7,4 @@ float: none; text-shadow: 0 0 0 transparent;

A capsule collision geometry aligned with the y-axis.

Constructor

new(radius:Float, halfHeight:Float)

Creates a capsule collision geometry of radius radius and half-height halfHeight.

Methods

inlinegetHalfHeight():Float

Returns the half-height of the capsule.

inlinegetRadius():Float

Returns the radius of the capsule.

Inherited Variables

Inherited Methods

Defined by ConvexGeometry

inlinegetGjkMergin():Float

Returns the GJK mergin around the "core" of the convex geometry.

inlinesetGjkMergin(gjkMergin:Float):Void

Sets the GJK mergin around the "core" to gjkMergin.

Defined by Geometry

inlinegetType():Int

Returns the type of the collision geometry.

-

See GeometryType for details.

inlinegetVolume():Float

Returns the volume of the collision geometry.

\ No newline at end of file +

See GeometryType for details.

inlinegetVolume():Float

Returns the volume of the collision geometry.

\ No newline at end of file diff --git a/docs/oimo/collision/geometry/ConeGeometry.html b/docs/oimo/collision/geometry/ConeGeometry.html index b5190b6..990993d 100644 --- a/docs/oimo/collision/geometry/ConeGeometry.html +++ b/docs/oimo/collision/geometry/ConeGeometry.html @@ -7,4 +7,4 @@ float: none; text-shadow: 0 0 0 transparent;

A cone collision geometry aligned with the y-axis.

Constructor

new(radius:Float, halfHeight:Float)

Creates a cone collision geometry of radius radius and half-height halfHeight.

Methods

inlinegetHalfHeight():Float

Returns the half-height of the cone.

inlinegetRadius():Float

Returns the radius of the cone.

Inherited Variables

Inherited Methods

Defined by ConvexGeometry

inlinegetGjkMergin():Float

Returns the GJK mergin around the "core" of the convex geometry.

inlinesetGjkMergin(gjkMergin:Float):Void

Sets the GJK mergin around the "core" to gjkMergin.

Defined by Geometry

inlinegetType():Int

Returns the type of the collision geometry.

-

See GeometryType for details.

inlinegetVolume():Float

Returns the volume of the collision geometry.

\ No newline at end of file +

See GeometryType for details.

inlinegetVolume():Float

Returns the volume of the collision geometry.

\ No newline at end of file diff --git a/docs/oimo/collision/geometry/ConvexGeometry.html b/docs/oimo/collision/geometry/ConvexGeometry.html index 07d3cfe..72e6e68 100644 --- a/docs/oimo/collision/geometry/ConvexGeometry.html +++ b/docs/oimo/collision/geometry/ConvexGeometry.html @@ -9,4 +9,4 @@

Abstract class of the convex collision geometries supported by GJK/EPA collision detection.

Methods

computeLocalSupportingVertex(dir:Vec3, out:Vec3):Void

Computes supporting vertex of the "core" of the geometry in local coordinates. Note that the direction vector dir might not be normalized. out is set to the computed supporting vertex.

inlinegetGjkMergin():Float

Returns the GJK mergin around the "core" of the convex geometry.

inlinesetGjkMergin(gjkMergin:Float):Void

Sets the GJK mergin around the "core" to gjkMergin.

Inherited Variables

Inherited Methods

Defined by Geometry

inlinegetType():Int

Returns the type of the collision geometry.

-

See GeometryType for details.

inlinegetVolume():Float

Returns the volume of the collision geometry.

\ No newline at end of file +

See GeometryType for details.

inlinegetVolume():Float

Returns the volume of the collision geometry.

\ No newline at end of file diff --git a/docs/oimo/collision/geometry/ConvexHullGeometry.html b/docs/oimo/collision/geometry/ConvexHullGeometry.html index e25cf0c..ab0734c 100644 --- a/docs/oimo/collision/geometry/ConvexHullGeometry.html +++ b/docs/oimo/collision/geometry/ConvexHullGeometry.html @@ -9,4 +9,4 @@ text-shadow: 0 0 0 transparent;

A convex hull collision geometry. A convex hull of the vertices is the smallest convex polyhedron which contains all vertices.

Constructor

new(vertices:Array<Vec3>)

Creates a convex hull collision geometry of the vertices vertices.

Methods

inlinegetVertices():Vector<Vec3>

Returns the vertices of the convex hull.

Inherited Variables

Inherited Methods

Defined by ConvexGeometry

inlinegetGjkMergin():Float

Returns the GJK mergin around the "core" of the convex geometry.

inlinesetGjkMergin(gjkMergin:Float):Void

Sets the GJK mergin around the "core" to gjkMergin.

Defined by Geometry

inlinegetType():Int

Returns the type of the collision geometry.

-

See GeometryType for details.

inlinegetVolume():Float

Returns the volume of the collision geometry.

\ No newline at end of file +

See GeometryType for details.

inlinegetVolume():Float

Returns the volume of the collision geometry.

\ No newline at end of file diff --git a/docs/oimo/collision/geometry/CylinderGeometry.html b/docs/oimo/collision/geometry/CylinderGeometry.html index 71d7ace..efe2d04 100644 --- a/docs/oimo/collision/geometry/CylinderGeometry.html +++ b/docs/oimo/collision/geometry/CylinderGeometry.html @@ -7,4 +7,4 @@ float: none; text-shadow: 0 0 0 transparent;

A cylinder collision geometry aligned with the y-axis.

Constructor

new(radius:Float, halfHeight:Float)

Creates a cylinder collision geometry of radius radius and half-height halfHeight.

Methods

inlinegetHalfHeight():Float

Returns the half-height of the cylinder.

inlinegetRadius():Float

Returns the radius of the cylinder.

Inherited Variables

Inherited Methods

Defined by ConvexGeometry

inlinegetGjkMergin():Float

Returns the GJK mergin around the "core" of the convex geometry.

inlinesetGjkMergin(gjkMergin:Float):Void

Sets the GJK mergin around the "core" to gjkMergin.

Defined by Geometry

inlinegetType():Int

Returns the type of the collision geometry.

-

See GeometryType for details.

inlinegetVolume():Float

Returns the volume of the collision geometry.

\ No newline at end of file +

See GeometryType for details.

inlinegetVolume():Float

Returns the volume of the collision geometry.

\ No newline at end of file diff --git a/docs/oimo/collision/geometry/Geometry.html b/docs/oimo/collision/geometry/Geometry.html index bcc4d14..d904104 100644 --- a/docs/oimo/collision/geometry/Geometry.html +++ b/docs/oimo/collision/geometry/Geometry.html @@ -9,4 +9,4 @@

Abstract collision geometry.

Methods

inlinegetType():Int

Returns the type of the collision geometry.

See GeometryType for details.

inlinegetVolume():Float

Returns the volume of the collision geometry.

rayCast(begin:Vec3, end:Vec3, transform:Transform, hit:RayCastHit):Bool

Performs ray casting. Returns true and sets the result information to hit if the line segment from begin to end and the geometry transformed by transform -intersect. Returns false if the line segment and the geometry do not intersect.

\ No newline at end of file +intersect. Returns false if the line segment and the geometry do not intersect.

\ No newline at end of file diff --git a/docs/oimo/collision/geometry/GeometryType.html b/docs/oimo/collision/geometry/GeometryType.html index 9721b08..ae71c85 100644 --- a/docs/oimo/collision/geometry/GeometryType.html +++ b/docs/oimo/collision/geometry/GeometryType.html @@ -12,4 +12,4 @@

See ConeGeometry.

@:value(_CONVEX_HULL)staticread onlyCONVEX_HULL:Int = _CONVEX_HULL

Represents a convex hull collision geometry.

See ConvexHullGeometry.

@:value(_CYLINDER)staticread onlyCYLINDER:Int = _CYLINDER

Represents a cylinder collision geometry.

See CylinderGeometry.

@:value(_SPHERE)staticread onlySPHERE:Int = _SPHERE

Represents a sphere collision geometry.

-

See SphereGeometry.

\ No newline at end of file +

See SphereGeometry.

\ No newline at end of file diff --git a/docs/oimo/collision/geometry/RayCastHit.html b/docs/oimo/collision/geometry/RayCastHit.html index cba2837..bd78df9 100644 --- a/docs/oimo/collision/geometry/RayCastHit.html +++ b/docs/oimo/collision/geometry/RayCastHit.html @@ -6,4 +6,4 @@ display: inline-block; float: none; text-shadow: 0 0 0 transparent; -

A single ray cast hit data.

Constructor

new()

Default constructor.

Variables

fraction:Float

The ratio of the position the ray hit from the start point to the end point.

normal:Vec3

The normal vector of the surface the ray hit.

position:Vec3

The position the ray hit at.

\ No newline at end of file +

A single ray cast hit data.

Constructor

new()

Default constructor.

Variables

fraction:Float

The ratio of the position the ray hit from the start point to the end point.

normal:Vec3

The normal vector of the surface the ray hit.

position:Vec3

The position the ray hit at.

\ No newline at end of file diff --git a/docs/oimo/collision/geometry/SphereGeometry.html b/docs/oimo/collision/geometry/SphereGeometry.html index 2a133ea..749531c 100644 --- a/docs/oimo/collision/geometry/SphereGeometry.html +++ b/docs/oimo/collision/geometry/SphereGeometry.html @@ -7,4 +7,4 @@ float: none; text-shadow: 0 0 0 transparent;

A sphere collision geometry.

Constructor

new(radius:Float)

Creates a sphere collision geometry of radius radius.

Methods

inlinegetRadius():Float

Returns the radius of the sphere.

Inherited Variables

Inherited Methods

Defined by ConvexGeometry

inlinegetGjkMergin():Float

Returns the GJK mergin around the "core" of the convex geometry.

inlinesetGjkMergin(gjkMergin:Float):Void

Sets the GJK mergin around the "core" to gjkMergin.

Defined by Geometry

inlinegetType():Int

Returns the type of the collision geometry.

-

See GeometryType for details.

inlinegetVolume():Float

Returns the volume of the collision geometry.

\ No newline at end of file +

See GeometryType for details.

inlinegetVolume():Float

Returns the volume of the collision geometry.

\ No newline at end of file diff --git a/docs/oimo/collision/geometry/index.html b/docs/oimo/collision/geometry/index.html index 02ce60c..5335b18 100644 --- a/docs/oimo/collision/geometry/index.html +++ b/docs/oimo/collision/geometry/index.html @@ -7,4 +7,4 @@ float: none; text-shadow: 0 0 0 transparent;

oimo.collision.geometry

OimoPhysics API Documentation

..
Aabb

The axis-aligned bounding box.

BoxGeometry

A box collision geometry.

CapsuleGeometry

A capsule collision geometry aligned with the y-axis.

ConeGeometry

A cone collision geometry aligned with the y-axis.

ConvexGeometry

Abstract class of the convex collision geometries supported by GJK/EPA collision detection.

ConvexHullGeometry

A convex hull collision geometry. A convex hull of the vertices is the smallest convex -polyhedron which contains all vertices.

CylinderGeometry

A cylinder collision geometry aligned with the y-axis.

Geometry

Abstract collision geometry.

GeometryType

The list of collision geometry types.

RayCastHit

A single ray cast hit data.

SphereGeometry

A sphere collision geometry.

\ No newline at end of file +polyhedron which contains all vertices.

CylinderGeometry

A cylinder collision geometry aligned with the y-axis.

Geometry

Abstract collision geometry.

GeometryType

The list of collision geometry types.

RayCastHit

A single ray cast hit data.

SphereGeometry

A sphere collision geometry.

\ No newline at end of file diff --git a/docs/oimo/collision/index.html b/docs/oimo/collision/index.html index 0959a94..16fe3bf 100644 --- a/docs/oimo/collision/index.html +++ b/docs/oimo/collision/index.html @@ -6,4 +6,4 @@ display: inline-block; float: none; text-shadow: 0 0 0 transparent; -

oimo.collision

OimoPhysics API Documentation

..
broadphase
geometry
narrowphase
\ No newline at end of file +

oimo.collision

OimoPhysics API Documentation

..
broadphase
geometry
narrowphase
\ No newline at end of file diff --git a/docs/oimo/collision/narrowphase/CollisionMatrix.html b/docs/oimo/collision/narrowphase/CollisionMatrix.html index 95705a0..59617b3 100644 --- a/docs/oimo/collision/narrowphase/CollisionMatrix.html +++ b/docs/oimo/collision/narrowphase/CollisionMatrix.html @@ -9,4 +9,4 @@ text-shadow: 0 0 0 transparent;

CollisionMatrix provides corresponding collision detector for a pair of two geometries of given types.

Methods

inlinegetDetector(geomType1:Int, geomType2:Int):Detector

Returns an appropriate collision detector of two geometries of types geomType1 and geomType2.

-

This method is not symmetric, so getDetector(a, b) may not be equal to getDetector(b, a).

\ No newline at end of file +

This method is not symmetric, so getDetector(a, b) may not be equal to getDetector(b, a).

\ No newline at end of file diff --git a/docs/oimo/collision/narrowphase/DetectorResult.html b/docs/oimo/collision/narrowphase/DetectorResult.html index fcb5b43..12704b5 100644 --- a/docs/oimo/collision/narrowphase/DetectorResult.html +++ b/docs/oimo/collision/narrowphase/DetectorResult.html @@ -10,4 +10,4 @@

The result of narrow-phase collision detection. This is used for generating contact points of a contact constraint at once or incrementally.

Constructor

new()

Default constructor.

Variables

incremental:Bool

Whether the result points are to be used for incremental menifold update.

normal:Vec3

The normal vector of the contact plane.

numPoints:Int

The number of the result points.

points:Vector<DetectorResultPoint>

The result points. Note that only the first DetectorResult.numPoints points are computed by the collision detector.

Methods

inlineclear():Void

Cleans up the result data.

getMaxDepth():Float

Returns the maximum depth of the result points. Returns 0.0 if no result -points are available.

\ No newline at end of file +points are available.

\ No newline at end of file diff --git a/docs/oimo/collision/narrowphase/DetectorResultPoint.html b/docs/oimo/collision/narrowphase/DetectorResultPoint.html index 04b0af9..d2c72c8 100644 --- a/docs/oimo/collision/narrowphase/DetectorResultPoint.html +++ b/docs/oimo/collision/narrowphase/DetectorResultPoint.html @@ -11,4 +11,4 @@

The result point is a pair of the closest points of collision geometries detected by a collision detector. This holds relative closest points for each collision geometry and the amount of the overlap.

Variables

depth:Float

The amount of the overlap. This becomes negative if two geometries are -separate.

id:Int

The identification of the result point.

position1:Vec3

The first collision geometry's closest point.

position2:Vec3

The second collision geometry's closest point.

\ No newline at end of file +separate.

id:Int

The identification of the result point.

position1:Vec3

The first collision geometry's closest point.

position2:Vec3

The second collision geometry's closest point.

\ No newline at end of file diff --git a/docs/oimo/collision/narrowphase/detector/BoxBoxDetector.html b/docs/oimo/collision/narrowphase/detector/BoxBoxDetector.html index a016d58..e2456ca 100644 --- a/docs/oimo/collision/narrowphase/detector/BoxBoxDetector.html +++ b/docs/oimo/collision/narrowphase/detector/BoxBoxDetector.html @@ -8,4 +8,4 @@ text-shadow: 0 0 0 transparent;

Box vs Box detector.

Constructor

new()

Default constructor.

Inherited Variables

Inherited Methods

Defined by Detector

detect(result:DetectorResult, geom1:Geometry, geom2:Geometry, transform1:Transform, transform2:Transform, cachedData:CachedDetectorData):Void

Computes the contact manifold of two collision geometries geom1 and geom2 with the transforms transform1 and transform2, and stores it to result. cachedData is used to improve performance -of collision detection in some detectors.

\ No newline at end of file +of collision detection in some detectors.

\ No newline at end of file diff --git a/docs/oimo/collision/narrowphase/detector/CapsuleCapsuleDetector.html b/docs/oimo/collision/narrowphase/detector/CapsuleCapsuleDetector.html index d054e14..089273a 100644 --- a/docs/oimo/collision/narrowphase/detector/CapsuleCapsuleDetector.html +++ b/docs/oimo/collision/narrowphase/detector/CapsuleCapsuleDetector.html @@ -8,4 +8,4 @@ text-shadow: 0 0 0 transparent;

Capsule vs Capsule detector.

Constructor

new()

Default constructor.

Inherited Variables

Inherited Methods

Defined by Detector

detect(result:DetectorResult, geom1:Geometry, geom2:Geometry, transform1:Transform, transform2:Transform, cachedData:CachedDetectorData):Void

Computes the contact manifold of two collision geometries geom1 and geom2 with the transforms transform1 and transform2, and stores it to result. cachedData is used to improve performance -of collision detection in some detectors.

\ No newline at end of file +of collision detection in some detectors.

\ No newline at end of file diff --git a/docs/oimo/collision/narrowphase/detector/Detector.html b/docs/oimo/collision/narrowphase/detector/Detector.html index c3df87a..c415f22 100644 --- a/docs/oimo/collision/narrowphase/detector/Detector.html +++ b/docs/oimo/collision/narrowphase/detector/Detector.html @@ -8,4 +8,4 @@ text-shadow: 0 0 0 transparent;

Interface of a collision detector for narrow-phase collision detection.

Methods

detect(result:DetectorResult, geom1:Geometry, geom2:Geometry, transform1:Transform, transform2:Transform, cachedData:CachedDetectorData):Void

Computes the contact manifold of two collision geometries geom1 and geom2 with the transforms transform1 and transform2, and stores it to result. cachedData is used to improve performance -of collision detection in some detectors.

\ No newline at end of file +of collision detection in some detectors.

\ No newline at end of file diff --git a/docs/oimo/collision/narrowphase/detector/GjkEpaDetector.html b/docs/oimo/collision/narrowphase/detector/GjkEpaDetector.html index 14996b3..11d383c 100644 --- a/docs/oimo/collision/narrowphase/detector/GjkEpaDetector.html +++ b/docs/oimo/collision/narrowphase/detector/GjkEpaDetector.html @@ -8,4 +8,4 @@ text-shadow: 0 0 0 transparent;

General convex collision detector using GJK/EPA

Constructor

new()

Default constructor.

Inherited Variables

Inherited Methods

Defined by Detector

detect(result:DetectorResult, geom1:Geometry, geom2:Geometry, transform1:Transform, transform2:Transform, cachedData:CachedDetectorData):Void

Computes the contact manifold of two collision geometries geom1 and geom2 with the transforms transform1 and transform2, and stores it to result. cachedData is used to improve performance -of collision detection in some detectors.

\ No newline at end of file +of collision detection in some detectors.

\ No newline at end of file diff --git a/docs/oimo/collision/narrowphase/detector/SphereBoxDetector.html b/docs/oimo/collision/narrowphase/detector/SphereBoxDetector.html index d4bda12..a872627 100644 --- a/docs/oimo/collision/narrowphase/detector/SphereBoxDetector.html +++ b/docs/oimo/collision/narrowphase/detector/SphereBoxDetector.html @@ -10,4 +10,4 @@ first and second argument of SphereBoxDetector.detect. If swapped is false, the collision detector expects SphereGeometry and BoxGeometry instead.

Inherited Variables

Inherited Methods

Defined by Detector

detect(result:DetectorResult, geom1:Geometry, geom2:Geometry, transform1:Transform, transform2:Transform, cachedData:CachedDetectorData):Void

Computes the contact manifold of two collision geometries geom1 and geom2 with the transforms transform1 and transform2, and stores it to result. cachedData is used to improve performance -of collision detection in some detectors.

\ No newline at end of file +of collision detection in some detectors.

\ No newline at end of file diff --git a/docs/oimo/collision/narrowphase/detector/SphereCapsuleDetector.html b/docs/oimo/collision/narrowphase/detector/SphereCapsuleDetector.html index d25b208..936bcac 100644 --- a/docs/oimo/collision/narrowphase/detector/SphereCapsuleDetector.html +++ b/docs/oimo/collision/narrowphase/detector/SphereCapsuleDetector.html @@ -10,4 +10,4 @@ first and second argument of SphereCapsuleDetector.detect. If swapped is false, the collision detector expects SphereGeometry and CapsuleGeometry instead.

Inherited Variables

Inherited Methods

Defined by Detector

detect(result:DetectorResult, geom1:Geometry, geom2:Geometry, transform1:Transform, transform2:Transform, cachedData:CachedDetectorData):Void

Computes the contact manifold of two collision geometries geom1 and geom2 with the transforms transform1 and transform2, and stores it to result. cachedData is used to improve performance -of collision detection in some detectors.

\ No newline at end of file +of collision detection in some detectors.

\ No newline at end of file diff --git a/docs/oimo/collision/narrowphase/detector/SphereSphereDetector.html b/docs/oimo/collision/narrowphase/detector/SphereSphereDetector.html index 9e61a55..8e3731f 100644 --- a/docs/oimo/collision/narrowphase/detector/SphereSphereDetector.html +++ b/docs/oimo/collision/narrowphase/detector/SphereSphereDetector.html @@ -8,4 +8,4 @@ text-shadow: 0 0 0 transparent;

Sphere vs Sphere detector.

Constructor

new()

Default constructor.

Inherited Variables

Inherited Methods

Defined by Detector

detect(result:DetectorResult, geom1:Geometry, geom2:Geometry, transform1:Transform, transform2:Transform, cachedData:CachedDetectorData):Void

Computes the contact manifold of two collision geometries geom1 and geom2 with the transforms transform1 and transform2, and stores it to result. cachedData is used to improve performance -of collision detection in some detectors.

\ No newline at end of file +of collision detection in some detectors.

\ No newline at end of file diff --git a/docs/oimo/collision/narrowphase/detector/gjkepa/GjkEpa.html b/docs/oimo/collision/narrowphase/detector/gjkepa/GjkEpa.html index b4ae871..714f7c7 100644 --- a/docs/oimo/collision/narrowphase/detector/gjkepa/GjkEpa.html +++ b/docs/oimo/collision/narrowphase/detector/gjkepa/GjkEpa.html @@ -23,4 +23,4 @@

Set the compiler option OIMO_GJK_EPA_DEBUG for debugging (warning: massive logging).

rayCast(c:ConvexGeometry, tf:Transform, begin:Vec3, end:Vec3, hit:RayCastHit):Bool

Performs ray cansting against the convex geometry c with transform tf. Returns true and sets the result information to hit if the line segment from begin to end intersects the convex geometry. Otherwise returns false.

-

Set the compiler option OIMO_GJK_EPA_DEBUG for debugging (warning: massive logging).

\ No newline at end of file +

Set the compiler option OIMO_GJK_EPA_DEBUG for debugging (warning: massive logging).

\ No newline at end of file diff --git a/docs/oimo/collision/narrowphase/detector/gjkepa/GjkEpaResultState.html b/docs/oimo/collision/narrowphase/detector/gjkepa/GjkEpaResultState.html index 4d1607a..40c40a8 100644 --- a/docs/oimo/collision/narrowphase/detector/gjkepa/GjkEpaResultState.html +++ b/docs/oimo/collision/narrowphase/detector/gjkepa/GjkEpaResultState.html @@ -6,4 +6,4 @@ display: inline-block; float: none; text-shadow: 0 0 0 transparent; -

The list of the state of a result of GjkEpa.computeClosestPoints.

Static variables

@:value(_EPA_DID_NOT_CONVERGE)staticread onlyEPA_DID_NOT_CONVERGE:Int = _EPA_DID_NOT_CONVERGE

EPA iterations did not converge in time.

@:value(_EPA_FAILED_TO_ADD_VERTEX)staticread onlyEPA_FAILED_TO_ADD_VERTEX:Int = _EPA_FAILED_TO_ADD_VERTEX

Failed to add a new vertex to the polyhedron in EPA computation.

@:value(_EPA_FAILED_TO_INIT)staticread onlyEPA_FAILED_TO_INIT:Int = _EPA_FAILED_TO_INIT

Failed to construct initial polyhedron in EPA construction.

@:value(_GJK_DID_NOT_CONVERGE)staticread onlyGJK_DID_NOT_CONVERGE:Int = _GJK_DID_NOT_CONVERGE

GJK iterations did not converge in time.

@:value(_GJK_FAILED_TO_MAKE_TETRAHEDRON)staticread onlyGJK_FAILED_TO_MAKE_TETRAHEDRON:Int = _GJK_FAILED_TO_MAKE_TETRAHEDRON

Failed to construct a tetrahedron enclosing the origin in GJK computation.

@:value(_SUCCEEDED)staticread onlySUCCEEDED:Int = _SUCCEEDED

GJK/EPA computation is successfully finished.

\ No newline at end of file +

The list of the state of a result of GjkEpa.computeClosestPoints.

Static variables

@:value(_EPA_DID_NOT_CONVERGE)staticread onlyEPA_DID_NOT_CONVERGE:Int = _EPA_DID_NOT_CONVERGE

EPA iterations did not converge in time.

@:value(_EPA_FAILED_TO_ADD_VERTEX)staticread onlyEPA_FAILED_TO_ADD_VERTEX:Int = _EPA_FAILED_TO_ADD_VERTEX

Failed to add a new vertex to the polyhedron in EPA computation.

@:value(_EPA_FAILED_TO_INIT)staticread onlyEPA_FAILED_TO_INIT:Int = _EPA_FAILED_TO_INIT

Failed to construct initial polyhedron in EPA construction.

@:value(_GJK_DID_NOT_CONVERGE)staticread onlyGJK_DID_NOT_CONVERGE:Int = _GJK_DID_NOT_CONVERGE

GJK iterations did not converge in time.

@:value(_GJK_FAILED_TO_MAKE_TETRAHEDRON)staticread onlyGJK_FAILED_TO_MAKE_TETRAHEDRON:Int = _GJK_FAILED_TO_MAKE_TETRAHEDRON

Failed to construct a tetrahedron enclosing the origin in GJK computation.

@:value(_SUCCEEDED)staticread onlySUCCEEDED:Int = _SUCCEEDED

GJK/EPA computation is successfully finished.

\ No newline at end of file diff --git a/docs/oimo/collision/narrowphase/detector/gjkepa/SimplexUtil.html b/docs/oimo/collision/narrowphase/detector/gjkepa/SimplexUtil.html index 08c77c3..e67aa76 100644 --- a/docs/oimo/collision/narrowphase/detector/gjkepa/SimplexUtil.html +++ b/docs/oimo/collision/narrowphase/detector/gjkepa/SimplexUtil.html @@ -9,4 +9,4 @@

Simplex utilities for GJK/EPA computations.

Static methods

staticinlineprojectOrigin2(vec1:Vec3, vec2:Vec3, out:Vec3):Int

Sets out to the minimum length point on the line (vec1, vec2) and returns the index of the voronoi region.

staticinlineprojectOrigin3(vec1:Vec3, vec2:Vec3, vec3:Vec3, out:Vec3):Int

Sets out to the minimum length point on the triangle (vec1, vec2, vec3) and returns the index of the voronoi region.

staticinlineprojectOrigin4(vec1:Vec3, vec2:Vec3, vec3:Vec3, vec4:Vec3, out:Vec3):Int

Sets out to the minimum length point on the tetrahedron (vec1, vec2, vec3, vec4) -and returns the index of the voronoi region.

\ No newline at end of file +and returns the index of the voronoi region.

\ No newline at end of file diff --git a/docs/oimo/collision/narrowphase/detector/gjkepa/index.html b/docs/oimo/collision/narrowphase/detector/gjkepa/index.html index 243b62e..399962e 100644 --- a/docs/oimo/collision/narrowphase/detector/gjkepa/index.html +++ b/docs/oimo/collision/narrowphase/detector/gjkepa/index.html @@ -6,4 +6,4 @@ display: inline-block; float: none; text-shadow: 0 0 0 transparent; -

oimo.collision.narrowphase.detector.gjkepa

OimoPhysics API Documentation

..
GjkEpa

GJK algorithm and EPA for narrow-phase collision detection.

GjkEpaResultState

The list of the state of a result of GjkEpa.computeClosestPoints.

SimplexUtil

Simplex utilities for GJK/EPA computations.

\ No newline at end of file +

oimo.collision.narrowphase.detector.gjkepa

OimoPhysics API Documentation

..
GjkEpa

GJK algorithm and EPA for narrow-phase collision detection.

GjkEpaResultState

The list of the state of a result of GjkEpa.computeClosestPoints.

SimplexUtil

Simplex utilities for GJK/EPA computations.

\ No newline at end of file diff --git a/docs/oimo/collision/narrowphase/detector/index.html b/docs/oimo/collision/narrowphase/detector/index.html index 39d1c2e..b5c0afe 100644 --- a/docs/oimo/collision/narrowphase/detector/index.html +++ b/docs/oimo/collision/narrowphase/detector/index.html @@ -6,4 +6,4 @@ display: inline-block; float: none; text-shadow: 0 0 0 transparent; -

oimo.collision.narrowphase.detector

OimoPhysics API Documentation

..
gjkepa
BoxBoxDetector

Box vs Box detector.

CapsuleCapsuleDetector

Capsule vs Capsule detector.

Detector

Interface of a collision detector for narrow-phase collision detection.

GjkEpaDetector

General convex collision detector using GJK/EPA

SphereBoxDetector

Sphere vs Box collision detector.

SphereCapsuleDetector

Sphere vs Capsule detector.

SphereSphereDetector

Sphere vs Sphere detector.

\ No newline at end of file +

oimo.collision.narrowphase.detector

OimoPhysics API Documentation

..
gjkepa
BoxBoxDetector

Box vs Box detector.

CapsuleCapsuleDetector

Capsule vs Capsule detector.

Detector

Interface of a collision detector for narrow-phase collision detection.

GjkEpaDetector

General convex collision detector using GJK/EPA

SphereBoxDetector

Sphere vs Box collision detector.

SphereCapsuleDetector

Sphere vs Capsule detector.

SphereSphereDetector

Sphere vs Sphere detector.

\ No newline at end of file diff --git a/docs/oimo/collision/narrowphase/index.html b/docs/oimo/collision/narrowphase/index.html index 8ca679b..8be5a96 100644 --- a/docs/oimo/collision/narrowphase/index.html +++ b/docs/oimo/collision/narrowphase/index.html @@ -10,4 +10,4 @@ two geometries of given types.

DetectorResult

The result of narrow-phase collision detection. This is used for generating contact points of a contact constraint at once or incrementally.

DetectorResultPoint

The result point is a pair of the closest points of collision geometries detected by a collision detector. This holds relative closest points for -each collision geometry and the amount of the overlap.

\ No newline at end of file +each collision geometry and the amount of the overlap.

\ No newline at end of file diff --git a/docs/oimo/common/Mat3.html b/docs/oimo/common/Mat3.html index d5545d4..c9726c8 100644 --- a/docs/oimo/common/Mat3.html +++ b/docs/oimo/common/Mat3.html @@ -35,4 +35,4 @@ Otherwise, the array is arranged in row-major order.

inlinetoEulerXyz():Vec3

Returns a vector (angleX, angleY, angleZ) represents the Euler angles of this matrix. Rotation order is first X-axis, then rotated Y-axis, finally rotated Z-axis. Note that angleX, angleY, and angleZ are in range of -PI to PI, -PI/2 to PI/2, and -PI to PI respectively.

inlinetoQuat():Quat

Returns a quaternion which represents this matrix.

-

This matrix must be a rotation matrix, that is, must be orthogonalized and have determinant 1.

toString():String

Returns the string representation of the matrix.

inlinetrace():Float

Returns the trace.

inlinetranspose():Mat3

Returns the transposed matrix.

inlinetransposeEq():Mat3

Sets this matrix to the transposed matrix and returns this.

\ No newline at end of file +

This matrix must be a rotation matrix, that is, must be orthogonalized and have determinant 1.

toString():String

Returns the string representation of the matrix.

inlinetrace():Float

Returns the trace.

inlinetranspose():Mat3

Returns the transposed matrix.

inlinetransposeEq():Mat3

Sets this matrix to the transposed matrix and returns this.

\ No newline at end of file diff --git a/docs/oimo/common/Mat4.html b/docs/oimo/common/Mat4.html index e42b843..ced92a4 100644 --- a/docs/oimo/common/Mat4.html +++ b/docs/oimo/common/Mat4.html @@ -45,4 +45,4 @@

Where translation matrix is a matrix which translates sx, sy and sz along the x-axis, y-axis and z-axis respectively.

inlinescale(s:Float):Mat4

Returns this * s

inlinescaleEq(s:Float):Mat4

Sets this matrix to this * s and returns this.

inlinesub(m:Mat4):Mat4

Returns this - m

inlinesubEq(m:Mat4):Mat4

Sets this matrix to this - m and returns this.

@:value({ columnMajor : false })inlinetoArray(columnMajor:Bool = false):Array<Float>

Returns an array of the elements of this matrix.

If columnMajor is true, the array is arranged in column-major order. -Otherwise, the array is arranged in row-major order.

toString():String

Returns the string representation of the matrix.

inlinetrace():Float

Returns the trace.

inlinetranspose():Mat4

Returns the transposed matrix.

inlinetransposeEq():Mat4

Sets this matrix to the transposed matrix and returns this.

\ No newline at end of file +Otherwise, the array is arranged in row-major order.

toString():String

Returns the string representation of the matrix.

inlinetrace():Float

Returns the trace.

inlinetranspose():Mat4

Returns the transposed matrix.

inlinetransposeEq():Mat4

Sets this matrix to the transposed matrix and returns this.

\ No newline at end of file diff --git a/docs/oimo/common/MathUtil.html b/docs/oimo/common/MathUtil.html index 216b4cc..cd8f989 100644 --- a/docs/oimo/common/MathUtil.html +++ b/docs/oimo/common/MathUtil.html @@ -8,4 +8,4 @@ text-shadow: 0 0 0 transparent;

This class provides mathematical operations for internal purposes.

Static variables

@:value(PI / 2)staticinlineread onlyHALF_PI:Float = PI / 2

Shorthand for PI / 2.

@:value(-1e65536)staticinlineread onlyNEGATIVE_INFINITY:Float = -1e65536

Negative infinity.

@:value(3.14159265358979)staticinlineread onlyPI:Float = 3.14159265358979

The ratio of the circumference of a circle to its diameter.

@:value(1e65536)staticinlineread onlyPOSITIVE_INFINITY:Float = 1e65536

Positive infinity.

@:value(180 / PI)staticinlineread onlyTO_DEGREES:Float = 180 / PI

Shorthand for 180 / PI.

@:value(PI / 180)staticinlineread onlyTO_RADIANS:Float = PI / 180

Shorthand for PI / 180.

@:value(PI * 2)staticinlineread onlyTWO_PI:Float = PI * 2

Shorthand for PI * 2.

Static methods

staticinlineabs(x:Float):Float

Returns the absolute value of x.

staticinlineacos(x:Float):Float

Returns Math.acos(x).

staticinlineasin(x:Float):Float

Returns Math.asin(x).

staticinlineatan(x:Float):Float

Returns Math.atan(x).

staticinlineatan2(y:Float, x:Float):Float

Returns Math.atan2(y, x)

staticinlineclamp(x:Float, min:Float, max:Float):Float

Returns a clamped value of x from min to max.

staticinlinecos(x:Float):Float

Returns Math.cos(x).

staticinlinerand():Float

Returns Math.random().

staticinlinerandIn(min:Float, max:Float):Float

Returns a random value from min inclusive to max exclusive.

staticinlinerandVec3():Vec3

Returns a random Vec3 from (-1.0, -1.0, -1.0) inclusive to (1.0, 1.0, 1.0) exclusive.

staticinlinerandVec3In(min:Float, max:Float):Vec3

Returns a random Vec3 from (min, min, min) inclusive to (max, max, max) exclusive.

staticinlinesafeAcos(x:Float):Float

Returns Math.acos(clamp(-1, x, 1)). This never returns NaN as long as x is not NaN.

staticinlinesafeAsin(x:Float):Float

Returns Math.asin(clamp(-1, x, 1)). -This never returns NaN as long as x is not NaN.

staticinlinesin(x:Float):Float

Returns Math.sin(x).

staticinlinesqrt(x:Float):Float

Returns Math.sqrt(x).

staticinlinetan(x:Float):Float

Returns Math.tan(x).

\ No newline at end of file +This never returns NaN as long as x is not NaN.

staticinlinesin(x:Float):Float

Returns Math.sin(x).

staticinlinesqrt(x:Float):Float

Returns Math.sqrt(x).

staticinlinetan(x:Float):Float

Returns Math.tan(x).

\ No newline at end of file diff --git a/docs/oimo/common/Pool.html b/docs/oimo/common/Pool.html index f3f8b8f..9f01c1b 100644 --- a/docs/oimo/common/Pool.html +++ b/docs/oimo/common/Pool.html @@ -10,4 +10,4 @@ not create a new instance.

inlinemat4():Mat4

Returns a Mat4 object. If an unused object of Vec3 is pooled, this does not create a new instance.

inlinequat():Quat

Returns a Quat object. If an unused object of Quat is pooled, this does not create a new instance.

inlinevec3():Vec3

Returns a Vec3 object. If an unused object of Vec3 is pooled, this does -not create a new instance.

\ No newline at end of file +not create a new instance.

\ No newline at end of file diff --git a/docs/oimo/common/Quat.html b/docs/oimo/common/Quat.html index 5ac7913..2726ddc 100644 --- a/docs/oimo/common/Quat.html +++ b/docs/oimo/common/Quat.html @@ -11,4 +11,4 @@

If the length is zero, this quaternion is set to zero quaternion.

inlinenormalized():Quat

Returns the normalized quaternion.

If the length is zero, zero quaterinon is returned.

inlinescale(s:Float):Quat

Returns this * s.

inlinescaleEq(s:Float):Quat

Sets this quaternion to this * s and returns this.

setArc(v1:Vec3, v2:Vec3):Quat

Sets this quaternion to the quaternion representing the shortest arc rotation from v1 to v2, and return this.

slerp(q:Quat, t:Float):Quat

Returns the spherical linear interpolation between two quaternions this and q with interpolation paraeter t. -Both quaternions this and q must be normalized.

inlinesub(q:Quat):Quat

Returns this - v.

inlinesubEq(q:Quat):Quat

Sets this quaternion to this - v and returns this.

inlinetoMat3():Mat3

Returns a rotation matrix which represents this quaternion.

inlinetoString():String

Returns the string representation of the quaternion.

\ No newline at end of file +Both quaternions this and q must be normalized.

inlinesub(q:Quat):Quat

Returns this - v.

inlinesubEq(q:Quat):Quat

Sets this quaternion to this - v and returns this.

inlinetoMat3():Mat3

Returns a rotation matrix which represents this quaternion.

inlinetoString():String

Returns the string representation of the quaternion.

\ No newline at end of file diff --git a/docs/oimo/common/Setting.html b/docs/oimo/common/Setting.html index 8acaa1a..dfce131 100644 --- a/docs/oimo/common/Setting.html +++ b/docs/oimo/common/Setting.html @@ -6,4 +6,4 @@ display: inline-block; float: none; text-shadow: 0 0 0 transparent; -

Setting provides advenced parameters used by the physics simulation.

Static variables

@:value(PositionCorrectionAlgorithm._SPLIT_IMPULSE)staticalternativeContactPositionCorrectionAlgorithm:Int = PositionCorrectionAlgorithm._SPLIT_IMPULSE

@:value(1 * MathUtil.TO_RADIANS)staticangularSlop:Float = 1 * MathUtil.TO_RADIANS

@:value(0.45)staticbvhIncrementalCollisionThreshold:Float = 0.45

@:value(0.1)staticbvhProxyPadding:Float = 0.1

@:value(0.5)staticcontactEnableBounceThreshold:Float = 0.5

@:value(0.05)staticcontactPersistenceThreshold:Float = 0.05

@:value(1)staticdefaultCollisionGroup:Int = 1

@:value(1)staticdefaultCollisionMask:Int = 1

@:value(PositionCorrectionAlgorithm._BAUMGARTE)staticdefaultContactPositionCorrectionAlgorithm:Int = PositionCorrectionAlgorithm._BAUMGARTE

@:value(1)staticdefaultDensity:Float = 1

@:value(0.2)staticdefaultFriction:Float = 0.2

@:value(0.05)staticdefaultGJKMargin:Float = 0.05

@:value(ConstraintSolverType._ITERATIVE)staticdefaultJointConstraintSolverType:Int = ConstraintSolverType._ITERATIVE

@:value(PositionCorrectionAlgorithm._BAUMGARTE)staticdefaultJointPositionCorrectionAlgorithm:Int = PositionCorrectionAlgorithm._BAUMGARTE

@:value(0.2)staticdefaultRestitution:Float = 0.2

@:value(1e-9)staticdirectMlcpSolverEps:Float = 1e-9

@:value(false)staticdisableSleeping:Bool = false

@:value(true)staticenableGJKCaching:Bool = true

@:value(128)staticislandInitialConstraintArraySize:Int = 128

@:value(128)staticislandInitialRigidBodyArraySize:Int = 128

@:value(0.95)staticjointWarmStartingFactor:Float = 0.95

@:value(0.8)staticjointWarmStartingFactorForBaungarte:Float = 0.8

@:value(0.005)staticlinearSlop:Float = 0.005

@:value(128)staticmaxEPAPolyhedronFaces:Int = 128

@:value(128)staticmaxEPAVertices:Int = 128

@:value(6)staticmaxJacobianRows:Int = 6

@:value(4)staticmaxManifoldPoints:Int = 4

@:value(MathUtil.PI)staticmaxRotationPerStep:Float = MathUtil.PI

@:value(20)staticmaxTranslationPerStep:Float = 20

@:value(1e-6)staticminRagdollMaxSwingAngle:Float = 1e-6

@:value(1e-6)staticminSpringDamperDampingRatio:Float = 1e-6

@:value(1.0)staticpositionNgsBaumgarte:Float = 1.0

@:value(0.4)staticpositionSplitImpulseBaumgarte:Float = 0.4

@:value(0.5)staticsleepingAngularVelocityThreshold:Float = 0.5

@:value(1.0)staticsleepingTimeThreshold:Float = 1.0

@:value(0.2)staticsleepingVelocityThreshold:Float = 0.2

@:value(0.2)staticvelocityBaumgarte:Float = 0.2

\ No newline at end of file +

Setting provides advenced parameters used by the physics simulation.

Static variables

@:value(PositionCorrectionAlgorithm._SPLIT_IMPULSE)staticalternativeContactPositionCorrectionAlgorithm:Int = PositionCorrectionAlgorithm._SPLIT_IMPULSE

@:value(1 * MathUtil.TO_RADIANS)staticangularSlop:Float = 1 * MathUtil.TO_RADIANS

@:value(0.45)staticbvhIncrementalCollisionThreshold:Float = 0.45

@:value(0.1)staticbvhProxyPadding:Float = 0.1

@:value(0.5)staticcontactEnableBounceThreshold:Float = 0.5

@:value(0.05)staticcontactPersistenceThreshold:Float = 0.05

@:value(1)staticdefaultCollisionGroup:Int = 1

@:value(1)staticdefaultCollisionMask:Int = 1

@:value(PositionCorrectionAlgorithm._BAUMGARTE)staticdefaultContactPositionCorrectionAlgorithm:Int = PositionCorrectionAlgorithm._BAUMGARTE

@:value(1)staticdefaultDensity:Float = 1

@:value(0.2)staticdefaultFriction:Float = 0.2

@:value(0.05)staticdefaultGJKMargin:Float = 0.05

@:value(ConstraintSolverType._ITERATIVE)staticdefaultJointConstraintSolverType:Int = ConstraintSolverType._ITERATIVE

@:value(PositionCorrectionAlgorithm._BAUMGARTE)staticdefaultJointPositionCorrectionAlgorithm:Int = PositionCorrectionAlgorithm._BAUMGARTE

@:value(0.2)staticdefaultRestitution:Float = 0.2

@:value(1e-9)staticdirectMlcpSolverEps:Float = 1e-9

@:value(false)staticdisableSleeping:Bool = false

@:value(true)staticenableGJKCaching:Bool = true

@:value(128)staticislandInitialConstraintArraySize:Int = 128

@:value(128)staticislandInitialRigidBodyArraySize:Int = 128

@:value(0.95)staticjointWarmStartingFactor:Float = 0.95

@:value(0.8)staticjointWarmStartingFactorForBaungarte:Float = 0.8

@:value(0.005)staticlinearSlop:Float = 0.005

@:value(128)staticmaxEPAPolyhedronFaces:Int = 128

@:value(128)staticmaxEPAVertices:Int = 128

@:value(6)staticmaxJacobianRows:Int = 6

@:value(4)staticmaxManifoldPoints:Int = 4

@:value(MathUtil.PI)staticmaxRotationPerStep:Float = MathUtil.PI

@:value(20)staticmaxTranslationPerStep:Float = 20

@:value(1e-6)staticminRagdollMaxSwingAngle:Float = 1e-6

@:value(1e-6)staticminSpringDamperDampingRatio:Float = 1e-6

@:value(1.0)staticpositionNgsBaumgarte:Float = 1.0

@:value(0.4)staticpositionSplitImpulseBaumgarte:Float = 0.4

@:value(0.5)staticsleepingAngularVelocityThreshold:Float = 0.5

@:value(1.0)staticsleepingTimeThreshold:Float = 1.0

@:value(0.2)staticsleepingVelocityThreshold:Float = 0.2

@:value(0.2)staticvelocityBaumgarte:Float = 0.2

\ No newline at end of file diff --git a/docs/oimo/common/Transform.html b/docs/oimo/common/Transform.html index b0c0f4c..b3fa6c5 100644 --- a/docs/oimo/common/Transform.html +++ b/docs/oimo/common/Transform.html @@ -9,4 +9,4 @@

Transform class provides a set of translation and rotation.

Constructor

new()

Creates a new identical transform.

Methods

inlineclone():Transform

Returns a clone of the transformation.

inlinecopyFrom(transform:Transform):Transform

Sets the transformation to transform and returns this.

inlinegetOrientation():Quat

Returns the rotation as a quaternion.

inlinegetOrientationTo(orientation:Quat):Void

Sets orientation to the quaternion representing the rotation.

This does not create a new instance of Quat.

inlinegetPosition():Vec3

Returns the position of the transformation.

inlinegetPositionTo(position:Vec3):Void

Sets position to the position of the transformation.

This does not create a new instance of Vec3.

inlinegetRotation():Mat3

Returns the rotation matrix.

inlinegetRotationTo(out:Mat3):Void

Sets out to the rotation matrix.

-

This does not create a new instance of Mat3.

inlineidentity():Transform

Sets the transformation to identity and returns this.

inlinerotate(rotation:Mat3):Void

Applies rotation by the rotation matrix rotation.

inlinerotateXyz(eulerAngles:Vec3):Void

Applies the rotation by Euler angles eulerAngles in radians.

inlinesetOrientation(quaternion:Quat):Transform

Sets the rotation from a quaternion quaternion and returns this.

inlinesetPosition(position:Vec3):Transform

Sets the position of the transformation to position and returns this.

inlinesetRotation(rotation:Mat3):Transform

Sets the rotation matrix to rotation and returns this.

inlinesetRotationXyz(eulerAngles:Vec3):Void

Sets the rotation by Euler angles eulerAngles in radians.

inlinetranslate(translation:Vec3):Void

Translates the position by translation.

\ No newline at end of file +

This does not create a new instance of Mat3.

inlineidentity():Transform

Sets the transformation to identity and returns this.

inlinerotate(rotation:Mat3):Void

Applies rotation by the rotation matrix rotation.

inlinerotateXyz(eulerAngles:Vec3):Void

Applies the rotation by Euler angles eulerAngles in radians.

inlinesetOrientation(quaternion:Quat):Transform

Sets the rotation from a quaternion quaternion and returns this.

inlinesetPosition(position:Vec3):Transform

Sets the position of the transformation to position and returns this.

inlinesetRotation(rotation:Mat3):Transform

Sets the rotation matrix to rotation and returns this.

inlinesetRotationXyz(eulerAngles:Vec3):Void

Sets the rotation by Euler angles eulerAngles in radians.

inlinetranslate(translation:Vec3):Void

Translates the position by translation.

\ No newline at end of file diff --git a/docs/oimo/common/Vec3.html b/docs/oimo/common/Vec3.html index ef05c72..ec50e0a 100644 --- a/docs/oimo/common/Vec3.html +++ b/docs/oimo/common/Vec3.html @@ -8,4 +8,4 @@ text-shadow: 0 0 0 transparent;

3D vector class.

Static variables

@:value(0)staticnumCreations:Int = 0

The number of instance creation.

Constructor

@:value({ z : 0, y : 0, x : 0 })inlinenew(x:Float = 0, y:Float = 0, z:Float = 0)

Creates a new vector. The vector is zero vector by default.

Variables

x:Float

The x-value of the vector.

y:Float

The y-value of the vector.

z:Float

The z-value of the vector.

Methods

inlineadd(v:Vec3):Vec3

Returns this + v.

inlineadd3(vx:Float, vy:Float, vz:Float):Vec3

Returns (this.x + vx, this.y + vy, this.z + vz).

inlineadd3Eq(vx:Float, vy:Float, vz:Float):Vec3

Sets this vector to (this.x + vx, this.y + vy, this.z + vz) and returns this.

inlineaddEq(v:Vec3):Vec3

Sets this vector to this + v and returns this.

inlineaddScaled(v:Vec3, s:Float):Vec3

Returns this + v * s.

inlineaddScaledEq(v:Vec3, s:Float):Vec3

Sets this vector to this + v * s and returns this.

inlineclone():Vec3

Returns a clone of the vector.

inlinecopyFrom(v:Vec3):Vec3

Copies values from v and returns this.

inlinecross(v:Vec3):Vec3

Returns the cross product of this and v.

inlinecrossEq(v:Vec3):Vec3

Sets this vector to the cross product of this and s, and returns this.

inlinedot(v:Vec3):Float

Returns the dot product of this and v.

init(x:Float, y:Float, z:Float):Vec3

Sets all values at once and returns this.

inlinelength():Float

Returns the length of the vector.

inlinelengthSq():Float

Returns the squared length of the vector.

inlinemulMat3(m:Mat3):Vec3

Returns the transformed vector by m.

inlinemulMat3Eq(m:Mat3):Vec3

Sets this vector to the transformed vector by m and returns this.

inlinemulMat4(m:Mat4):Vec3

Returns the transformed vector by m.

inlinemulMat4Eq(m:Mat4):Vec3

Sets this vector to the transformed vector by m and returns this.

inlinemulTransform(tf:Transform):Vec3

Returns the transformed vector by tf.

inlinemulTransformEq(tf:Transform):Vec3

Sets this vector to the transformed vector by tf and returns this.

inlinenegate():Vec3

Returns the nagated vector.

inlinenegateEq():Vec3

Negate the vector and returns this.

inlinenormalize():Vec3

Normalize this vector and returns this.

If the length is zero, this vector is set to zero vector.

inlinenormalized():Vec3

Returns the normalized vector.

-

If the length is zero, zero vector is returned.

inlinescale(s:Float):Vec3

Returns this * s.

inlinescale3(sx:Float, sy:Float, sz:Float):Vec3

Returns (this.x * sx, this.y * sy, this.z * sz).

inlinescale3Eq(sx:Float, sy:Float, sz:Float):Vec3

Sets this vector to (this.x * sx, this.y * sy, this.z * sz) and returns this.

inlinescaleEq(s:Float):Vec3

Sets this vector to this * s and returns this.

inlinesub(v:Vec3):Vec3

Returns this - v.

inlinesub3(vx:Float, vy:Float, vz:Float):Vec3

Returns (this.x - vx, this.y - vy, this.z - vz).

inlinesub3Eq(vx:Float, vy:Float, vz:Float):Vec3

Sets this vector to (this.x - vx, this.y - vy, this.z - vz) and returns this.

inlinesubEq(v:Vec3):Vec3

Sets this vector to this - v and returns this.

toString():String

Returns the string representation of the vector.

zero():Vec3

Sets this vector to zero vector and returns this.

\ No newline at end of file +

If the length is zero, zero vector is returned.

inlinescale(s:Float):Vec3

Returns this * s.

inlinescale3(sx:Float, sy:Float, sz:Float):Vec3

Returns (this.x * sx, this.y * sy, this.z * sz).

inlinescale3Eq(sx:Float, sy:Float, sz:Float):Vec3

Sets this vector to (this.x * sx, this.y * sy, this.z * sz) and returns this.

inlinescaleEq(s:Float):Vec3

Sets this vector to this * s and returns this.

inlinesub(v:Vec3):Vec3

Returns this - v.

inlinesub3(vx:Float, vy:Float, vz:Float):Vec3

Returns (this.x - vx, this.y - vy, this.z - vz).

inlinesub3Eq(vx:Float, vy:Float, vz:Float):Vec3

Sets this vector to (this.x - vx, this.y - vy, this.z - vz) and returns this.

inlinesubEq(v:Vec3):Vec3

Sets this vector to this - v and returns this.

toString():String

Returns the string representation of the vector.

zero():Vec3

Sets this vector to zero vector and returns this.

\ No newline at end of file diff --git a/docs/oimo/common/index.html b/docs/oimo/common/index.html index 095b55d..6757abc 100644 --- a/docs/oimo/common/index.html +++ b/docs/oimo/common/index.html @@ -6,4 +6,4 @@ display: inline-block; float: none; text-shadow: 0 0 0 transparent; -

oimo.common

OimoPhysics API Documentation

..
Mat3

3x3 Matrix class.

Mat4

4x4 Matrix class.

MathUtil

This class provides mathematical operations for internal purposes.

Pool

The object pool system of Vec3, Mat3, Mat4, and Quat.

Quat

Quaternion class.

Setting

Setting provides advenced parameters used by the physics simulation.

Transform

Transform class provides a set of translation and rotation.

Vec3

3D vector class.

\ No newline at end of file +

oimo.common

OimoPhysics API Documentation

..
Mat3

3x3 Matrix class.

Mat4

4x4 Matrix class.

MathUtil

This class provides mathematical operations for internal purposes.

Pool

The object pool system of Vec3, Mat3, Mat4, and Quat.

Quat

Quaternion class.

Setting

Setting provides advenced parameters used by the physics simulation.

Transform

Transform class provides a set of translation and rotation.

Vec3

3D vector class.

\ No newline at end of file diff --git a/docs/oimo/dynamics/Contact.html b/docs/oimo/dynamics/Contact.html index ebcc347..e2e2458 100644 --- a/docs/oimo/dynamics/Contact.html +++ b/docs/oimo/dynamics/Contact.html @@ -12,4 +12,4 @@

As AABBs are larger than its shapes, shapes of a contact don't always touching or colliding though their AABBs are overlapping.

Methods

inlinegetContactConstraint():ContactConstraint

Returns the contact constraint.

inlinegetManifold():Manifold

Returns the contact manifold.

inlinegetNext():Contact

Returns the next contact in the world.

If the next contact does not exist, null will be returned.

inlinegetPrev():Contact

Returns the previous contact in the world.

-

If the previous contact does not exist, null will be returned.

inlinegetShape1():Shape

Returns the first shape of the contact.

inlinegetShape2():Shape

Returns the second shape of the contact.

inlineisTouching():Bool

Returns whether the shapes are touching.

\ No newline at end of file +

If the previous contact does not exist, null will be returned.

inlinegetShape1():Shape

Returns the first shape of the contact.

inlinegetShape2():Shape

Returns the second shape of the contact.

inlineisTouching():Bool

Returns whether the shapes are touching.

\ No newline at end of file diff --git a/docs/oimo/dynamics/ContactLink.html b/docs/oimo/dynamics/ContactLink.html index 8d555fa..dc95cf3 100644 --- a/docs/oimo/dynamics/ContactLink.html +++ b/docs/oimo/dynamics/ContactLink.html @@ -13,4 +13,4 @@ See also JointLink.

Methods

inlinegetContact():Contact

Returns the contact of the link.

inlinegetNext():ContactLink

Returns the next contact link in the rigid body.

If the next one does not exist, null will be returned.

inlinegetOther():RigidBody

Returns the other rigid body of the link. This provides a quick access from a rigid body to the other one of the contact.

inlinegetPrev():ContactLink

Returns the previous contact link in the rigid body.

-

If the previous one does not exist, null will be returned.

\ No newline at end of file +

If the previous one does not exist, null will be returned.

\ No newline at end of file diff --git a/docs/oimo/dynamics/ContactManager.html b/docs/oimo/dynamics/ContactManager.html index a72ab2a..eda9961 100644 --- a/docs/oimo/dynamics/ContactManager.html +++ b/docs/oimo/dynamics/ContactManager.html @@ -10,4 +10,4 @@ text-shadow: 0 0 0 transparent;

The manager of the contacts in the physics world. A contact of two shapes is created when the AABBs of them begin overlapping, and -is destroyed when they end overlapping.

Methods

inlinegetContactList():Contact

Returns the linked list of the contacts in the world.

inlinegetNumContacts():Int

Returns the number of the contacts in the world.

\ No newline at end of file +is destroyed when they end overlapping.

Methods

inlinegetContactList():Contact

Returns the linked list of the contacts in the world.

inlinegetNumContacts():Int

Returns the number of the contacts in the world.

\ No newline at end of file diff --git a/docs/oimo/dynamics/TimeStep.html b/docs/oimo/dynamics/TimeStep.html index bcbf56e..e23ba61 100644 --- a/docs/oimo/dynamics/TimeStep.html +++ b/docs/oimo/dynamics/TimeStep.html @@ -7,4 +7,4 @@ float: none; text-shadow: 0 0 0 transparent;

Information of time-step sizes of the simulation.

Variables

dt:Float

The time step of simulation.

dtRatio:Float

The ratio of time steps. Defined by current time step divided by previous -time step.

invDt:Float

The inverse time step of simulation, equivalent to simulation FPS.

\ No newline at end of file +time step.

invDt:Float

The inverse time step of simulation, equivalent to simulation FPS.

\ No newline at end of file diff --git a/docs/oimo/dynamics/World.html b/docs/oimo/dynamics/World.html index bbb4c13..621cc1e 100644 --- a/docs/oimo/dynamics/World.html +++ b/docs/oimo/dynamics/World.html @@ -13,4 +13,4 @@ AABB and aabb intersect.

addJoint(joint:Joint):Void

Adds the joint joint to the simulation world.

addRigidBody(rigidBody:RigidBody):Void

Adds the rigid body rigidBody to the simulation world.

convexCast(convex:ConvexGeometry, begin:Transform, translation:Vec3, callback:RayCastCallback):Void

Performs a convex casting. callback.process is called for all shapes the convex geometry convex hits. The convex geometry translates by translation starting from the beginning transform begin.

debugDraw():Void

Draws the simulation world for debugging. Call World.setDebugDraw to set the debug draw interface.

inlinegetBroadPhase():BroadPhase

Returns the broad-phase collision detection algorithm.

inlinegetContactManager():ContactManager

Returns the contact manager.

inlinegetDebugDraw():DebugDraw

Returns the debug draw interface.

inlinegetGravity():Vec3

Returns the gravitational acceleration of the simulation world.

inlinegetJointList():Joint

Returns the list of the joints added to the world.

inlinegetNumIslands():Int

Returns the number of simulation islands.

inlinegetNumJoints():Int

Returns the number of the joints added to the world.

inlinegetNumPositionIterations():Int

Returns the number of position iterations of constraint solvers.

inlinegetNumRigidBodies():Int

Returns the number of the rigid bodies added to the world.

inlinegetNumShapes():Int

Returns the number of the shapes added to the world.

inlinegetNumVelocityIterations():Int

Returns the number of velocity iterations of constraint solvers.

inlinegetRigidBodyList():RigidBody

Returns the list of the rigid bodies added to the world.

rayCast(begin:Vec3, end:Vec3, callback:RayCastCallback):Void

Performs a ray casting. callback.process is called for all shapes the ray -from begin to end hits.

removeJoint(joint:Joint):Void

Removes the joint joint from the simulation world.

removeRigidBody(rigidBody:RigidBody):Void

Removes the rigid body rigidBody from the simulation world.

inlinesetDebugDraw(debugDraw:DebugDraw):Void

Sets the debug draw interface to debugDraw. Call World.debugDraw to draw the simulation world.

inlinesetGravity(gravity:Vec3):Void

Sets the gravitational acceleration of the simulation world to gravity.

inlinesetNumPositionIterations(numPositionIterations:Int):Void

Sets the number of position iterations of constraint solvers to numPositionIterations.

inlinesetNumVelocityIterations(numVelocityIterations:Int):Void

Sets the number of velocity iterations of constraint solvers to numVelocityIterations.

step(timeStep:Float):Void

Advances the simulation by the time step timeStep.

\ No newline at end of file +from begin to end hits.

removeJoint(joint:Joint):Void

Removes the joint joint from the simulation world.

removeRigidBody(rigidBody:RigidBody):Void

Removes the rigid body rigidBody from the simulation world.

inlinesetDebugDraw(debugDraw:DebugDraw):Void

Sets the debug draw interface to debugDraw. Call World.debugDraw to draw the simulation world.

inlinesetGravity(gravity:Vec3):Void

Sets the gravitational acceleration of the simulation world to gravity.

inlinesetNumPositionIterations(numPositionIterations:Int):Void

Sets the number of position iterations of constraint solvers to numPositionIterations.

inlinesetNumVelocityIterations(numVelocityIterations:Int):Void

Sets the number of velocity iterations of constraint solvers to numVelocityIterations.

step(timeStep:Float):Void

Advances the simulation by the time step timeStep.

\ No newline at end of file diff --git a/docs/oimo/dynamics/callback/AabbTestCallback.html b/docs/oimo/dynamics/callback/AabbTestCallback.html index b765232..38ca9fe 100644 --- a/docs/oimo/dynamics/callback/AabbTestCallback.html +++ b/docs/oimo/dynamics/callback/AabbTestCallback.html @@ -7,4 +7,4 @@ float: none; text-shadow: 0 0 0 transparent;

A callback interface for aabb tests in a world.

Constructor

new()

Default constructor.

Methods

process(shape:Shape):Void

This is called every time the world detects a shape shape that -the query aabb intersects.

\ No newline at end of file +the query aabb intersects.

\ No newline at end of file diff --git a/docs/oimo/dynamics/callback/ContactCallback.html b/docs/oimo/dynamics/callback/ContactCallback.html index 4249067..8fcb759 100644 --- a/docs/oimo/dynamics/callback/ContactCallback.html +++ b/docs/oimo/dynamics/callback/ContactCallback.html @@ -12,4 +12,4 @@ the two shapes.

endContact(c:Contact):Void

This is called when two shapes end touching each other. c is the contact of the two shapes.

postSolve(c:Contact):Void

This is called every frame after velocity solver iterations while two shapes are touching. c is the contact for the two shapes.

preSolve(c:Contact):Void

This is called every frame before velocity solver iterations while two shapes -are touching. c is the contact for the two shapes.

\ No newline at end of file +are touching. c is the contact for the two shapes.

\ No newline at end of file diff --git a/docs/oimo/dynamics/callback/RayCastCallback.html b/docs/oimo/dynamics/callback/RayCastCallback.html index 6d66b7d..cc7c7b1 100644 --- a/docs/oimo/dynamics/callback/RayCastCallback.html +++ b/docs/oimo/dynamics/callback/RayCastCallback.html @@ -7,4 +7,4 @@ float: none; text-shadow: 0 0 0 transparent;

A callback class for ray casts in a world.

Constructor

new()

Default constructor.

Methods

process(shape:Shape, hit:RayCastHit):Void

This is called every time the world detects a shape shape that -the ray intersects with the hit data hit.

\ No newline at end of file +the ray intersects with the hit data hit.

\ No newline at end of file diff --git a/docs/oimo/dynamics/callback/RayCastClosest.html b/docs/oimo/dynamics/callback/RayCastClosest.html index bcd077e..f8b70d7 100644 --- a/docs/oimo/dynamics/callback/RayCastClosest.html +++ b/docs/oimo/dynamics/callback/RayCastClosest.html @@ -10,4 +10,4 @@ text-shadow: 0 0 0 transparent;

A ray cast callback implementation that keeps only the closest hit data. This is reusable, but make sure to clear the old result by calling -RayCastClosest.clear if used once or more before.

Constructor

new()

Default constructor.

Variables

fraction:Float

The ratio of the position the ray hit from the start point to the end point.

hit:Bool

Whether the ray hit any shape in the world.

normal:Vec3

The normal vector of the surface the ray hit.

position:Vec3

The position the ray hit at.

shape:Shape

The shape the ray hit.

Methods

inlineclear():Void

Clears the result data.

Inherited Variables

Inherited Methods

\ No newline at end of file +RayCastClosest.clear if used once or more before.

Constructor

new()

Default constructor.

Variables

fraction:Float

The ratio of the position the ray hit from the start point to the end point.

hit:Bool

Whether the ray hit any shape in the world.

normal:Vec3

The normal vector of the surface the ray hit.

position:Vec3

The position the ray hit at.

shape:Shape

The shape the ray hit.

Methods

inlineclear():Void

Clears the result data.

Inherited Variables

Inherited Methods

\ No newline at end of file diff --git a/docs/oimo/dynamics/callback/index.html b/docs/oimo/dynamics/callback/index.html index 961d500..14ae981 100644 --- a/docs/oimo/dynamics/callback/index.html +++ b/docs/oimo/dynamics/callback/index.html @@ -9,4 +9,4 @@

oimo.dynamics.callback

OimoPhysics API Documentation

..
AabbTestCallback

A callback interface for aabb tests in a world.

ContactCallback

A callback class for contact events. Contact events between two shapes will occur in following order:

RayCastCallback

A callback class for ray casts in a world.

RayCastClosest

A ray cast callback implementation that keeps only the closest hit data. This is reusable, but make sure to clear the old result by calling -RayCastClosest.clear if used once or more before.

\ No newline at end of file +RayCastClosest.clear if used once or more before.

\ No newline at end of file diff --git a/docs/oimo/dynamics/common/DebugDraw.html b/docs/oimo/dynamics/common/DebugDraw.html index a5b46cd..74037e1 100644 --- a/docs/oimo/dynamics/common/DebugDraw.html +++ b/docs/oimo/dynamics/common/DebugDraw.html @@ -64,4 +64,4 @@

color is the color of the sphere.

triangle(v1:Vec3, v2:Vec3, v3:Vec3, n1:Vec3, n2:Vec3, n3:Vec3, color:Vec3):Void

Draws a triangle.

v1, v2, v3 are the triangle's vertices in CCW order.

n1, n2, n3 are the normals of the triangle's vertices in CCW order.

-

color is the color of the triangle.

\ No newline at end of file +

color is the color of the triangle.

\ No newline at end of file diff --git a/docs/oimo/dynamics/common/DebugDrawStyle.html b/docs/oimo/dynamics/common/DebugDrawStyle.html index 2470f08..1a813ad 100644 --- a/docs/oimo/dynamics/common/DebugDrawStyle.html +++ b/docs/oimo/dynamics/common/DebugDrawStyle.html @@ -6,4 +6,4 @@ display: inline-block; float: none; text-shadow: 0 0 0 transparent; -

Style settings of the debug draw.

Constructor

new()

Default constructor.

Variables

@:value(new Vec3(1.0, 0.1, 0.1))aabbColor:Vec3 = new Vec3(1.0, 0.1, 0.1)

@:value(new Vec3(1.0, 0.0, 0.0))basisColorX:Vec3 = new Vec3(1.0, 0.0, 0.0)

@:value(new Vec3(0.0, 1.0, 0.0))basisColorY:Vec3 = new Vec3(0.0, 1.0, 0.0)

@:value(new Vec3(0.0, 0.0, 1.0))basisColorZ:Vec3 = new Vec3(0.0, 0.0, 1.0)

@:value(0.5)basisLength:Float = 0.5

@:value(new Vec3(0.4, 0.4, 0.4))bvhNodeColor:Vec3 = new Vec3(0.4, 0.4, 0.4)

@:value(new Vec3(0.2, 0.2, 1.0))contactBinormalColor:Vec3 = new Vec3(0.2, 0.2, 1.0)

@:value(0.5)contactBinormalLength:Float = 0.5

@:value(new Vec3(1.0, 0.1, 0.1))contactColor:Vec3 = new Vec3(1.0, 0.1, 0.1)

@:value(new Vec3(1.0, 0.6, 0.1))contactColor2:Vec3 = new Vec3(1.0, 0.6, 0.1)

@:value(new Vec3(0.1, 0.8, 0.6))contactColor3:Vec3 = new Vec3(0.1, 0.8, 0.6)

@:value(new Vec3(0.8, 0.1, 1.0))contactColor4:Vec3 = new Vec3(0.8, 0.1, 1.0)

@:value(new Vec3(1.0, 0.1, 0.1))contactNormalColor:Vec3 = new Vec3(1.0, 0.1, 0.1)

@:value(0.5)contactNormalLength:Float = 0.5

@:value(new Vec3(0.1, 0.8, 0.1))contactTangentColor:Vec3 = new Vec3(0.1, 0.8, 0.1)

@:value(0.5)contactTangentLength:Float = 0.5

@:value(new Vec3(0.5, 0.1, 0.1))disabledContactColor:Vec3 = new Vec3(0.5, 0.1, 0.1)

@:value(new Vec3(1.0, 0.1, 0.1))jointErrorColor:Vec3 = new Vec3(1.0, 0.1, 0.1)

@:value(new Vec3(0.8, 0.8, 0.8))jointLineColor:Vec3 = new Vec3(0.8, 0.8, 0.8)

@:value(0.3)jointRotationalConstraintRadius:Float = 0.3

@:value(new Vec3(1.0, 0.5, 0.1))kinematicShapeColor:Vec3 = new Vec3(1.0, 0.5, 0.1)

@:value(new Vec3(1.0, 1.0, 0.1))newContactColor:Vec3 = new Vec3(1.0, 1.0, 0.1)

@:value(new Vec3(1.0, 1.0, 0.1))pairColor:Vec3 = new Vec3(1.0, 1.0, 0.1)

@:value(new Vec3(0.7, 0.2, 0.4))shapeColor1:Vec3 = new Vec3(0.7, 0.2, 0.4)

@:value(new Vec3(1.0, 0.8, 0.1))shapeColor2:Vec3 = new Vec3(1.0, 0.8, 0.1)

@:value(new Vec3(0.3, 0.3, 0.8))sleepingShapeColor1:Vec3 = new Vec3(0.3, 0.3, 0.8)

@:value(new Vec3(0.2, 0.8, 0.5))sleepingShapeColor2:Vec3 = new Vec3(0.2, 0.8, 0.5)

@:value(new Vec3(0.5, 0.25, 0.6))sleepyShapeColor1:Vec3 = new Vec3(0.5, 0.25, 0.6)

@:value(new Vec3(0.6, 0.8, 0.3))sleepyShapeColor2:Vec3 = new Vec3(0.6, 0.8, 0.3)

@:value(new Vec3(0.7, 0.7, 0.7))staticShapeColor:Vec3 = new Vec3(0.7, 0.7, 0.7)

\ No newline at end of file +

Style settings of the debug draw.

Constructor

new()

Default constructor.

Variables

@:value(new Vec3(1.0, 0.1, 0.1))aabbColor:Vec3 = new Vec3(1.0, 0.1, 0.1)

@:value(new Vec3(1.0, 0.0, 0.0))basisColorX:Vec3 = new Vec3(1.0, 0.0, 0.0)

@:value(new Vec3(0.0, 1.0, 0.0))basisColorY:Vec3 = new Vec3(0.0, 1.0, 0.0)

@:value(new Vec3(0.0, 0.0, 1.0))basisColorZ:Vec3 = new Vec3(0.0, 0.0, 1.0)

@:value(0.5)basisLength:Float = 0.5

@:value(new Vec3(0.4, 0.4, 0.4))bvhNodeColor:Vec3 = new Vec3(0.4, 0.4, 0.4)

@:value(new Vec3(0.2, 0.2, 1.0))contactBinormalColor:Vec3 = new Vec3(0.2, 0.2, 1.0)

@:value(0.5)contactBinormalLength:Float = 0.5

@:value(new Vec3(1.0, 0.1, 0.1))contactColor:Vec3 = new Vec3(1.0, 0.1, 0.1)

@:value(new Vec3(1.0, 0.6, 0.1))contactColor2:Vec3 = new Vec3(1.0, 0.6, 0.1)

@:value(new Vec3(0.1, 0.8, 0.6))contactColor3:Vec3 = new Vec3(0.1, 0.8, 0.6)

@:value(new Vec3(0.8, 0.1, 1.0))contactColor4:Vec3 = new Vec3(0.8, 0.1, 1.0)

@:value(new Vec3(1.0, 0.1, 0.1))contactNormalColor:Vec3 = new Vec3(1.0, 0.1, 0.1)

@:value(0.5)contactNormalLength:Float = 0.5

@:value(new Vec3(0.1, 0.8, 0.1))contactTangentColor:Vec3 = new Vec3(0.1, 0.8, 0.1)

@:value(0.5)contactTangentLength:Float = 0.5

@:value(new Vec3(0.5, 0.1, 0.1))disabledContactColor:Vec3 = new Vec3(0.5, 0.1, 0.1)

@:value(new Vec3(1.0, 0.1, 0.1))jointErrorColor:Vec3 = new Vec3(1.0, 0.1, 0.1)

@:value(new Vec3(0.8, 0.8, 0.8))jointLineColor:Vec3 = new Vec3(0.8, 0.8, 0.8)

@:value(0.3)jointRotationalConstraintRadius:Float = 0.3

@:value(new Vec3(1.0, 0.5, 0.1))kinematicShapeColor:Vec3 = new Vec3(1.0, 0.5, 0.1)

@:value(new Vec3(1.0, 1.0, 0.1))newContactColor:Vec3 = new Vec3(1.0, 1.0, 0.1)

@:value(new Vec3(1.0, 1.0, 0.1))pairColor:Vec3 = new Vec3(1.0, 1.0, 0.1)

@:value(new Vec3(0.7, 0.2, 0.4))shapeColor1:Vec3 = new Vec3(0.7, 0.2, 0.4)

@:value(new Vec3(1.0, 0.8, 0.1))shapeColor2:Vec3 = new Vec3(1.0, 0.8, 0.1)

@:value(new Vec3(0.3, 0.3, 0.8))sleepingShapeColor1:Vec3 = new Vec3(0.3, 0.3, 0.8)

@:value(new Vec3(0.2, 0.8, 0.5))sleepingShapeColor2:Vec3 = new Vec3(0.2, 0.8, 0.5)

@:value(new Vec3(0.5, 0.25, 0.6))sleepyShapeColor1:Vec3 = new Vec3(0.5, 0.25, 0.6)

@:value(new Vec3(0.6, 0.8, 0.3))sleepyShapeColor2:Vec3 = new Vec3(0.6, 0.8, 0.3)

@:value(new Vec3(0.7, 0.7, 0.7))staticShapeColor:Vec3 = new Vec3(0.7, 0.7, 0.7)

\ No newline at end of file diff --git a/docs/oimo/dynamics/common/Performance.html b/docs/oimo/dynamics/common/Performance.html index a56a314..8f13d47 100644 --- a/docs/oimo/dynamics/common/Performance.html +++ b/docs/oimo/dynamics/common/Performance.html @@ -6,4 +6,4 @@ display: inline-block; float: none; text-shadow: 0 0 0 transparent; -

Performance

Static variables

@:value(0)staticbroadPhaseCollisionTime:Float = 0

@:value(0)staticdynamicsTime:Float = 0

@:value(0)staticnarrowPhaseCollisionTime:Float = 0

@:value(0)statictotalTime:Float = 0

\ No newline at end of file +

Performance

Static variables

@:value(0)staticbroadPhaseCollisionTime:Float = 0

@:value(0)staticdynamicsTime:Float = 0

@:value(0)staticnarrowPhaseCollisionTime:Float = 0

@:value(0)statictotalTime:Float = 0

\ No newline at end of file diff --git a/docs/oimo/dynamics/common/index.html b/docs/oimo/dynamics/common/index.html index 2b3618a..c4ec7bc 100644 --- a/docs/oimo/dynamics/common/index.html +++ b/docs/oimo/dynamics/common/index.html @@ -8,4 +8,4 @@ text-shadow: 0 0 0 transparent;

oimo.dynamics.common

OimoPhysics API Documentation

..
DebugDraw

The interface of debug drawer. This provides graphical information of a physics world for debugging softwares. Users should override at least three methods DebugDraw.point, -DebugDraw.triangle, DebugDraw.line.

DebugDrawStyle

Style settings of the debug draw.

Performance

Performance

\ No newline at end of file +DebugDraw.triangle, DebugDraw.line.

DebugDrawStyle

Style settings of the debug draw.

Performance

Performance

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/ConstraintSolver.html b/docs/oimo/dynamics/constraint/ConstraintSolver.html index 563c688..141da1a 100644 --- a/docs/oimo/dynamics/constraint/ConstraintSolver.html +++ b/docs/oimo/dynamics/constraint/ConstraintSolver.html @@ -10,4 +10,4 @@ for computing time-depending data.

preSolvePosition(timeStep:TimeStep):Void

Prepares for position iteration (split impulse or nonlinear Gauss-Seidel). Time step information timeStep is given for computing time-depending data.

This may not be called depending on position correction algorithm.

preSolveVelocity(timeStep:TimeStep):Void

Prepares for velocity iteration. Time step information timeStep is given for -computing time-depending data.

solvePositionNgs(timeStep:TimeStep):Void

Performs single position iteration (nonlinear Gauss-Seidel)

solvePositionSplitImpulse():Void

Performs single position iteration (split impulse)

solveVelocity():Void

Performs single velocity iteration.

warmStart(timeStep:TimeStep):Void

Applies initial impulses.

\ No newline at end of file +computing time-depending data.

solvePositionNgs(timeStep:TimeStep):Void

Performs single position iteration (nonlinear Gauss-Seidel)

solvePositionSplitImpulse():Void

Performs single position iteration (split impulse)

solveVelocity():Void

Performs single velocity iteration.

warmStart(timeStep:TimeStep):Void

Applies initial impulses.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/PositionCorrectionAlgorithm.html b/docs/oimo/dynamics/constraint/PositionCorrectionAlgorithm.html index 97c7346..3ae36a3 100644 --- a/docs/oimo/dynamics/constraint/PositionCorrectionAlgorithm.html +++ b/docs/oimo/dynamics/constraint/PositionCorrectionAlgorithm.html @@ -7,4 +7,4 @@ float: none; text-shadow: 0 0 0 transparent;

The list of the algorithms for position corretion.

Static variables

@:value(_BAUMGARTE)staticread onlyBAUMGARTE:Int = _BAUMGARTE

Baumgarte stabilizaiton. Fastest but introduces extra energy.

@:value(_NGS)staticread onlyNGS:Int = _NGS

Nonlinear Gauss-Seidel method. Slow but stable.

@:value(_SPLIT_IMPULSE)staticread onlySPLIT_IMPULSE:Int = _SPLIT_IMPULSE

Use split impulse and pseudo velocity. Fast enough and does not introduce extra -energy, but somewhat unstable, especially for joints.

\ No newline at end of file +energy, but somewhat unstable, especially for joints.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/contact/ContactConstraint.html b/docs/oimo/dynamics/constraint/contact/ContactConstraint.html index 7f02f32..d44006a 100644 --- a/docs/oimo/dynamics/constraint/contact/ContactConstraint.html +++ b/docs/oimo/dynamics/constraint/contact/ContactConstraint.html @@ -10,4 +10,4 @@ text-shadow: 0 0 0 transparent;

A contact constraint provides collision information for a contact constraint solver. This holds a contact manifold, which has some contact points, contact normals, and -contact impulses. See Manifold for more information.

Methods

inlinegetManifold():Manifold

Returns the contact manifold.

inlinegetShape1():Shape

Returns the first shape of the contact.

inlinegetShape2():Shape

Returns the second shape of the contact.

isTouching():Bool

Returns whether the two rigid bodies are touching.

\ No newline at end of file +contact impulses. See Manifold for more information.

Methods

inlinegetManifold():Manifold

Returns the contact manifold.

inlinegetShape1():Shape

Returns the first shape of the contact.

inlinegetShape2():Shape

Returns the second shape of the contact.

isTouching():Bool

Returns whether the two rigid bodies are touching.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/contact/Manifold.html b/docs/oimo/dynamics/constraint/contact/Manifold.html index 372af96..fbf0110 100644 --- a/docs/oimo/dynamics/constraint/contact/Manifold.html +++ b/docs/oimo/dynamics/constraint/contact/Manifold.html @@ -17,4 +17,4 @@ be disabled (see ManifoldPoint.isEnabled).

inlinegetTangent():Vec3

Returns the tangent vector of the contact manifold. The tangent vector has unit length and is perpendicular to the normal vector.

inlinegetTangentTo(tangent:Vec3):Void

Sets tangent to the tangent vector of the contact manifold. The tangent vector has unit length and is perpendicular to the normal vector.

-

This does not create a new instance of Vec3.

\ No newline at end of file +

This does not create a new instance of Vec3.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/contact/ManifoldPoint.html b/docs/oimo/dynamics/constraint/contact/ManifoldPoint.html index 83a8dc8..b54dd5c 100644 --- a/docs/oimo/dynamics/constraint/contact/ManifoldPoint.html +++ b/docs/oimo/dynamics/constraint/contact/ManifoldPoint.html @@ -11,4 +11,4 @@ data (position, overlap depth, impulse, etc...) for collision response.

Methods

inlinegetBinormalImpulse():Float

Returns the binormal impulse of the manifold point.

inlinegetDepth():Float

Returns the amount of the overlap. If the manifold point is separate, a negative value is returned.

inlinegetNormalImpulse():Float

Returns the normal impulse of the manifold point.

inlinegetPosition1():Vec3

Returns the first rigid body's manifold point in world coordinate.

inlinegetPosition1To(position:Vec3):Void

Sets position to the first rigid body's manifold point in world coordinate. This does not create a new instance of Vec3.

inlinegetPosition2():Vec3

Returns the second rigid body's manifold point in world coordinate.

inlinegetPosition2To(position:Vec3):Void

Sets position to the second rigid body's manifold point in world coordinate. -This does not create a new instance of Vec3.

inlinegetTangentImpulse():Float

Returns the tangent impulse of the manifold point.

inlineisEnabled():Bool

Returns whether the manifold point is enabled.

inlineisWarmStarted():Bool

Returns whether the manifold point has existed for more than two steps.

\ No newline at end of file +This does not create a new instance of Vec3.

inlinegetTangentImpulse():Float

Returns the tangent impulse of the manifold point.

inlineisEnabled():Bool

Returns whether the manifold point is enabled.

inlineisWarmStarted():Bool

Returns whether the manifold point has existed for more than two steps.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/contact/index.html b/docs/oimo/dynamics/constraint/contact/index.html index b8ed503..cc6a60f 100644 --- a/docs/oimo/dynamics/constraint/contact/index.html +++ b/docs/oimo/dynamics/constraint/contact/index.html @@ -9,4 +9,4 @@

oimo.dynamics.constraint.contact

OimoPhysics API Documentation

..
ContactConstraint

A contact constraint provides collision information for a contact constraint solver. This holds a contact manifold, which has some contact points, contact normals, and contact impulses. See Manifold for more information.

Manifold

A contact manifold holds collision data of a pair of shapes.

ManifoldPoint

A manifold point is a contact point in a contact manifold. This holds detailed collision -data (position, overlap depth, impulse, etc...) for collision response.

\ No newline at end of file +data (position, overlap depth, impulse, etc...) for collision response.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/index.html b/docs/oimo/dynamics/constraint/index.html index 41ca69a..4aa54f8 100644 --- a/docs/oimo/dynamics/constraint/index.html +++ b/docs/oimo/dynamics/constraint/index.html @@ -6,4 +6,4 @@ display: inline-block; float: none; text-shadow: 0 0 0 transparent; -

oimo.dynamics.constraint

OimoPhysics API Documentation

..
contact
joint
solver
ConstraintSolver

The base class of all constarint solvers.

PositionCorrectionAlgorithm

The list of the algorithms for position corretion.

\ No newline at end of file +

oimo.dynamics.constraint

OimoPhysics API Documentation

..
contact
joint
solver
ConstraintSolver

The base class of all constarint solvers.

PositionCorrectionAlgorithm

The list of the algorithms for position corretion.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/CylindricalJoint.html b/docs/oimo/dynamics/constraint/joint/CylindricalJoint.html index c74efe8..c26c027 100644 --- a/docs/oimo/dynamics/constraint/joint/CylindricalJoint.html +++ b/docs/oimo/dynamics/constraint/joint/CylindricalJoint.html @@ -35,4 +35,4 @@

See JointType for details.

inlinesetAllowCollision(allowCollision:Bool):Void

Sets whether to allow the connected rigid bodies to collide each other.

inlinesetBreakForce(breakForce:Float):Void

Sets the magnitude of the constraint force at which the joint will be destroyed.

Set 0 for unbreakable joints.

inlinesetBreakTorque(breakTorque:Float):Void

Sets the magnitude of the constraint force at which the joint will be destroyed.

Set 0 for unbreakable joints.

inlinesetPositionCorrectionAlgorithm(positionCorrectionAlgorithm:Int):Void

Sets the type of the position correction algorithm to positionCorrectionAlgorithm for the joint.

-

See PositionCorrectionAlgorithm for details.

\ No newline at end of file +

See PositionCorrectionAlgorithm for details.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/CylindricalJointConfig.html b/docs/oimo/dynamics/constraint/joint/CylindricalJointConfig.html index e01a585..4915c19 100644 --- a/docs/oimo/dynamics/constraint/joint/CylindricalJointConfig.html +++ b/docs/oimo/dynamics/constraint/joint/CylindricalJointConfig.html @@ -11,4 +11,4 @@

Set 0 for unbreakable joints.

breakTorque:Float

The joint will be destroyed when magnitude of the constraint torque exceeds the value.

Set 0 for unbreakable joints.

localAnchor1:Vec3

The local position of the first rigid body's anchor point.

localAnchor2:Vec3

The local position of the second rigid body's anchor point.

positionCorrectionAlgorithm:Int

The type of the position correction algorithm for the joint.

See PositionCorrectionAlgorithm for details.

rigidBody1:RigidBody

The first rigid body attached to the joint.

rigidBody2:RigidBody

The second rigid body attached to the joint.

solverType:Int

The type of the constraint solver for the joint.

-

See ConstraintSolverType for details.

Inherited Methods

\ No newline at end of file +

See ConstraintSolverType for details.

Inherited Methods

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/GenericJoint.html b/docs/oimo/dynamics/constraint/joint/GenericJoint.html index 5a85346..41a73f8 100644 --- a/docs/oimo/dynamics/constraint/joint/GenericJoint.html +++ b/docs/oimo/dynamics/constraint/joint/GenericJoint.html @@ -31,4 +31,4 @@

See JointType for details.

inlinesetAllowCollision(allowCollision:Bool):Void

Sets whether to allow the connected rigid bodies to collide each other.

inlinesetBreakForce(breakForce:Float):Void

Sets the magnitude of the constraint force at which the joint will be destroyed.

Set 0 for unbreakable joints.

inlinesetBreakTorque(breakTorque:Float):Void

Sets the magnitude of the constraint force at which the joint will be destroyed.

Set 0 for unbreakable joints.

inlinesetPositionCorrectionAlgorithm(positionCorrectionAlgorithm:Int):Void

Sets the type of the position correction algorithm to positionCorrectionAlgorithm for the joint.

-

See PositionCorrectionAlgorithm for details.

\ No newline at end of file +

See PositionCorrectionAlgorithm for details.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/GenericJointConfig.html b/docs/oimo/dynamics/constraint/joint/GenericJointConfig.html index a23ec3d..0dd7063 100644 --- a/docs/oimo/dynamics/constraint/joint/GenericJointConfig.html +++ b/docs/oimo/dynamics/constraint/joint/GenericJointConfig.html @@ -11,4 +11,4 @@

Set 0 for unbreakable joints.

breakTorque:Float

The joint will be destroyed when magnitude of the constraint torque exceeds the value.

Set 0 for unbreakable joints.

localAnchor1:Vec3

The local position of the first rigid body's anchor point.

localAnchor2:Vec3

The local position of the second rigid body's anchor point.

positionCorrectionAlgorithm:Int

The type of the position correction algorithm for the joint.

See PositionCorrectionAlgorithm for details.

rigidBody1:RigidBody

The first rigid body attached to the joint.

rigidBody2:RigidBody

The second rigid body attached to the joint.

solverType:Int

The type of the constraint solver for the joint.

-

See ConstraintSolverType for details.

Inherited Methods

\ No newline at end of file +

See ConstraintSolverType for details.

Inherited Methods

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/Joint.html b/docs/oimo/dynamics/constraint/joint/Joint.html index 80187f1..7e733fc 100644 --- a/docs/oimo/dynamics/constraint/joint/Joint.html +++ b/docs/oimo/dynamics/constraint/joint/Joint.html @@ -25,4 +25,4 @@

See JointType for details.

inlinesetAllowCollision(allowCollision:Bool):Void

Sets whether to allow the connected rigid bodies to collide each other.

inlinesetBreakForce(breakForce:Float):Void

Sets the magnitude of the constraint force at which the joint will be destroyed.

Set 0 for unbreakable joints.

inlinesetBreakTorque(breakTorque:Float):Void

Sets the magnitude of the constraint force at which the joint will be destroyed.

Set 0 for unbreakable joints.

inlinesetPositionCorrectionAlgorithm(positionCorrectionAlgorithm:Int):Void

Sets the type of the position correction algorithm to positionCorrectionAlgorithm for the joint.

-

See PositionCorrectionAlgorithm for details.

\ No newline at end of file +

See PositionCorrectionAlgorithm for details.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/JointConfig.html b/docs/oimo/dynamics/constraint/joint/JointConfig.html index d52d1a5..bf95c29 100644 --- a/docs/oimo/dynamics/constraint/joint/JointConfig.html +++ b/docs/oimo/dynamics/constraint/joint/JointConfig.html @@ -12,4 +12,4 @@

Set 0 for unbreakable joints.

breakTorque:Float

The joint will be destroyed when magnitude of the constraint torque exceeds the value.

Set 0 for unbreakable joints.

localAnchor1:Vec3

The local position of the first rigid body's anchor point.

localAnchor2:Vec3

The local position of the second rigid body's anchor point.

positionCorrectionAlgorithm:Int

The type of the position correction algorithm for the joint.

See PositionCorrectionAlgorithm for details.

rigidBody1:RigidBody

The first rigid body attached to the joint.

rigidBody2:RigidBody

The second rigid body attached to the joint.

solverType:Int

The type of the constraint solver for the joint.

-

See ConstraintSolverType for details.

\ No newline at end of file +

See ConstraintSolverType for details.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/JointLink.html b/docs/oimo/dynamics/constraint/joint/JointLink.html index 454f702..5d2a18a 100644 --- a/docs/oimo/dynamics/constraint/joint/JointLink.html +++ b/docs/oimo/dynamics/constraint/joint/JointLink.html @@ -13,4 +13,4 @@ See also ContactLink.

Methods

getContact():Joint

Returns the contact the rigid body is attached to.

getNext():JointLink

Returns the next joint link in the rigid body.

If the previous one does not exist, null will be returned.

getOther():RigidBody

Returns the other rigid body attached to the constraint. This provides a quick access from a rigid body to the other one attached to the constraint.

getPrev():JointLink

Returns the previous joint link in the rigid body.

-

If the previous one does not exist, null will be returned.

\ No newline at end of file +

If the previous one does not exist, null will be returned.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/JointType.html b/docs/oimo/dynamics/constraint/joint/JointType.html index 666563f..f294a36 100644 --- a/docs/oimo/dynamics/constraint/joint/JointType.html +++ b/docs/oimo/dynamics/constraint/joint/JointType.html @@ -13,4 +13,4 @@

See RagdollJoint for details.

@:value(_REVOLUTE)staticread onlyREVOLUTE:Int = _REVOLUTE

Represents a revolute joint.

See RevoluteJoint for details.

@:value(_SPHERICAL)staticread onlySPHERICAL:Int = _SPHERICAL

Represents a spherical joint.

See SphericalJoint for details.

@:value(_UNIVERSAL)staticread onlyUNIVERSAL:Int = _UNIVERSAL

Represents a universal joint.

-

See UniversalJoint for details.

\ No newline at end of file +

See UniversalJoint for details.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/PrismaticJoint.html b/docs/oimo/dynamics/constraint/joint/PrismaticJoint.html index 92b9762..6777407 100644 --- a/docs/oimo/dynamics/constraint/joint/PrismaticJoint.html +++ b/docs/oimo/dynamics/constraint/joint/PrismaticJoint.html @@ -35,4 +35,4 @@

See JointType for details.

inlinesetAllowCollision(allowCollision:Bool):Void

Sets whether to allow the connected rigid bodies to collide each other.

inlinesetBreakForce(breakForce:Float):Void

Sets the magnitude of the constraint force at which the joint will be destroyed.

Set 0 for unbreakable joints.

inlinesetBreakTorque(breakTorque:Float):Void

Sets the magnitude of the constraint force at which the joint will be destroyed.

Set 0 for unbreakable joints.

inlinesetPositionCorrectionAlgorithm(positionCorrectionAlgorithm:Int):Void

Sets the type of the position correction algorithm to positionCorrectionAlgorithm for the joint.

-

See PositionCorrectionAlgorithm for details.

\ No newline at end of file +

See PositionCorrectionAlgorithm for details.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/PrismaticJointConfig.html b/docs/oimo/dynamics/constraint/joint/PrismaticJointConfig.html index faf4a29..bd6e17e 100644 --- a/docs/oimo/dynamics/constraint/joint/PrismaticJointConfig.html +++ b/docs/oimo/dynamics/constraint/joint/PrismaticJointConfig.html @@ -11,4 +11,4 @@

Set 0 for unbreakable joints.

breakTorque:Float

The joint will be destroyed when magnitude of the constraint torque exceeds the value.

Set 0 for unbreakable joints.

localAnchor1:Vec3

The local position of the first rigid body's anchor point.

localAnchor2:Vec3

The local position of the second rigid body's anchor point.

positionCorrectionAlgorithm:Int

The type of the position correction algorithm for the joint.

See PositionCorrectionAlgorithm for details.

rigidBody1:RigidBody

The first rigid body attached to the joint.

rigidBody2:RigidBody

The second rigid body attached to the joint.

solverType:Int

The type of the constraint solver for the joint.

-

See ConstraintSolverType for details.

Inherited Methods

\ No newline at end of file +

See ConstraintSolverType for details.

Inherited Methods

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/RagdollJoint.html b/docs/oimo/dynamics/constraint/joint/RagdollJoint.html index 386679b..4454e7a 100644 --- a/docs/oimo/dynamics/constraint/joint/RagdollJoint.html +++ b/docs/oimo/dynamics/constraint/joint/RagdollJoint.html @@ -46,4 +46,4 @@

See JointType for details.

inlinesetAllowCollision(allowCollision:Bool):Void

Sets whether to allow the connected rigid bodies to collide each other.

inlinesetBreakForce(breakForce:Float):Void

Sets the magnitude of the constraint force at which the joint will be destroyed.

Set 0 for unbreakable joints.

inlinesetBreakTorque(breakTorque:Float):Void

Sets the magnitude of the constraint force at which the joint will be destroyed.

Set 0 for unbreakable joints.

inlinesetPositionCorrectionAlgorithm(positionCorrectionAlgorithm:Int):Void

Sets the type of the position correction algorithm to positionCorrectionAlgorithm for the joint.

-

See PositionCorrectionAlgorithm for details.

\ No newline at end of file +

See PositionCorrectionAlgorithm for details.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/RagdollJointConfig.html b/docs/oimo/dynamics/constraint/joint/RagdollJointConfig.html index 6831d8d..abd9351 100644 --- a/docs/oimo/dynamics/constraint/joint/RagdollJointConfig.html +++ b/docs/oimo/dynamics/constraint/joint/RagdollJointConfig.html @@ -16,4 +16,4 @@

Set 0 for unbreakable joints.

breakTorque:Float

The joint will be destroyed when magnitude of the constraint torque exceeds the value.

Set 0 for unbreakable joints.

localAnchor1:Vec3

The local position of the first rigid body's anchor point.

localAnchor2:Vec3

The local position of the second rigid body's anchor point.

positionCorrectionAlgorithm:Int

The type of the position correction algorithm for the joint.

See PositionCorrectionAlgorithm for details.

rigidBody1:RigidBody

The first rigid body attached to the joint.

rigidBody2:RigidBody

The second rigid body attached to the joint.

solverType:Int

The type of the constraint solver for the joint.

-

See ConstraintSolverType for details.

Inherited Methods

\ No newline at end of file +

See ConstraintSolverType for details.

Inherited Methods

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/RevoluteJoint.html b/docs/oimo/dynamics/constraint/joint/RevoluteJoint.html index 18df0dd..6d6fd8d 100644 --- a/docs/oimo/dynamics/constraint/joint/RevoluteJoint.html +++ b/docs/oimo/dynamics/constraint/joint/RevoluteJoint.html @@ -35,4 +35,4 @@

See JointType for details.

inlinesetAllowCollision(allowCollision:Bool):Void

Sets whether to allow the connected rigid bodies to collide each other.

inlinesetBreakForce(breakForce:Float):Void

Sets the magnitude of the constraint force at which the joint will be destroyed.

Set 0 for unbreakable joints.

inlinesetBreakTorque(breakTorque:Float):Void

Sets the magnitude of the constraint force at which the joint will be destroyed.

Set 0 for unbreakable joints.

inlinesetPositionCorrectionAlgorithm(positionCorrectionAlgorithm:Int):Void

Sets the type of the position correction algorithm to positionCorrectionAlgorithm for the joint.

-

See PositionCorrectionAlgorithm for details.

\ No newline at end of file +

See PositionCorrectionAlgorithm for details.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/RevoluteJointConfig.html b/docs/oimo/dynamics/constraint/joint/RevoluteJointConfig.html index ecbfb74..a2fdea4 100644 --- a/docs/oimo/dynamics/constraint/joint/RevoluteJointConfig.html +++ b/docs/oimo/dynamics/constraint/joint/RevoluteJointConfig.html @@ -11,4 +11,4 @@

Set 0 for unbreakable joints.

breakTorque:Float

The joint will be destroyed when magnitude of the constraint torque exceeds the value.

Set 0 for unbreakable joints.

localAnchor1:Vec3

The local position of the first rigid body's anchor point.

localAnchor2:Vec3

The local position of the second rigid body's anchor point.

positionCorrectionAlgorithm:Int

The type of the position correction algorithm for the joint.

See PositionCorrectionAlgorithm for details.

rigidBody1:RigidBody

The first rigid body attached to the joint.

rigidBody2:RigidBody

The second rigid body attached to the joint.

solverType:Int

The type of the constraint solver for the joint.

-

See ConstraintSolverType for details.

Inherited Methods

\ No newline at end of file +

See ConstraintSolverType for details.

Inherited Methods

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/RotationalLimitMotor.html b/docs/oimo/dynamics/constraint/joint/RotationalLimitMotor.html index 364de51..501d576 100644 --- a/docs/oimo/dynamics/constraint/joint/RotationalLimitMotor.html +++ b/docs/oimo/dynamics/constraint/joint/RotationalLimitMotor.html @@ -11,4 +11,4 @@

The motor is disabled if motorTorque <= 0.

upperLimit:Float

The upper bound of the limit in radians.

The limit is disabled if lowerLimit > upperLimit.

Methods

clone():RotationalLimitMotor

Returns a clone of the object.

setLimits(lower:Float, upper:Float):RotationalLimitMotor

Sets limit properties at once and returns this. this.lowerLimit is set to lower, and this.upperLimit is set to upper.

setMotor(speed:Float, torque:Float):RotationalLimitMotor

Sets motor properties at once and returns this. -this.motorSpeed is set to speed, and this.motorTorque is set to torque.

\ No newline at end of file +this.motorSpeed is set to speed, and this.motorTorque is set to torque.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/SphericalJoint.html b/docs/oimo/dynamics/constraint/joint/SphericalJoint.html index c296a33..037a82b 100644 --- a/docs/oimo/dynamics/constraint/joint/SphericalJoint.html +++ b/docs/oimo/dynamics/constraint/joint/SphericalJoint.html @@ -27,4 +27,4 @@

See JointType for details.

inlinesetAllowCollision(allowCollision:Bool):Void

Sets whether to allow the connected rigid bodies to collide each other.

inlinesetBreakForce(breakForce:Float):Void

Sets the magnitude of the constraint force at which the joint will be destroyed.

Set 0 for unbreakable joints.

inlinesetBreakTorque(breakTorque:Float):Void

Sets the magnitude of the constraint force at which the joint will be destroyed.

Set 0 for unbreakable joints.

inlinesetPositionCorrectionAlgorithm(positionCorrectionAlgorithm:Int):Void

Sets the type of the position correction algorithm to positionCorrectionAlgorithm for the joint.

-

See PositionCorrectionAlgorithm for details.

\ No newline at end of file +

See PositionCorrectionAlgorithm for details.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/SphericalJointConfig.html b/docs/oimo/dynamics/constraint/joint/SphericalJointConfig.html index 29c0f77..ae1b48d 100644 --- a/docs/oimo/dynamics/constraint/joint/SphericalJointConfig.html +++ b/docs/oimo/dynamics/constraint/joint/SphericalJointConfig.html @@ -10,4 +10,4 @@

Set 0 for unbreakable joints.

breakTorque:Float

The joint will be destroyed when magnitude of the constraint torque exceeds the value.

Set 0 for unbreakable joints.

localAnchor1:Vec3

The local position of the first rigid body's anchor point.

localAnchor2:Vec3

The local position of the second rigid body's anchor point.

positionCorrectionAlgorithm:Int

The type of the position correction algorithm for the joint.

See PositionCorrectionAlgorithm for details.

rigidBody1:RigidBody

The first rigid body attached to the joint.

rigidBody2:RigidBody

The second rigid body attached to the joint.

solverType:Int

The type of the constraint solver for the joint.

-

See ConstraintSolverType for details.

Inherited Methods

\ No newline at end of file +

See ConstraintSolverType for details.

Inherited Methods

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/SpringDamper.html b/docs/oimo/dynamics/constraint/joint/SpringDamper.html index 0a5658a..c9ec097 100644 --- a/docs/oimo/dynamics/constraint/joint/SpringDamper.html +++ b/docs/oimo/dynamics/constraint/joint/SpringDamper.html @@ -11,4 +11,4 @@ Set 0.0 to disable the spring and make the constraint totally rigid.

useSymplecticEuler:Bool

Whether to use symplectic Euler method instead of implicit Euler method, to numarically integrate the constraint. Note that symplectic Euler method conserves energy better than implicit Euler method does, but the constraint will be unstable under the high frequency.

Methods

clone():SpringDamper

Returns a clone of the object.

setSpring(frequency:Float, dampingRatio:Float):SpringDamper

Sets spring and damper parameters at once and returns this. -this.frequency is set to frequency, and this.dampingRatio is set to dampingRatio.

setSymplecticEuler(useSymplecticEuler:Bool):SpringDamper

\ No newline at end of file +this.frequency is set to frequency, and this.dampingRatio is set to dampingRatio.

setSymplecticEuler(useSymplecticEuler:Bool):SpringDamper

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/TranslationalLimitMotor.html b/docs/oimo/dynamics/constraint/joint/TranslationalLimitMotor.html index 8617c07..7fe795b 100644 --- a/docs/oimo/dynamics/constraint/joint/TranslationalLimitMotor.html +++ b/docs/oimo/dynamics/constraint/joint/TranslationalLimitMotor.html @@ -11,4 +11,4 @@

The motor is disabled if motorForce <= 0.

motorSpeed:Float

The target speed of the motor in usually meters per second.

upperLimit:Float

The upper bound of the limit in usually meters.

The limit is disabled if lowerLimit > upperLimit.

Methods

clone():TranslationalLimitMotor

Returns a clone of the object.

setLimits(lower:Float, upper:Float):TranslationalLimitMotor

Sets limit properties at once and returns this. this.lowerLimit is set to lower, and this.upperLimit is set to upper.

setMotor(speed:Float, force:Float):TranslationalLimitMotor

Sets motor properties at once and returns this. -this.motorSpeed is set to speed, and this.motorForce is set to force.

\ No newline at end of file +this.motorSpeed is set to speed, and this.motorForce is set to force.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/UniversalJoint.html b/docs/oimo/dynamics/constraint/joint/UniversalJoint.html index 36279f2..8000e2a 100644 --- a/docs/oimo/dynamics/constraint/joint/UniversalJoint.html +++ b/docs/oimo/dynamics/constraint/joint/UniversalJoint.html @@ -35,4 +35,4 @@

See JointType for details.

inlinesetAllowCollision(allowCollision:Bool):Void

Sets whether to allow the connected rigid bodies to collide each other.

inlinesetBreakForce(breakForce:Float):Void

Sets the magnitude of the constraint force at which the joint will be destroyed.

Set 0 for unbreakable joints.

inlinesetBreakTorque(breakTorque:Float):Void

Sets the magnitude of the constraint force at which the joint will be destroyed.

Set 0 for unbreakable joints.

inlinesetPositionCorrectionAlgorithm(positionCorrectionAlgorithm:Int):Void

Sets the type of the position correction algorithm to positionCorrectionAlgorithm for the joint.

-

See PositionCorrectionAlgorithm for details.

\ No newline at end of file +

See PositionCorrectionAlgorithm for details.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/UniversalJointConfig.html b/docs/oimo/dynamics/constraint/joint/UniversalJointConfig.html index 48e0df1..9422f0f 100644 --- a/docs/oimo/dynamics/constraint/joint/UniversalJointConfig.html +++ b/docs/oimo/dynamics/constraint/joint/UniversalJointConfig.html @@ -11,4 +11,4 @@

Set 0 for unbreakable joints.

breakTorque:Float

The joint will be destroyed when magnitude of the constraint torque exceeds the value.

Set 0 for unbreakable joints.

localAnchor1:Vec3

The local position of the first rigid body's anchor point.

localAnchor2:Vec3

The local position of the second rigid body's anchor point.

positionCorrectionAlgorithm:Int

The type of the position correction algorithm for the joint.

See PositionCorrectionAlgorithm for details.

rigidBody1:RigidBody

The first rigid body attached to the joint.

rigidBody2:RigidBody

The second rigid body attached to the joint.

solverType:Int

The type of the constraint solver for the joint.

-

See ConstraintSolverType for details.

Inherited Methods

\ No newline at end of file +

See ConstraintSolverType for details.

Inherited Methods

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/joint/index.html b/docs/oimo/dynamics/constraint/joint/index.html index 80ebd40..05a7e4f 100644 --- a/docs/oimo/dynamics/constraint/joint/index.html +++ b/docs/oimo/dynamics/constraint/joint/index.html @@ -41,4 +41,4 @@ to each other. Rigid bodies can rotate along their constraint axes, but cannot along the direction perpendicular to two constraint axes. This joint provides two degrees of freedom. You can enable lower and upper limits, motors, spring and damper effects -of the two rotational constraints.

UniversalJointConfig

A universal joint config is used for constructions of universal joints.

\ No newline at end of file +of the two rotational constraints.

UniversalJointConfig

A universal joint config is used for constructions of universal joints.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/solver/ConstraintSolverType.html b/docs/oimo/dynamics/constraint/solver/ConstraintSolverType.html index 0ae355d..50c5b6f 100644 --- a/docs/oimo/dynamics/constraint/solver/ConstraintSolverType.html +++ b/docs/oimo/dynamics/constraint/solver/ConstraintSolverType.html @@ -7,4 +7,4 @@ float: none; text-shadow: 0 0 0 transparent;

The list of the constraint solvers.

Static variables

@:value(_DIRECT)staticread onlyDIRECT:Int = _DIRECT

Direct constraint solver. Very stable but not suitable for a situation where fast -computation is required.

@:value(_ITERATIVE)staticread onlyITERATIVE:Int = _ITERATIVE

Iterative constraint solver. Fast and stable enough for common usages.

\ No newline at end of file +computation is required.

@:value(_ITERATIVE)staticread onlyITERATIVE:Int = _ITERATIVE

Iterative constraint solver. Fast and stable enough for common usages.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/solver/direct/DirectJointConstraintSolver.html b/docs/oimo/dynamics/constraint/solver/direct/DirectJointConstraintSolver.html index 00ba554..e8f8e00 100644 --- a/docs/oimo/dynamics/constraint/solver/direct/DirectJointConstraintSolver.html +++ b/docs/oimo/dynamics/constraint/solver/direct/DirectJointConstraintSolver.html @@ -8,4 +8,4 @@ float: none; text-shadow: 0 0 0 transparent;

The direct solver of a mixed linear complementality problem (MLCP) for -joint constraints.

Methods

Inherited Variables

Inherited Methods

\ No newline at end of file +joint constraints.

Methods

Inherited Variables

Inherited Methods

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/solver/direct/index.html b/docs/oimo/dynamics/constraint/solver/direct/index.html index 37eae62..68433b2 100644 --- a/docs/oimo/dynamics/constraint/solver/direct/index.html +++ b/docs/oimo/dynamics/constraint/solver/direct/index.html @@ -7,4 +7,4 @@ float: none; text-shadow: 0 0 0 transparent;

oimo.dynamics.constraint.solver.direct

OimoPhysics API Documentation

..
DirectJointConstraintSolver

The direct solver of a mixed linear complementality problem (MLCP) for -joint constraints.

\ No newline at end of file +joint constraints.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/solver/index.html b/docs/oimo/dynamics/constraint/solver/index.html index b0a449a..01cceae 100644 --- a/docs/oimo/dynamics/constraint/solver/index.html +++ b/docs/oimo/dynamics/constraint/solver/index.html @@ -6,4 +6,4 @@ display: inline-block; float: none; text-shadow: 0 0 0 transparent; -

oimo.dynamics.constraint.solver

OimoPhysics API Documentation

..
direct
pgs
ConstraintSolverType

The list of the constraint solvers.

\ No newline at end of file +

oimo.dynamics.constraint.solver

OimoPhysics API Documentation

..
direct
pgs
ConstraintSolverType

The list of the constraint solvers.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/solver/pgs/PgsContactConstraintSolver.html b/docs/oimo/dynamics/constraint/solver/pgs/PgsContactConstraintSolver.html index 9f27460..0ac05e1 100644 --- a/docs/oimo/dynamics/constraint/solver/pgs/PgsContactConstraintSolver.html +++ b/docs/oimo/dynamics/constraint/solver/pgs/PgsContactConstraintSolver.html @@ -7,4 +7,4 @@ float: none; text-shadow: 0 0 0 transparent;

A contact constraint solver using projected Gauss-Seidel (sequential impulse).

Methods

Inherited Variables

Inherited Methods

Defined by ConstraintSolver

postSolveVelocity(timeStep:TimeStep):Void

Performs post-processes of velocity part. Time step information timeStep is given -for computing time-depending data.

\ No newline at end of file +for computing time-depending data.

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/solver/pgs/PgsJointConstraintSolver.html b/docs/oimo/dynamics/constraint/solver/pgs/PgsJointConstraintSolver.html index 86c8955..98441f1 100644 --- a/docs/oimo/dynamics/constraint/solver/pgs/PgsJointConstraintSolver.html +++ b/docs/oimo/dynamics/constraint/solver/pgs/PgsJointConstraintSolver.html @@ -6,4 +6,4 @@ display: inline-block; float: none; text-shadow: 0 0 0 transparent; -

A joint constraint solver using projected Gauss-Seidel (sequential impulse).

Methods

Inherited Variables

Inherited Methods

\ No newline at end of file +

A joint constraint solver using projected Gauss-Seidel (sequential impulse).

Methods

Inherited Variables

Inherited Methods

\ No newline at end of file diff --git a/docs/oimo/dynamics/constraint/solver/pgs/index.html b/docs/oimo/dynamics/constraint/solver/pgs/index.html index 3b5bb1b..0051d08 100644 --- a/docs/oimo/dynamics/constraint/solver/pgs/index.html +++ b/docs/oimo/dynamics/constraint/solver/pgs/index.html @@ -6,4 +6,4 @@ display: inline-block; float: none; text-shadow: 0 0 0 transparent; -

oimo.dynamics.constraint.solver.pgs

OimoPhysics API Documentation

..
PgsContactConstraintSolver

A contact constraint solver using projected Gauss-Seidel (sequential impulse).

PgsJointConstraintSolver

A joint constraint solver using projected Gauss-Seidel (sequential impulse).

\ No newline at end of file +

oimo.dynamics.constraint.solver.pgs

OimoPhysics API Documentation

..
PgsContactConstraintSolver

A contact constraint solver using projected Gauss-Seidel (sequential impulse).

PgsJointConstraintSolver

A joint constraint solver using projected Gauss-Seidel (sequential impulse).

\ No newline at end of file diff --git a/docs/oimo/dynamics/index.html b/docs/oimo/dynamics/index.html index 82c10e1..d778581 100644 --- a/docs/oimo/dynamics/index.html +++ b/docs/oimo/dynamics/index.html @@ -12,4 +12,4 @@ See also JointLink.

ContactManager

The manager of the contacts in the physics world. A contact of two shapes is created when the AABBs of them begin overlapping, and is destroyed when they end overlapping.

TimeStep

Information of time-step sizes of the simulation.

World

The physics simulation world. This manages entire the dynamic simulation. You can add -rigid bodies and joints to the world to simulate them.

\ No newline at end of file +rigid bodies and joints to the world to simulate them.

\ No newline at end of file diff --git a/docs/oimo/dynamics/rigidbody/MassData.html b/docs/oimo/dynamics/rigidbody/MassData.html index 90d32fb..2e2d882 100644 --- a/docs/oimo/dynamics/rigidbody/MassData.html +++ b/docs/oimo/dynamics/rigidbody/MassData.html @@ -6,4 +6,4 @@ display: inline-block; float: none; text-shadow: 0 0 0 transparent; -

This class holds mass and moment of inertia for a rigid body.

Constructor

new()

Default constructor.

Variables

localInertia:Mat3

Inertia tensor in local space. Zero matrix for a non-dynamic rigid body.

mass:Float

Mass. 0 for a non-dynamic rigid body.

\ No newline at end of file +

This class holds mass and moment of inertia for a rigid body.

Constructor

new()

Default constructor.

Variables

localInertia:Mat3

Inertia tensor in local space. Zero matrix for a non-dynamic rigid body.

mass:Float

Mass. 0 for a non-dynamic rigid body.

\ No newline at end of file diff --git a/docs/oimo/dynamics/rigidbody/RigidBody.html b/docs/oimo/dynamics/rigidbody/RigidBody.html index d78df23..e98bec9 100644 --- a/docs/oimo/dynamics/rigidbody/RigidBody.html +++ b/docs/oimo/dynamics/rigidbody/RigidBody.html @@ -46,4 +46,4 @@

This does not keep any references to transform.

setType(type:Int):Void

Sets the rigid body's type of behaviour.

See RigidBodyType class for details.

inlinesleep():Void

Sets the rigid body's sleep flag true.

This also resets the sleeping timer of the rigid body.

inlinetranslate(translation:Vec3):Void

Translates the position of the rigid body by translation.

inlinewakeUp():Void

Sets the rigid body's sleep flag false.

-

This also resets the sleeping timer of the rigid body.

\ No newline at end of file +

This also resets the sleeping timer of the rigid body.

\ No newline at end of file diff --git a/docs/oimo/dynamics/rigidbody/RigidBodyConfig.html b/docs/oimo/dynamics/rigidbody/RigidBodyConfig.html index 935eaa7..ff1362c 100644 --- a/docs/oimo/dynamics/rigidbody/RigidBodyConfig.html +++ b/docs/oimo/dynamics/rigidbody/RigidBodyConfig.html @@ -13,4 +13,4 @@ this class.

Constructor

new()

Default constructor.

Variables

angularDamping:Float

The damping coefficient of the angular velocity. Set positive values to gradually reduce the angular velocity.

angularVelocity:Vec3

The initial value of the rigid body's angular velocity.

autoSleep:Bool

Whether to automatically sleep the rigid body when it stops moving for a certain period of time, namely Setting.sleepingTimeThreshold.

linearDamping:Float

The damping coefficient of the linear velocity. Set positive values to -gradually reduce the linear velocity.

linearVelocity:Vec3

The initial value of the rigid body's linear velocity.

position:Vec3

The world position of the rigid body's center of gravity.

rotation:Mat3

The rotation matrix of the rigid body.

type:Int

The rigid body's motion type. See RigidBodyType for details.

\ No newline at end of file +gradually reduce the linear velocity.

linearVelocity:Vec3

The initial value of the rigid body's linear velocity.

position:Vec3

The world position of the rigid body's center of gravity.

rotation:Mat3

The rotation matrix of the rigid body.

type:Int

The rigid body's motion type. See RigidBodyType for details.

\ No newline at end of file diff --git a/docs/oimo/dynamics/rigidbody/RigidBodyType.html b/docs/oimo/dynamics/rigidbody/RigidBodyType.html index 032c86f..3aafb52 100644 --- a/docs/oimo/dynamics/rigidbody/RigidBodyType.html +++ b/docs/oimo/dynamics/rigidbody/RigidBodyType.html @@ -11,4 +11,4 @@ that it can have non-zero linear and angular velocities. This is useful for overlapping rigid bodies to pre-computed motions.

@:value(_STATIC)staticread onlySTATIC:Int = _STATIC

Represents a static rigid body. A static rigid body has zero velocities and infinite mass and inertia tensor. The rigid body is not affected by any force or impulse, such as gravity, -constraints, or external forces or impulses added by an user.

\ No newline at end of file +constraints, or external forces or impulses added by an user.

\ No newline at end of file diff --git a/docs/oimo/dynamics/rigidbody/Shape.html b/docs/oimo/dynamics/rigidbody/Shape.html index fe005a1..bba13a1 100644 --- a/docs/oimo/dynamics/rigidbody/Shape.html +++ b/docs/oimo/dynamics/rigidbody/Shape.html @@ -21,4 +21,4 @@ rigid body.

inlinegetTransform():Transform

Returns the world transform of the shape.

inlinegetTransformTo(transform:Transform):Void

Sets transform to the world transform of the shape.

This does not create a new instance of Transform.

inlinesetCollisionGroup(collisionGroup:Int):Void

Sets the shape's collision group bits to collisionGroup.

inlinesetCollisionMask(collisionMask:Int):Void

Sets the shape's collision mask bits to collisionMask.

inlinesetContactCallback(callback:ContactCallback):Void

Sets the contact callback of the shape to callback.

inlinesetDensity(density:Float):Void

Sets the density of the shape to density.

This affects the parent rigid body's mass data.

inlinesetFriction(friction:Float):Void

Sets the coefficient of friction to friction.

inlinesetLocalTransform(transform:Transform):Void

Sets the shape's transform to transform relative to the parent rigid body's transform.

-

This affects the parent rigid body's mass data.

inlinesetRestitution(restitution:Float):Void

Sets the coefficient of restitution to restitution.

\ No newline at end of file +

This affects the parent rigid body's mass data.

inlinesetRestitution(restitution:Float):Void

Sets the coefficient of restitution to restitution.

\ No newline at end of file diff --git a/docs/oimo/dynamics/rigidbody/ShapeConfig.html b/docs/oimo/dynamics/rigidbody/ShapeConfig.html index de7969f..6734ac9 100644 --- a/docs/oimo/dynamics/rigidbody/ShapeConfig.html +++ b/docs/oimo/dynamics/rigidbody/ShapeConfig.html @@ -20,4 +20,4 @@ shape1.collisionGroup & shape2.collisionMask and shape2.collisionGroup & shape1.collisionMask are not zero.

contactCallback:ContactCallback

The contact callback of the shape. The callback methods are called when contact events the shape is involved occurred.

density:Float

The density of the shape, usually in Kg/m^3.

friction:Float

The coefficient of friction of the shape.

geometry:Geometry

The collision geometry of the shape.

position:Vec3

The shape's local position relative to the parent rigid body's origin.

restitution:Float

The coefficient of restitution of the shape.

rotation:Mat3

The shape's local rotation matrix relative to the parent rigid body's -rotation.

\ No newline at end of file +rotation.

\ No newline at end of file diff --git a/docs/oimo/dynamics/rigidbody/index.html b/docs/oimo/dynamics/rigidbody/index.html index 226f18b..cc4308e 100644 --- a/docs/oimo/dynamics/rigidbody/index.html +++ b/docs/oimo/dynamics/rigidbody/index.html @@ -16,4 +16,4 @@ with some physical properties such as coefficients of friction and restitution. The collision geometry can locally be transformed relative to the parent rigid body's center of gravity.

ShapeConfig

A shape configuration is used for construction of shapes. An instance of this class can safely be reused as a shape will not have any references -of a field of this class.

\ No newline at end of file +of a field of this class.

\ No newline at end of file diff --git a/docs/oimo/index.html b/docs/oimo/index.html index 3732e71..f18a13e 100644 --- a/docs/oimo/index.html +++ b/docs/oimo/index.html @@ -6,4 +6,4 @@ display: inline-block; float: none; text-shadow: 0 0 0 transparent; -

oimo

OimoPhysics API Documentation

..
collision
common
dynamics
\ No newline at end of file +

oimo

OimoPhysics API Documentation

..
collision
common
dynamics
\ No newline at end of file diff --git a/package.json b/package.json index 02f9e8e..b02749f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oimophysics", - "version": "1.2.2", + "version": "1.2.4", "description": "A lightweight 3D physics engine.", "type": "module", "main": "./bin/js_modules/OimoPhysics.js",