Changeset 518
- Timestamp:
- 10/31/09 18:18:25 (3 years ago)
- Files:
-
- trunk/AUTHORS (modified) (1 diff)
- trunk/blaze/collision/nbody/bzBroadPhase.d (modified) (6 diffs)
- trunk/dsss.conf (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/AUTHORS
r506 r518 1 1 Blaze: http://www.dsource.org/projects/blaze 2 2 3 Original author and maintainer: Mason Green (Zzzzrrr) 3 Original author and maintainer: Mason Green (Zzzzrrr) 4 4 5 5 Contributers: 6 6 7 7 Clay Smith (Admin) 8 Benjamin Saunders (Testbed framework) 8 Benjamin Saunders (Testbed framework) 9 9 Brian Schott (Documentation) 10 Tim C as (Phobostesting)10 Tim Chas (Initial Phobos port + testing) 11 11 12 Blaze is based on the Box2D & Motor2 physics engines, and implements 12 Blaze is based on the Box2D & Motor2 physics engines, and implements 13 13 code and ideas from these projects. 14 14 15 Box2D Author: Erin Catto 15 Box2D Author: Erin Catto 16 16 http://www.box2d.org 17 17 18 18 Motor2 Author: Michael Baczynski 19 19 http://lab.polygonal.de/ 20 20 21 21 Special thanks to Rene Schulte for his C# Smooth Particle Hydrodynamics (SPH) code. 22 22 http://www.rene-schulte.info/ trunk/blaze/collision/nbody/bzBroadPhase.d
r511 r518 221 221 //memmove(bounds.ptr + upperIndex + 2, bounds.ptr + upperIndex, (boundCount - upperIndex) * bzBound.sizeof); 222 222 //memmove(bounds.ptr + lowerIndex + 1, bounds.ptr + lowerIndex, (upperIndex - lowerIndex) * bzBound.sizeof); 223 223 224 224 bzBound[] tmp; 225 225 tmp.length = boundCount - upperIndex; … … 230 230 bounds[upperIndex + 2 + i] = tmp[i]; 231 231 } 232 232 233 233 tmp.length = upperIndex - lowerIndex; 234 234 for (int i = 0; i < (upperIndex - lowerIndex); i++) { … … 302 302 bzProxy proxy = m_proxyPool[proxyId]; 303 303 assert(proxy.isValid()); 304 304 305 305 int boundCount = 2 * m_proxyCount; 306 306 307 307 for (int axis = 0; axis < 2; ++axis) { 308 308 309 309 bzBound[] bounds = m_bounds[axis]; 310 310 311 311 int lowerIndex = proxy.lowerBounds[axis]; 312 312 int upperIndex = proxy.upperBounds[axis]; 313 313 int lowerValue = bounds[lowerIndex].value; 314 314 int upperValue = bounds[upperIndex].value; 315 315 316 316 if((upperIndex - lowerIndex - 1) < 0) { 317 317 throw new Exception("this is a known bug"); 318 318 } 319 319 320 320 //memmove(bounds.ptr + lowerIndex, bounds.ptr + lowerIndex + 1, (upperIndex - lowerIndex - 1) * bzBound.sizeof); 321 321 //memmove(bounds.ptr + upperIndex-1, bounds.ptr + upperIndex + 1, (boundCount - upperIndex - 1) * bzBound.sizeof); … … 347 347 } 348 348 } 349 349 350 350 // Fix stabbing count. 351 351 for (int index = lowerIndex; index < upperIndex - 1; ++index) { 352 352 --bounds[index].stabbingCount; 353 353 } 354 354 355 355 // Query for pairs to be removed. lowerIndex and upperIndex are not 356 356 // needed. … … 360 360 361 361 assert (m_queryResultCount < k_maxProxies); 362 362 363 363 for (int i = 0; i < m_queryResultCount; ++i) { 364 364 assert(m_proxyPool[m_queryResults[i]].isValid()); … … 657 657 // lower/upper bounds that would have equal values. 658 658 // TODO_ERIN implement fast float to int conversion. 659 lowerValues[0] = abs(cast(int) (m_quantizationFactor.x * (minVertex.x - m_worldAABB.lowerBound.x)) & (int.max - 1));660 upperValues[0] = abs(cast(int) (m_quantizationFactor.x * (maxVertex.x - m_worldAABB.lowerBound.x)) | 1);661 lowerValues[1] = abs(cast(int) (m_quantizationFactor.y * (minVertex.y - m_worldAABB.lowerBound.y)) & (int.max - 1));662 upperValues[1] = abs(cast(int) (m_quantizationFactor.y * (maxVertex.y - m_worldAABB.lowerBound.y)) | 1);659 lowerValues[0] = cast(int)abs(cast(int) (m_quantizationFactor.x * (minVertex.x - m_worldAABB.lowerBound.x)) & (int.max - 1)); 660 upperValues[0] = cast(int)abs(cast(int) (m_quantizationFactor.x * (maxVertex.x - m_worldAABB.lowerBound.x)) | 1); 661 lowerValues[1] = cast(int)abs(cast(int) (m_quantizationFactor.y * (minVertex.y - m_worldAABB.lowerBound.y)) & (int.max - 1)); 662 upperValues[1] = cast(int)abs(cast(int) (m_quantizationFactor.y * (maxVertex.y - m_worldAABB.lowerBound.y)) | 1); 663 663 } 664 664
