Draw distance slider (#44)
Helps render performance on integrated GPUs. Added render culling for baked compounds.
This commit is contained in:
parent
655799893a
commit
1bec63c9ee
11 changed files with 200 additions and 8 deletions
|
|
@ -160,7 +160,8 @@ void* MyEnqueueTask(b3TaskCallback* task, void* taskContext,
|
|||
MyTask* t = AllocTask();
|
||||
t->task = task;
|
||||
t->taskContext = taskContext;
|
||||
SubmitToThreadPool(t);
|
||||
Scheduler* myScheduler = (Scheduler*)userContact;
|
||||
SubmitToThreadPool(myScheduler, t);
|
||||
return t;
|
||||
}
|
||||
|
||||
|
|
@ -175,6 +176,7 @@ void MyFinishTask(void* userTask, void* userContext)
|
|||
b3WorldDef worldDef = b3DefaultWorldDef();
|
||||
worldDef.enqueueTask = MyEnqueueTask;
|
||||
worldDef.finishTask = MyFinishTask;
|
||||
worldDef.userTaskContext = myScheduler;
|
||||
worldDef.workerCount = GetMyWorkerCount();
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ the first time of impact (TOI). Second, speculative collision is used to create
|
|||
contact constraints between bodies before they touch.
|
||||
|
||||
### events
|
||||
|
||||
World simulation leads to the creation of events that are available at the end
|
||||
of the time step:
|
||||
|
||||
|
|
@ -150,6 +151,7 @@ of the time step:
|
|||
These events allow your application to react to changes in the simulation.
|
||||
|
||||
## Modules
|
||||
|
||||
Box3D's primary purpose is to provide rigid body simulation. However,
|
||||
there are math and collision features that may be useful apart from the
|
||||
rigid body simulation. These are provided in the `include` directory. Anything
|
||||
|
|
@ -162,6 +164,7 @@ study the code and ask questions. I'm happy to share all the details of how
|
|||
Box3D works internally.
|
||||
|
||||
## Units
|
||||
|
||||
Box3D works with floating point numbers and tolerances have to be used
|
||||
to make Box3D perform well. These tolerances have been tuned to work
|
||||
well with meters-kilogram-second (MKS) units. In particular, Box3D has
|
||||
|
|
@ -194,6 +197,7 @@ the full 3D rotation is tracked continuously.
|
|||
> Box3D uses radians, not degrees.
|
||||
|
||||
## Changing the length units
|
||||
|
||||
Advanced users may change the length unit by calling `b3SetLengthUnitsPerMeter()`
|
||||
at application startup. If you keep Box3D in a shared library, you will need
|
||||
to call this if the shared library is reloaded.
|
||||
|
|
@ -204,6 +208,7 @@ One of the benefits of using MKS units for physics simulation is that you can
|
|||
use real world values to get reasonable results.
|
||||
|
||||
## Ids and Definitions
|
||||
|
||||
Fast memory management plays a central role in the design of the Box3D
|
||||
interface. When you create a world, body, shape or joint, you will receive
|
||||
a handle called an *id*. These ids are opaque and are passed to various functions
|
||||
|
|
|
|||
Loading…
Reference in a new issue