Permalink
Browse files

Added BHV-Tree ported from Turbulenz Engine

  • Loading branch information...
tzaeschke committed Dec 17, 2017
1 parent df83535 commit 06e2a1402fcb6633657f929bc1e08f60cb459d37
View
@@ -3,6 +3,8 @@
- Changed to Java 7 and updated some maven dependencies
- Implemented/migrated multi-threading for the stepper (Pjotr)
- SAP-Space optimization: Avoid collision detection for immobile bodies (Pjotr)
- New BVH tree for better scalability with many bodies, ported from the Turbulenz Engine (Pjotr)
0.3.1
View
@@ -25,6 +25,7 @@ News
* Java 7 and updated dependencies
* Implemented/migrated multi-threading for the stepper (Pjotr)
* SAP-Space optimization: Avoid collision detection for immobile bodies (Pjotr)
* New BVH tree for [better scalability with 10'000 bodies or more](https://github.com/tzaeschke/ode4j/pull/58), ported from the [Turbulenz Engine](https://github.com/turbulenz/turbulenz_engine) (Pjotr)
2017-10-06: Release of ode4j 0.3.1
@@ -48,17 +49,20 @@ Like the original ODE, ode4j is licensed under GPL v2.1 and BSD 3-clause. Choose
### ode4j contains Java ports of the following software
ODE/OpenDE:
[ODE/OpenDE](http://www.ode.org/):
Copyright (c) 2001,2002 Russell L. Smith
All rights reserved.
GIMPACT:
GIMPACT (part of ODE/OpenDE):
Copyright of GIMPACT (c) 2006 Francisco Leon. C.C. 80087371.
email: projectileman(AT)yahoo.com
LIBCCD:
Copyright (c) 2010 Daniel Fiser <danfis(AT)danfis.cz>
[LIBCCD](https://github.com/danfis/libccd):
Copyright (c) 2010 Daniel Fiser <danfis(AT)danfis.cz>;
3-clause BSD License
[Turbulenz Engine](https://github.com/turbulenz/turbulenz_engine):
Copyright (c) 2009-2014 Turbulenz Limited; MIT License
### ode4j uses the following libraries
@@ -0,0 +1,21 @@
Copyright (c) 2009-2014 Turbulenz Limited
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,21 @@
Copyright (c) 2009-2014 Turbulenz Limited
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,36 @@
/*************************************************************************
* *
* Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. *
* All rights reserved. Email: russ@q12.org Web: www.q12.org *
* Open Dynamics Engine 4J, Copyright (C) 2009-2014 Tilmann Zaeschke *
* All rights reserved. Email: ode4j@gmx.de Web: www.ode4j.org *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of EITHER: *
* (1) The GNU Lesser General Public License as published by the Free *
* Software Foundation; either version 2.1 of the License, or (at *
* your option) any later version. The text of the GNU Lesser *
* General Public License is included with this library in the *
* file LICENSE.TXT. *
* (2) The BSD-style license that is included with this library in *
* the file ODE-LICENSE-BSD.TXT and ODE4J-LICENSE-BSD.TXT. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files *
* LICENSE.TXT, ODE-LICENSE-BSD.TXT and ODE4J-LICENSE-BSD.TXT for more *
* details. *
* *
*************************************************************************/
package org.ode4j.ode;
public interface DBhvSpace extends DSpace {
// intentionally undefined, don't use these
// dSimpleSpace (dSimpleSpace &);
// void operator= (dSimpleSpace &);
// public
// dSimpleSpace (dSpace space)
// { _id = (dGeom) dSimpleSpaceCreate (space); }
}
@@ -33,6 +33,7 @@
import org.ode4j.ode.DTriMesh.DTriArrayCallback;
import org.ode4j.ode.DTriMesh.DTriCallback;
import org.ode4j.ode.DTriMesh.DTriRayCallback;
import org.ode4j.ode.internal.DxBVHSpace;
import org.ode4j.ode.internal.DxBody;
import org.ode4j.ode.internal.DxBox;
import org.ode4j.ode.internal.DxCapsule;
@@ -47,6 +48,7 @@
import org.ode4j.ode.internal.DxQuadTreeSpace;
import org.ode4j.ode.internal.DxRay;
import org.ode4j.ode.internal.DxSAPSpace;
import org.ode4j.ode.internal.DxSAPSpace2;
import org.ode4j.ode.internal.DxSimpleSpace;
import org.ode4j.ode.internal.DxSpace;
import org.ode4j.ode.internal.DxSphere;
@@ -477,6 +479,25 @@ public static DSapSpace createSapSpace (DSapSpace.AXES axes) {
public static DSapSpace createSapSpace (DSpace space, DSapSpace.AXES axes) {
return DxSAPSpace.dSweepAndPruneSpaceCreate((DxSpace) space, axes.getCode());
}
/**
* @param axes DSapSpace.AXES
* @param staticGeomCategoryMask Geoms that are marked as static are not checked
* for mutual collision. See SpacePerformanceTest for an example.
* @return SAP Space
*/
public static DSapSpace createSapSpace2 (DSapSpace.AXES axes, long staticGeomCategoryMask) {
return DxSAPSpace2.dSweepAndPruneSpaceCreate(null, axes.getCode(), staticGeomCategoryMask);
}
/**
* @param space
* @param axes DSapSpace.AXES
* @param staticGeomCategoryMask Geoms that are marked as static are not checked
* for mutual collision. See SpacePerformanceTest for an example.
* @return SAP space
*/
public static DSapSpace createSapSpace2 (DSpace space, DSapSpace.AXES axes, long staticGeomCategoryMask) {
return DxSAPSpace2.dSweepAndPruneSpaceCreate((DxSpace) space, axes.getCode(), staticGeomCategoryMask);
}
//ODE_API
public static DHashSpace createHashSpace () {
return DxHashSpace.dHashSpaceCreate(null);
@@ -497,6 +518,28 @@ public static DQuadTreeSpace createQuadTreeSpace (DSpace space,
return DxQuadTreeSpace.dQuadTreeSpaceCreate((DxSpace) space,
Center, Extents, Depth);
}
/**
* @param staticGeomCategoryMask Geoms that are marked as static are not checked
* for mutual collision. See SpacePerformanceTest for an example.
* @return SAP Space
*/
public static DBhvSpace createBHVSpace (long staticGeomCategoryMask) {
return DxBVHSpace.bvhSpaceCreate(null, 16, false, 0.2, staticGeomCategoryMask);
}
/**
* @param space
* @param nodesPerLeaf Suggested default: 4-16
* @param highQuality Suggested default: false
* @param fatAabbMargin Suggested default: 0.2
* @param staticGeomCategoryMask Geoms that are marked as static are not checked
* for mutual collision. See SpacePerformanceTest for an example.
* @return SAP space
*/
public static DBhvSpace createBHVSpace (DSpace space, int nodesPerLeaf, boolean highQuality,
double fatAabbMargin, long staticGeomCategoryMask) {
return DxBVHSpace.bvhSpaceCreate((DxSpace) space, nodesPerLeaf, highQuality, fatAabbMargin,
staticGeomCategoryMask);
}
/**
* Create a box geom with the provided side lengths.
Oops, something went wrong.

0 comments on commit 06e2a14

Please sign in to comment.