Skip to content

Commit

Permalink
1.2.0 update
Browse files Browse the repository at this point in the history
* fixed `Mat4.ortho`
* modified macros
* moved demo sources from /src to /demo/src/
* fixed collision filtering bug
* added `RigidBody.isSleeping`
  • Loading branch information
saharan committed Jan 22, 2018
1 parent 262eb59 commit a4f307b
Show file tree
Hide file tree
Showing 152 changed files with 182 additions and 158 deletions.
17 changes: 10 additions & 7 deletions bin/js/OimoPhysics.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* OimoPhysics 1.1.2 (c) 2018 saharan, The MIT License
* OimoPhysics 1.2.0 (c) 2018 saharan, The MIT License
*/
(function () { "use strict";
(function (window) { "use strict";
function $extend(from, fields) {
function Inherit() {} Inherit.prototype = from; var proto = new Inherit();
for (var name in fields) proto[name] = fields[name];
Expand Down Expand Up @@ -16412,7 +16412,7 @@ oimo_common_Mat4.prototype = {
this.e30 = 0;
this.e31 = 0;
this.e32 = 0;
this.e33 = 0;
this.e33 = 1;
return this;
}
,toArray: function(columnMajor) {
Expand Down Expand Up @@ -17525,7 +17525,7 @@ oimo_dynamics_ContactManager.prototype = {
var aabb2 = s2._aabb;
var proxy1 = s1._proxy;
var proxy2 = s2._proxy;
if(!(proxy1._aabbMinX < proxy2._aabbMaxX && proxy1._aabbMaxX > proxy2._aabbMinX && proxy1._aabbMinY < proxy2._aabbMaxY && proxy1._aabbMaxY > proxy2._aabbMinY && proxy1._aabbMinZ < proxy2._aabbMaxZ && proxy1._aabbMaxZ > proxy2._aabbMinZ)) {
if(!(proxy1._aabbMinX < proxy2._aabbMaxX && proxy1._aabbMaxX > proxy2._aabbMinX && proxy1._aabbMinY < proxy2._aabbMaxY && proxy1._aabbMaxY > proxy2._aabbMinY && proxy1._aabbMinZ < proxy2._aabbMaxZ && proxy1._aabbMaxZ > proxy2._aabbMinZ) || !this.shouldCollide(s1,s2)) {
var prev3 = c._prev;
var next3 = c._next;
if(prev3 != null) {
Expand Down Expand Up @@ -40251,6 +40251,9 @@ oimo_dynamics_rigidbody_RigidBody.prototype = {
this._sleeping = true;
this._sleepTime = 0;
}
,isSleeping: function() {
return this._sleeping;
}
,getSleepTime: function() {
return this._sleepTime;
}
Expand Down Expand Up @@ -40751,7 +40754,6 @@ var oimo_dynamics_rigidbody_ShapeConfig = function() {
this.geometry = null;
this.contactCallback = null;
};
var oimo_m_M = function() { };
oimo_collision_broadphase_BroadPhaseType._BRUTE_FORCE = 1;
oimo_collision_broadphase_BroadPhaseType._BVH = 2;
oimo_collision_broadphase_BroadPhaseType.BRUTE_FORCE = 1;
Expand Down Expand Up @@ -40881,6 +40883,7 @@ oimo_dynamics_rigidbody_RigidBodyType.DYNAMIC = 0;
oimo_dynamics_rigidbody_RigidBodyType.STATIC = 1;
oimo_dynamics_rigidbody_RigidBodyType.KINEMATIC = 2;
window["OIMO"] = {};
window["OIMO"]["DebugDraw"] = oimo_dynamics_common_DebugDraw;
window["OIMO"]["BroadPhase"] = oimo_collision_broadphase_BroadPhase;
oimo_collision_broadphase_BroadPhase.prototype["createProxy"] = oimo_collision_broadphase_BroadPhase.prototype.createProxy;
oimo_collision_broadphase_BroadPhase.prototype["destroyProxy"] = oimo_collision_broadphase_BroadPhase.prototype.destroyProxy;
Expand Down Expand Up @@ -41221,7 +41224,6 @@ window["OIMO"]["RayCastCallback"] = oimo_dynamics_callback_RayCastCallback;
window["OIMO"]["RayCastClosest"] = oimo_dynamics_callback_RayCastClosest;
oimo_dynamics_callback_RayCastClosest.prototype["clear"] = oimo_dynamics_callback_RayCastClosest.prototype.clear;
oimo_dynamics_callback_RayCastClosest.prototype["process"] = oimo_dynamics_callback_RayCastClosest.prototype.process;
window["OIMO"]["DebugDraw"] = oimo_dynamics_common_DebugDraw;
window["OIMO"]["DebugDrawStyle"] = oimo_dynamics_common_DebugDrawStyle;
window["OIMO"]["Performance"] = oimo_dynamics_common_Performance;
window["OIMO"]["ConstraintSolver"] = oimo_dynamics_constraint_ConstraintSolver;
Expand Down Expand Up @@ -41481,6 +41483,7 @@ oimo_dynamics_rigidbody_RigidBody.prototype["getType"] = oimo_dynamics_rigidbody
oimo_dynamics_rigidbody_RigidBody.prototype["setType"] = oimo_dynamics_rigidbody_RigidBody.prototype.setType;
oimo_dynamics_rigidbody_RigidBody.prototype["wakeUp"] = oimo_dynamics_rigidbody_RigidBody.prototype.wakeUp;
oimo_dynamics_rigidbody_RigidBody.prototype["sleep"] = oimo_dynamics_rigidbody_RigidBody.prototype.sleep;
oimo_dynamics_rigidbody_RigidBody.prototype["isSleeping"] = oimo_dynamics_rigidbody_RigidBody.prototype.isSleeping;
oimo_dynamics_rigidbody_RigidBody.prototype["getSleepTime"] = oimo_dynamics_rigidbody_RigidBody.prototype.getSleepTime;
oimo_dynamics_rigidbody_RigidBody.prototype["setAutoSleep"] = oimo_dynamics_rigidbody_RigidBody.prototype.setAutoSleep;
oimo_dynamics_rigidbody_RigidBody.prototype["getLinearDamping"] = oimo_dynamics_rigidbody_RigidBody.prototype.getLinearDamping;
Expand Down Expand Up @@ -41516,4 +41519,4 @@ oimo_dynamics_rigidbody_Shape.prototype["setContactCallback"] = oimo_dynamics_ri
oimo_dynamics_rigidbody_Shape.prototype["getPrev"] = oimo_dynamics_rigidbody_Shape.prototype.getPrev;
oimo_dynamics_rigidbody_Shape.prototype["getNext"] = oimo_dynamics_rigidbody_Shape.prototype.getNext;
window["OIMO"]["ShapeConfig"] = oimo_dynamics_rigidbody_ShapeConfig;
})();
})(window);
2 changes: 1 addition & 1 deletion bin/js/OimoPhysics.min.js

Large diffs are not rendered by default.

52 changes: 26 additions & 26 deletions bin/js/externs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
// externs for closure compiler
OIMO.DebugDraw.wireframe;
OIMO.DebugDraw.drawShapes;
OIMO.DebugDraw.drawBvh;
OIMO.DebugDraw.drawBvhMinLevel;
OIMO.DebugDraw.drawBvhMaxLevel;
OIMO.DebugDraw.drawAabbs;
OIMO.DebugDraw.drawBases;
OIMO.DebugDraw.drawPairs;
OIMO.DebugDraw.drawContacts;
OIMO.DebugDraw.drawContactBases;
OIMO.DebugDraw.drawJoints;
OIMO.DebugDraw.drawJointLimits;
OIMO.DebugDraw.style;
OIMO.DebugDraw.aabb;
OIMO.DebugDraw.basis;
OIMO.DebugDraw.ellipse;
OIMO.DebugDraw.arc;
OIMO.DebugDraw.cone;
OIMO.DebugDraw.cylinder;
OIMO.DebugDraw.capsule;
OIMO.DebugDraw.sphere;
OIMO.DebugDraw.box;
OIMO.DebugDraw.rect;
OIMO.DebugDraw.point;
OIMO.DebugDraw.triangle;
OIMO.DebugDraw.line;
OIMO.BroadPhaseType.BRUTE_FORCE;
OIMO.BroadPhaseType.BVH;
OIMO.Proxy.userData;
Expand Down Expand Up @@ -123,32 +149,6 @@ OIMO.RayCastClosest.position;
OIMO.RayCastClosest.normal;
OIMO.RayCastClosest.fraction;
OIMO.RayCastClosest.hit;
OIMO.DebugDraw.wireframe;
OIMO.DebugDraw.drawShapes;
OIMO.DebugDraw.drawBvh;
OIMO.DebugDraw.drawBvhMinLevel;
OIMO.DebugDraw.drawBvhMaxLevel;
OIMO.DebugDraw.drawAabbs;
OIMO.DebugDraw.drawBases;
OIMO.DebugDraw.drawPairs;
OIMO.DebugDraw.drawContacts;
OIMO.DebugDraw.drawContactBases;
OIMO.DebugDraw.drawJoints;
OIMO.DebugDraw.drawJointLimits;
OIMO.DebugDraw.style;
OIMO.DebugDraw.aabb;
OIMO.DebugDraw.basis;
OIMO.DebugDraw.ellipse;
OIMO.DebugDraw.arc;
OIMO.DebugDraw.cone;
OIMO.DebugDraw.cylinder;
OIMO.DebugDraw.capsule;
OIMO.DebugDraw.sphere;
OIMO.DebugDraw.box;
OIMO.DebugDraw.rect;
OIMO.DebugDraw.point;
OIMO.DebugDraw.triangle;
OIMO.DebugDraw.line;
OIMO.DebugDrawStyle.shapeColor1;
OIMO.DebugDrawStyle.shapeColor2;
OIMO.DebugDrawStyle.sleepyShapeColor1;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
display: inline-block;
float: none;
text-shadow: 0 0 0 transparent;
</style><nav class="nav"><div class="navbar"><div class="navbar-inner" style="background:#FAFAFA; border-bottom:1px solid rgba(0,0,0,.09)"><div class="container"><a class="brand" style="color:#000000" href="./">OimoPhysics API documentation</a></div></div></div></nav><div class="container main-content"><div class="row-fluid"><div class="span3"><div class="well sidebar-nav"><form class="form-search" id="searchForm"><div class="input-prepend input-block-level"><span class="add-on"><i class="icon-search"></i></span><input id="search" type="text" placeholder="Search" autocomplete="off"/></div></form></div><div class="well sidebar-nav"><div id="nav"></div></div></div><div class="span9"><h1>top level <small>version 1.1.2</small></h1><p>OimoPhysics API Documentation</p> <table class="table table-condensed"><tbody><tr class="package"><td colspan="2"><i class="fa fa-folder-o"></i><a href="./oimo/index.html" title=".oimo">oimo</a></td></tr></tbody></table></div></div></div><footer class="section site-footer" style="background:#FAFAFA"><div class="container"><div class="copyright"><p style="color:#000000">This documentation is generated for version 1.1.2</p><p style="color:#000000">&copy; 2018 &nbsp;<a style="color:#000000" href="https://github.com/saharan/OimoPhysics">https://github.com/saharan/OimoPhysics</a></p></div></div></footer><script src=".//highlighter.js"></script><link href="./highlighter.css" rel="stylesheet"/></body></html>
</style><nav class="nav"><div class="navbar"><div class="navbar-inner" style="background:#FAFAFA; border-bottom:1px solid rgba(0,0,0,.09)"><div class="container"><a class="brand" style="color:#000000" href="./">OimoPhysics API documentation</a></div></div></div></nav><div class="container main-content"><div class="row-fluid"><div class="span3"><div class="well sidebar-nav"><form class="form-search" id="searchForm"><div class="input-prepend input-block-level"><span class="add-on"><i class="icon-search"></i></span><input id="search" type="text" placeholder="Search" autocomplete="off"/></div></form></div><div class="well sidebar-nav"><div id="nav"></div></div></div><div class="span9"><h1>top level <small>version 1.2.0</small></h1><p>OimoPhysics API Documentation</p> <table class="table table-condensed"><tbody><tr class="package"><td colspan="2"><i class="fa fa-folder-o"></i><a href="./oimo/index.html" title=".oimo">oimo</a></td></tr></tbody></table></div></div></div><footer class="section site-footer" style="background:#FAFAFA"><div class="container"><div class="copyright"><p style="color:#000000">This documentation is generated for version 1.2.0</p><p style="color:#000000">&copy; 2018 &nbsp;<a style="color:#000000" href="https://github.com/saharan/OimoPhysics">https://github.com/saharan/OimoPhysics</a></p></div></div></footer><script src=".//highlighter.js"></script><link href="./highlighter.css" rel="stylesheet"/></body></html>
2 changes: 1 addition & 1 deletion docs/oimo/collision/broadphase/BroadPhase.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
than the containing AABBs, two proxies may overlap even though their inner AABBs are separate.</p></div></div><div class="field "><a name="moveProxy"></a><h3><p><code><a href="#moveProxy"><span class="identifier">moveProxy</span></a> (<span style="white-space:nowrap">proxy:<a class="type" title="A proxy is an object that can be added to a broad-phase collision detection algorithm." href="../../../oimo/collision/broadphase/Proxy.html">Proxy</a>,</span> <span style="white-space:nowrap">aabb:<a class="type" title="The axis-aligned bounding box." href="../../../oimo/collision/geometry/Aabb.html">Aabb</a>,</span> <span style="white-space:nowrap">displacement:<a class="type" title="3D vector class." href="../../../oimo/common/Vec3.html">Vec3</a></span>):<span class="type">Void</span></code></p></h3><div class="doc"><p>Moves the proxy <code>proxy</code> to the axis-aligned bounding box <code>aabb</code>. <code>displacement</code> is the
difference between current and previous center of the AABB. This is used for predicting
movement of the proxy.</p></div></div><div class="field "><a name="rayCast"></a><h3><p><code><a href="#rayCast"><span class="identifier">rayCast</span></a> (<span style="white-space:nowrap">begin:<a class="type" title="3D vector class." href="../../../oimo/common/Vec3.html">Vec3</a>,</span> <span style="white-space:nowrap">end:<a class="type" title="3D vector class." href="../../../oimo/common/Vec3.html">Vec3</a>,</span> <span style="white-space:nowrap">callback:<a class="type" title="A callback class for queries in a broad phase." href="../../../oimo/collision/broadphase/BroadPhaseProxyCallback.html">BroadPhaseProxyCallback</a></span>):<span class="type">Void</span></code></p></h3><div class="doc"><p>Performs a ray casting. <code>callback.process</code> is called for all proxies the line segment
from <code>begin</code> to <code>end</code> intersects.</p></div></div></div></div></div></div></div><footer class="section site-footer" style="background:#FAFAFA"><div class="container"><div class="copyright"><p style="color:#000000">This documentation is generated for version 1.1.2</p><p style="color:#000000">&copy; 2018 &nbsp;<a style="color:#000000" href="https://github.com/saharan/OimoPhysics">https://github.com/saharan/OimoPhysics</a></p></div></div></footer><script src="../../..//highlighter.js"></script><link href="../../../highlighter.css" rel="stylesheet"/></body></html>
from <code>begin</code> to <code>end</code> intersects.</p></div></div></div></div></div></div></div><footer class="section site-footer" style="background:#FAFAFA"><div class="container"><div class="copyright"><p style="color:#000000">This documentation is generated for version 1.2.0</p><p style="color:#000000">&copy; 2018 &nbsp;<a style="color:#000000" href="https://github.com/saharan/OimoPhysics">https://github.com/saharan/OimoPhysics</a></p></div></div></footer><script src="../../..//highlighter.js"></script><link href="../../../highlighter.css" rel="stylesheet"/></body></html>
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
display: inline-block;
float: none;
text-shadow: 0 0 0 transparent;
</style><nav class="nav"><div class="navbar"><div class="navbar-inner" style="background:#FAFAFA; border-bottom:1px solid rgba(0,0,0,.09)"><div class="container"><a class="brand" style="color:#000000" href="../../../">OimoPhysics API documentation</a></div></div></div></nav><div class="container main-content"><div class="row-fluid"><div class="span3"><div class="well sidebar-nav"><form class="form-search" id="searchForm"><div class="input-prepend input-block-level"><span class="add-on"><i class="icon-search"></i></span><input id="search" type="text" placeholder="Search" autocomplete="off"/></div></form></div><div class="well sidebar-nav"><div id="nav"></div></div></div><div class="span9"><div class="page-header"><span class="viewsource"><a href="https://github.com/saharan/OimoPhysics/tree/master/src/oimo/collision/broadphase/BroadPhaseProxyCallback.hx" class="btn btn-medium"><i class="fa fa-eye"></i> View source</a></span><h1><small>class</small> BroadPhaseProxyCallback</h1><h4><small>package <a href="../../../oimo/collision/broadphase/index.html">oimo.collision.broadphase</a></small></h4> </div><div class="body"><div class="doc doc-main"><div class="indent"><p>A callback class for queries in a broad phase.</p></div></div><h3 class="section">Constructor</h3><div class="fields"><div class="field "><a name="new"></a><h3><p><code><a href="#new"><span class="identifier">new</span></a> ()</code></p></h3><div class="doc"><p>Default constructor.</p></div></div></div><h3 class="section">Methods</h3><div class="fields"><div class="field "><a name="process"></a><h3><p><code><a href="#process"><span class="identifier">process</span></a> (<span style="white-space:nowrap">proxy:<a class="type" title="A proxy is an object that can be added to a broad-phase collision detection algorithm." href="../../../oimo/collision/broadphase/Proxy.html">Proxy</a></span>):<span class="type">Void</span></code></p></h3><div class="doc"><p>This is called every time a broad phase algorithm reports a proxy <code>proxy</code>.</p></div></div></div></div></div></div></div><footer class="section site-footer" style="background:#FAFAFA"><div class="container"><div class="copyright"><p style="color:#000000">This documentation is generated for version 1.1.2</p><p style="color:#000000">&copy; 2018 &nbsp;<a style="color:#000000" href="https://github.com/saharan/OimoPhysics">https://github.com/saharan/OimoPhysics</a></p></div></div></footer><script src="../../..//highlighter.js"></script><link href="../../../highlighter.css" rel="stylesheet"/></body></html>
</style><nav class="nav"><div class="navbar"><div class="navbar-inner" style="background:#FAFAFA; border-bottom:1px solid rgba(0,0,0,.09)"><div class="container"><a class="brand" style="color:#000000" href="../../../">OimoPhysics API documentation</a></div></div></div></nav><div class="container main-content"><div class="row-fluid"><div class="span3"><div class="well sidebar-nav"><form class="form-search" id="searchForm"><div class="input-prepend input-block-level"><span class="add-on"><i class="icon-search"></i></span><input id="search" type="text" placeholder="Search" autocomplete="off"/></div></form></div><div class="well sidebar-nav"><div id="nav"></div></div></div><div class="span9"><div class="page-header"><span class="viewsource"><a href="https://github.com/saharan/OimoPhysics/tree/master/src/oimo/collision/broadphase/BroadPhaseProxyCallback.hx" class="btn btn-medium"><i class="fa fa-eye"></i> View source</a></span><h1><small>class</small> BroadPhaseProxyCallback</h1><h4><small>package <a href="../../../oimo/collision/broadphase/index.html">oimo.collision.broadphase</a></small></h4> </div><div class="body"><div class="doc doc-main"><div class="indent"><p>A callback class for queries in a broad phase.</p></div></div><h3 class="section">Constructor</h3><div class="fields"><div class="field "><a name="new"></a><h3><p><code><a href="#new"><span class="identifier">new</span></a> ()</code></p></h3><div class="doc"><p>Default constructor.</p></div></div></div><h3 class="section">Methods</h3><div class="fields"><div class="field "><a name="process"></a><h3><p><code><a href="#process"><span class="identifier">process</span></a> (<span style="white-space:nowrap">proxy:<a class="type" title="A proxy is an object that can be added to a broad-phase collision detection algorithm." href="../../../oimo/collision/broadphase/Proxy.html">Proxy</a></span>):<span class="type">Void</span></code></p></h3><div class="doc"><p>This is called every time a broad phase algorithm reports a proxy <code>proxy</code>.</p></div></div></div></div></div></div></div><footer class="section site-footer" style="background:#FAFAFA"><div class="container"><div class="copyright"><p style="color:#000000">This documentation is generated for version 1.2.0</p><p style="color:#000000">&copy; 2018 &nbsp;<a style="color:#000000" href="https://github.com/saharan/OimoPhysics">https://github.com/saharan/OimoPhysics</a></p></div></div></footer><script src="../../..//highlighter.js"></script><link href="../../../highlighter.css" rel="stylesheet"/></body></html>
Loading

0 comments on commit a4f307b

Please sign in to comment.