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.5.0.0 (1.5.0.9503)

Syntax

C#
public bool SynchronizeCollisionDomain { get; set; }
Visual Basic
Public Property SynchronizeCollisionDomain As Boolean
	Get
	Set
Visual C++
public:
property bool SynchronizeCollisionDomain {
	bool get ();
	void set (bool value);
}

Field Value

trueTruetruetrue (True in Visual Basic) if collision domain is kept up-to-date; otherwise, falseFalsefalsefalse (False in Visual Basic). The default value is falseFalsefalsefalse (False in Visual Basic).

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 trueTruetruetrue (True in Visual Basic) 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# Copy imageCopy
// Ensure that the contact information is up-to-date.
simulation.CollisionDomain.Update(0);

See Also