64-bit hashes (#126)

- ContactEvent sample
- Improved shadows
- #120 
- Triangle collision fixes
This commit is contained in:
Erin Catto 2026-08-11 18:08:34 -07:00 • committed by GitHub
commit f42be210a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
49 changed files with 19835 additions and 17544 deletions

View file

@ -30,6 +30,8 @@ public:
m_camera->SetView( 40.0f, -10.0f, 110.0f, { 0.0f, 40.0f, 0.0f } );
}
m_shadowSplitFar = 180.0f;
CreateLargePyramid( m_worldId );
SetGroundShape( GetGroundShapeId() );
@ -1034,13 +1036,12 @@ public:
g_randomSeed = 42;
m_count = 64;
for ( int i = 0; i < m_count; ++i )
for ( int i = 0; i < m_capacity; ++i )
{
m_points[i] = RandomVec3( { -1.0f, -1.0f, -1.0f }, { 1.0f, 1.0f, 1.0f } );
}
m_hull = b3CreateHull( m_points, m_count, m_count );
m_hull = b3CreateHull( m_points, m_capacity, m_count );
m_scale = { -1.0f, 1.0f, 1.0f };
m_transformedHull = b3CloneAndTransformHull( m_hull, b3Transform_identity, m_scale );
}
@ -1070,7 +1071,7 @@ public:
for ( int i = 0; i < trials; ++i )
{
b3HullData* hull = b3CreateHull( m_points, m_count, m_count );
b3HullData* hull = b3CreateHull( m_points, m_capacity, m_count );
area += hull->surfaceArea;
b3DestroyHull( hull );
}
@ -1099,12 +1100,12 @@ public:
return new BenchmarkHull( sampleContext );
}
static constexpr int m_capacity = 64;
static constexpr int m_capacity = 100;
static constexpr int m_count = 16;
b3HullData* m_hull;
b3HullData* m_transformedHull;
b3Vec3 m_scale;
b3Vec3 m_points[m_capacity];
int m_count;
};
static int sampleBenchmarkHull = RegisterSample( "Benchmark", "Hull", BenchmarkHull::Create );
@ -1465,6 +1466,10 @@ public:
m_camera->SetView( 45.0f, 20.0f, 150.0f, { 0.0f, 15.0f, 0.0f } );
}
// Watched from 150 m out, so the settled pile sits between 100 and 180 m
// of view depth and the guessed range stops less than halfway into it.
m_shadowSplitFar = 180.0f;
b3Capacity capacity = {};
GetConvexPileCapacity( &capacity );
CreateWorld( &capacity );