Click or drag to resize
DigitalRuneSimulationSettingsSynchronizeCollisionDomain Property
Gets or sets a value indicating whether the collision domain is kept up-to-date.

Namespace: DigitalRune.Physics.Settings
Assembly: DigitalRune.Physics (in DigitalRune.Physics.dll) Version: 1.10.0.0 (1.10.0.14427)
Syntax
public bool SynchronizeCollisionDomain { get; set; }

Property Value

Type: Boolean
if collision domain is kept up-to-date; otherwise, . The default value is .
Remarks

The simulation updates the internal collision domain (see CollisionDomain) only if necessary. In Update(TimeSpan) the collision domain is updated to compute the new contacts at the beginning of each time step. Then the new positions and orientations of the simulation objects are computed. At the end of Update(TimeSpan) the contact information of the collision domain is not up-to-date because the simulation objects have moved.

By setting SynchronizeCollisionDomain to the Simulation explicitly updates the collision domain at the end of Update(TimeSpan) to ensure that the contact information is valid. This additional update costs a bit of performance, therefore the property SynchronizeCollisionDomain should only be set if other parts of the application need to access the contact information of the collision domain.

Alternatively, the user can explicitly update the collision domain by calling:

C#
// Ensure that the contact information is up-to-date.
simulation.CollisionDomain.Update(0);

See Also