Commit 18782cb5 authored by Leopold Palomo-Avellaneda's avatar Leopold Palomo-Avellaneda

Updated version 0.15.2 from 'upstream/0.15.2'

with Debian dir 3edc30f7c95c868e0e2749f0348e9820270c7ab9
parents ea712781 c252b0c7
repo: 5ec20c9e20a4a77b0aa9c21aa4c7a1e1f60978f8
node: a77b1d06e3a62b0116e7d3c4be4c6beaac8726ea
branch: default
tag: 0.14
syntax: glob
*~
*.dll
*.la
*.lo
*.o
.deps
.libs
aclocal.m4
autom4te.cache
compile
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
depcomp
install-sh
libtool
ltmain.sh
Makefile.in
Makefile
missing
ode.pc
ode-config
stamp-h1
test-driver
# these need to be matched in specific directories
./m4/libtool.m4
./m4/lt*.m4
drawstuff/dstest/dstest
include/ode/precision.h
include/ode/version.h
libccd/src/ccd/precision.h
ou/test/outest
tests/tests
tests/tests.log
tests/tests.trs
tests/test-suite.log
ode/doc/Doxyfile
syntax: regexp
# ignore all demo binaries, but not the sources
ode/demo/demo_.+\.exe$
ode/demo/demo_[^\.]+$
ode/doc/html/.*
02323d9c578ea6e8402a4cc94ba83f7b01fdf9da 0.11.1
04753789554b7371c98fbc5b7a57d6c9fee3c77e 0.11
0c6e0b202f5fae5edd153ca07db7bda309120ca4 0.13
11593854d3a22631d4b844ab7623e7e7f356463f 0.10
343c198c9c354109607b851a4ed24a4acb1e82f2 0.5.0
4c5b2efcfe76121081ce91fc3ab2467a1d647ae4 0.0.25
4d088b69715a2322e16b3c151d6ba5488741689f 0.12
5d74d867a1160d5e2710ad6ca741a37302e75444 0.8
89e0edc22deac01374d422bf24b0621957ff8d4d 0.0.35
c528f26e7eb8e95aa14d68e0c76f2acf0bca2ddf 0.0.1
f89ea1ff3fc1b669d5f7b8d8475580b00f28ba9c 0.10.1
f6383a55d1a34cf18200dcc38b19536387cee7f5 0.13.1
4cf81eb385f506785054e0773d94f89eff7484f9 0.13.2
7b0c5226eb9c3090e1b8a63aa202f2d8588fea6b 0.14
...@@ -8,6 +8,77 @@ the rules for this file: ...@@ -8,6 +8,77 @@ the rules for this file:
* keep the format consistent (79 char width, M/D/Y date format). * keep the format consistent (79 char width, M/D/Y date format).
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
02/20/2017 Oleh Derevenko
* Project generation options have been changed to have built-in
multithreaded threading implementation enabled by default.
02/19/2017 Oleh Derevenko
* dWorldStep threaded implementation has been extended to the final
steps of constraint force applications and body position updates
after the LCP solving. Note that body callbacks (if set) may be
called from multiple threads if threaded execution is enabled.
* OU atomicord32 type has been fixed to be unsigned on all supported
platforms.
01/09/2017 Oleh Derevenko
* dGeomTriMeshDataPreprocess2() public function has been added to
replace dGeomTriMeshDataPreprocess(). Face angles pre-computation
for triangle meshes has been implemented.
11/13/2016 Oleh Derevenko
* dGeomTriMeshDataGetBuff and dGeomTriMeshDataSetBuff have been marked
deprecated and their functionality implemented via
dGeomTriMeshDataGet and dGeomTriMeshDataSet. Extra function variant
dGeomTriMeshDataGet2() has been added to allow returning data size.
11/07/2016 Oleh Derevenko
* The implementation of OPCODE TriMesh data pre-processing
(dGeomTriMeshDataPreprocess()) has been optimized to only contain
a sort and a single pass over edges (used to be a sort and O(N^2)).
10/29/2016 Oleh Derevenko
* dGeomTriMeshDataPreprocess() public function has been changed to
return a boolean status (it can fail in low memory conditions).
07/10/2016 Oleh Derevenko
* The correct handling of dJOINT_REVERSE mode for AngularMotor Joint
implemented (issue #37).
06/29/2016 Oleh Derevenko
* A bug fixed with HashSpace calling big boxes collision twice
(both straight and reverse geometries order) since revision #1831.
06/03/2016 Oleh Derevenko
* dJointSetHinge2Axes public function has been added and
dJointSetHinge2Axis1/2 have been marked deprecated due to being
unsafe.
05/13/2016 Oleh Derevenko
* ICE Container class allocation strategy fixed to avoid reserving
excess memory with large collections.
05/10/2016 Oleh Derevenko
* dSafeNormalize3 and dSafeNormalize4 functions changed to leave the
parameter intact instead of replacing it with the X-axis unit in case
of fault.
04/12/2016 Oleh Derevenko
* A function to create a self-threaded threading implementation object
has been moved back to public headers as there could be a use for it
while running several worlds in parallel threads.
01/09/2016 Oleh Derevenko
* Hinge2 joint corected to avoid faulting asserts when the axes get
temporarily invalid during assignments (suggested by David Mansolino)
01/03/2016 Oleh Derevenko
* An invalid memory access fixed in dxSAPSpace::BoxPruning() in case
if there were NaN values in AABBs to be sorted.
12/25/2015 Oleh Derevenko
* Unexpected joint mode assignment (instead of comparison) fixed within
an dUASSERT in dJointSetTransmissionAxis2() of transmission joint
11/28/2015 Oleh Derevenko 11/28/2015 Oleh Derevenko
* Convex-Trimesh collider added (libccd+GIMPACT only)(by Piotr Piastucki) * Convex-Trimesh collider added (libccd+GIMPACT only)(by Piotr Piastucki)
* dCreateConvex() and dGeomSetConvex() public APIs changed to expect * dCreateConvex() and dGeomSetConvex() public APIs changed to expect
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -66,6 +66,19 @@ typedef GREAL quatf[4]; ...@@ -66,6 +66,19 @@ typedef GREAL quatf[4];
//! Axis aligned box //! Axis aligned box
struct aabb3f{ struct aabb3f{
aabb3f() {}
template<typename tboundfloat>
aabb3f(const tboundfloat &_minX, const tboundfloat &_maxX, const tboundfloat &_minY, const tboundfloat &_maxY, const tboundfloat &_minZ, const tboundfloat &_maxZ):
minX((GREAL)_minX),
maxX((GREAL)_maxX),
minY((GREAL)_minY),
maxY((GREAL)_maxY),
minZ((GREAL)_minZ),
maxZ((GREAL)_maxZ)
{
}
GREAL minX; GREAL minX;
GREAL maxX; GREAL maxX;
GREAL minY; GREAL minY;
......
This diff is collapsed.
This diff is collapsed.
...@@ -367,14 +367,25 @@ void gim_trimesh_get_triangle_data(GIM_TRIMESH * trimesh, GUINT32 triangle_index ...@@ -367,14 +367,25 @@ void gim_trimesh_get_triangle_data(GIM_TRIMESH * trimesh, GUINT32 triangle_index
VEC_COPY_4((tri_data->m_planes.m_planes[3]),(planes->m_planes[3]));//edge3 VEC_COPY_4((tri_data->m_planes.m_planes[3]),(planes->m_planes[3]));//edge3
} }
void gim_trimesh_get_triangle_vertices(GIM_TRIMESH * trimesh, GUINT32 triangle_index, vec3f v1,vec3f v2,vec3f v3) void gim_trimesh_get_triangle_vertices(GIM_TRIMESH * trimesh, GUINT32 triangle_index, vec3f v1, vec3f v2, vec3f v3)
{ {
vec3f * transformed_vertices = GIM_BUFFER_ARRAY_POINTER(vec3f,trimesh->m_transformed_vertex_buffer,0); vec3f * transformed_vertices = GIM_BUFFER_ARRAY_POINTER(vec3f,trimesh->m_transformed_vertex_buffer,0);
GUINT32 * triangle_indices = GIM_BUFFER_ARRAY_POINTER(GUINT32,trimesh->m_tri_index_buffer,triangle_index*3); GUINT32 * triangle_indices = GIM_BUFFER_ARRAY_POINTER(GUINT32,trimesh->m_tri_index_buffer,triangle_index*3);
//Copy the vertices //Copy the vertices
VEC_COPY(v1,transformed_vertices[triangle_indices[0]]); if (v1 != NULL)
VEC_COPY(v2,transformed_vertices[triangle_indices[1]]); {
VEC_COPY(v3,transformed_vertices[triangle_indices[2]]); VEC_COPY(v1,transformed_vertices[triangle_indices[0]]);
}
if (v2 != NULL)
{
VEC_COPY(v2,transformed_vertices[triangle_indices[1]]);
}
if (v3 != NULL)
{
VEC_COPY(v3,transformed_vertices[triangle_indices[2]]);
}
} }
...@@ -39,7 +39,8 @@ release: dist-gzip dist-bzip2 ...@@ -39,7 +39,8 @@ release: dist-gzip dist-bzip2
@echo Created release packages for ${PACKAGE}-${VERSION}. @echo Created release packages for ${PACKAGE}-${VERSION}.
EXTRA_DIST = bootstrap build tools \ EXTRA_DIST = bootstrap build tools \
CHANGELOG.txt COPYING INSTALL.txt README.md LICENSE.TXT \ CHANGELOG.txt COPYING INSTALL.txt CSR.txt README.md \
LICENSE.TXT LICENSE-BSD.TXT \
bindings bindings
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
......
This diff is collapsed.
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
using namespace IceCore; using namespace IceCore;
#define MAX_RESERVE_GROWTH_SIZE 65536U
// Static members // Static members
#ifdef CONTAINER_STATS #ifdef CONTAINER_STATS
udword Container::mNbContainers = 0; udword Container::mNbContainers = 0;
...@@ -37,7 +39,7 @@ udword Container::mUsedRam = 0; ...@@ -37,7 +39,7 @@ udword Container::mUsedRam = 0;
* Constructor. No entries allocated there. * Constructor. No entries allocated there.
*/ */
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Container::Container() : mMaxNbEntries(0), mCurNbEntries(0), mEntries(null), mGrowthFactor(2.0f) Container::Container() : mMaxNbEntries(0), mCurNbEntries(0), mEntries(null), mGrowthFactor(2)
{ {
#ifdef CONTAINER_STATS #ifdef CONTAINER_STATS
mNbContainers++; mNbContainers++;
...@@ -64,7 +66,7 @@ Container::Container(udword size, float growth_factor) : mMaxNbEntries(0), mCurN ...@@ -64,7 +66,7 @@ Container::Container(udword size, float growth_factor) : mMaxNbEntries(0), mCurN
* Copy constructor. * Copy constructor.
*/ */
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Container::Container(const Container& object) : mMaxNbEntries(0), mCurNbEntries(0), mEntries(null), mGrowthFactor(2.0f) Container::Container(const Container& object) : mMaxNbEntries(0), mCurNbEntries(0), mEntries(null), mGrowthFactor(2)
{ {
#ifdef CONTAINER_STATS #ifdef CONTAINER_STATS
mNbContainers++; mNbContainers++;
...@@ -118,19 +120,23 @@ bool Container::Resize(udword needed) ...@@ -118,19 +120,23 @@ bool Container::Resize(udword needed)
mUsedRam-=mMaxNbEntries*sizeof(udword); mUsedRam-=mMaxNbEntries*sizeof(udword);
#endif #endif
if (MAX_UDWORD - mCurNbEntries < needed)
{
CHECKALLOC(null);
}
// Get more entries // Get more entries
mMaxNbEntries = mMaxNbEntries ? udword(float(mMaxNbEntries)*mGrowthFactor) : 2; // Default nb Entries = 2 udword NewMaxNbEntries = mMaxNbEntries ? udword(mMaxNbEntries * mGrowthFactor) : 2; // Default nb Entries = 2
if(mMaxNbEntries<mCurNbEntries + needed) mMaxNbEntries = mCurNbEntries + needed;
if (NewMaxNbEntries <= mMaxNbEntries) NewMaxNbEntries = MAX_UDWORD - mMaxNbEntries < MAX_RESERVE_GROWTH_SIZE ? MAX_UDWORD : mMaxNbEntries + MAX_RESERVE_GROWTH_SIZE;
else if (NewMaxNbEntries - mMaxNbEntries > MAX_RESERVE_GROWTH_SIZE) NewMaxNbEntries = mMaxNbEntries + MAX_RESERVE_GROWTH_SIZE;
if (NewMaxNbEntries < mCurNbEntries + needed) NewMaxNbEntries = mCurNbEntries + needed;
// Get some bytes for new entries // Get some bytes for new entries
udword* NewEntries = new udword[mMaxNbEntries]; udword* NewEntries = new udword[NewMaxNbEntries];
CHECKALLOC(NewEntries); CHECKALLOC(NewEntries);
#ifdef CONTAINER_STATS
// Add current amount of bytes
mUsedRam+=mMaxNbEntries*sizeof(udword);
#endif
// Copy old data if needed // Copy old data if needed
if(mCurNbEntries) CopyMemory(NewEntries, mEntries, mCurNbEntries*sizeof(udword)); if(mCurNbEntries) CopyMemory(NewEntries, mEntries, mCurNbEntries*sizeof(udword));
...@@ -139,6 +145,12 @@ bool Container::Resize(udword needed) ...@@ -139,6 +145,12 @@ bool Container::Resize(udword needed)
// Assign new pointer // Assign new pointer
mEntries = NewEntries; mEntries = NewEntries;
mMaxNbEntries = NewMaxNbEntries;
#ifdef CONTAINER_STATS
// Add current amount of bytes
mUsedRam+=mMaxNbEntries*sizeof(udword);
#endif
return true; return true;
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#ifndef __ICECONTAINER_H__ #ifndef __ICECONTAINER_H__
#define __ICECONTAINER_H__ #define __ICECONTAINER_H__
#define CONTAINER_STATS // #define CONTAINER_STATS
enum FindMode enum FindMode
{ {
...@@ -47,7 +47,11 @@ ...@@ -47,7 +47,11 @@
inline_ Container& Add(udword entry) inline_ Container& Add(udword entry)
{ {
// Resize if needed // Resize if needed
if(mCurNbEntries==mMaxNbEntries) Resize(); if (mCurNbEntries == mMaxNbEntries
&& !Resize())
{
IceAbort();
}
// Add new entry // Add new entry
mEntries[mCurNbEntries++] = entry; mEntries[mCurNbEntries++] = entry;
...@@ -57,7 +61,11 @@ ...@@ -57,7 +61,11 @@
inline_ Container& Add(const uword* entries, udword nb) inline_ Container& Add(const uword* entries, udword nb)
{ {
// Resize if needed // Resize if needed
if(mCurNbEntries+nb>mMaxNbEntries) Resize(nb); if (mCurNbEntries + nb > mMaxNbEntries
&& !Resize(nb))
{
IceAbort();
}
// Add new entry // Add new entry
CopyMemory(&mEntries[mCurNbEntries], entries, nb*sizeof(uword)); CopyMemory(&mEntries[mCurNbEntries], entries, nb*sizeof(uword));
...@@ -68,7 +76,11 @@ ...@@ -68,7 +76,11 @@
inline_ Container& Add(const udword* entries, udword nb) inline_ Container& Add(const udword* entries, udword nb)
{ {
// Resize if needed // Resize if needed
if(mCurNbEntries+nb>mMaxNbEntries) Resize(nb); if (mCurNbEntries + nb > mMaxNbEntries
&& !Resize(nb))
{
IceAbort();
}
// Add new entry // Add new entry
CopyMemory(&mEntries[mCurNbEntries], entries, nb*sizeof(udword)); CopyMemory(&mEntries[mCurNbEntries], entries, nb*sizeof(udword));
...@@ -92,7 +104,11 @@ ...@@ -92,7 +104,11 @@
inline_ Container& Add(float entry) inline_ Container& Add(float entry)
{ {
// Resize if needed // Resize if needed
if(mCurNbEntries==mMaxNbEntries) Resize(); if (mCurNbEntries == mMaxNbEntries
&& !Resize())
{
IceAbort();
}
// Add new entry // Add new entry
mEntries[mCurNbEntries++] = IR(entry); mEntries[mCurNbEntries++] = IR(entry);
...@@ -102,7 +118,11 @@ ...@@ -102,7 +118,11 @@
inline_ Container& Add(const float* entries, udword nb) inline_ Container& Add(const float* entries, udword nb)
{ {
// Resize if needed // Resize if needed
if(mCurNbEntries+nb>mMaxNbEntries) Resize(nb); if (mCurNbEntries + nb > mMaxNbEntries
&& !Resize(nb))
{
IceAbort();
}
// Add new entry // Add new entry
CopyMemory(&mEntries[mCurNbEntries], entries, nb*sizeof(float)); CopyMemory(&mEntries[mCurNbEntries], entries, nb*sizeof(float));
...@@ -172,7 +192,7 @@ ...@@ -172,7 +192,7 @@
//! Deletes the very last entry. //! Deletes the very last entry.
inline_ void DeleteLastEntry() { if(mCurNbEntries) mCurNbEntries--; } inline_ void DeleteLastEntry() { if(mCurNbEntries) mCurNbEntries--; }
//! Deletes the entry whose index is given //! Deletes the entry whose index is given
inline_ void DeleteIndex(udword index) { mEntries[index] = mEntries[--mCurNbEntries]; } inline_ void DeleteIndex(udword index) { ASSERT(index < mCurNbEntries); mEntries[index] = mEntries[--mCurNbEntries]; }
// Helpers // Helpers
Container& FindNext(udword& entry, FindMode find_mode=FIND_CLAMP); Container& FindNext(udword& entry, FindMode find_mode=FIND_CLAMP);
...@@ -186,8 +206,8 @@ ...@@ -186,8 +206,8 @@
inline_ udword GetLast() const { return mEntries[mCurNbEntries-1]; } inline_ udword GetLast() const { return mEntries[mCurNbEntries-1]; }
// Growth control // Growth control
inline_ float GetGrowthFactor() const { return mGrowthFactor; } //!< Returns the growth factor inline_ udword GetGrowthFactor() const { return mGrowthFactor; } //!< Returns the growth factor
inline_ void SetGrowthFactor(float growth) { mGrowthFactor = growth; } //!< Sets the growth factor inline_ void SetGrowthFactor(udword growth) { mGrowthFactor = growth; } //!< Sets the growth factor
inline_ bool IsFull() const { return mCurNbEntries==mMaxNbEntries; } //!< Checks the container is full inline_ bool IsFull() const { return mCurNbEntries==mMaxNbEntries; } //!< Checks the container is full
inline_ BOOL IsNotEmpty() const { return mCurNbEntries; } //!< Checks the container is empty inline_ BOOL IsNotEmpty() const { return mCurNbEntries; } //!< Checks the container is empty
...@@ -217,7 +237,7 @@ ...@@ -217,7 +237,7 @@
udword mMaxNbEntries; //!< Maximum possible number of entries udword mMaxNbEntries; //!< Maximum possible number of entries
udword mCurNbEntries; //!< Current number of entries udword mCurNbEntries; //!< Current number of entries
udword* mEntries; //!< List of entries udword* mEntries; //!< List of entries
float mGrowthFactor; //!< Resize: new number of entries = old number * mGrowthFactor udword mGrowthFactor; //!< Resize: new number of entries = old number * mGrowthFactor
}; };
#endif // __ICECONTAINER_H__ #endif // __ICECONTAINER_H__
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
//! Fast square root for floating-point values. //! Fast square root for floating-point values.
inline_ float FastSqrt(float square) inline_ float FastSqrt(float square)
{ {
return sqrt(square); return sqrtf(square);
} }
//! Saturates positive to zero. //! Saturates positive to zero.
......
...@@ -35,11 +35,14 @@ ...@@ -35,11 +35,14 @@
inline_ ~Matrix3x3() {} inline_ ~Matrix3x3() {}
//! Assign values //! Assign values
inline_ void Set(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22) template<typename trotationfloat>
{ inline_ void Set(trotationfloat m00, trotationfloat m01, trotationfloat m02,
m[0][0] = m00; m[0][1] = m01; m[0][2] = m02; trotationfloat m10, trotationfloat m11, trotationfloat m12,
m[1][0] = m10; m[1][1] = m11; m[1][2] = m12; trotationfloat m20, trotationfloat m21, trotationfloat m22)
m[2][0] = m20; m[2][1] = m21; m[2][2] = m22; {
m[0][0] = (float)m00; m[0][1] = (float)m01; m[0][2] = (float)m02;
m[1][0] = (float)m10; m[1][1] = (float)m11; m[1][2] = (float)m12;
m[2][0] = (float)m20; m[2][1] = (float)m21; m[2][2] = (float)m22;
}