Click or drag to resize
SoCollisionManager Class

Class to manage collisions.

Inheritance Hierarchy
SystemObject
  OIV.InventorSoNetBase
    OIV.Inventor.CollisionSoCollisionManager

Namespace: OIV.Inventor.Collision
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.1.1.0 (2024.1.1)
Syntax
public class SoCollisionManager : SoNetBase, 
	IDisposable

The SoCollisionManager type exposes the following members.

Constructors
  NameDescription
Public methodSoCollisionManager

Constructor.

Top
Methods
  NameDescription
Public methodActivate
Calls Activate(true).
Public methodActivate(Boolean)

Sets a flag to activate the collision manager, for instance, to tell it to watch the transformation and start collision detection computations when the transformation changes.

Public methodDispose
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetGluingLevel

Returns the gluing level.

Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetObject

Returns the object that will be transformed.

Public methodGetScene

Returns the scene the object is interacting with.

Public methodGetTransform

Returns the transformation that will be watched.

Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsActivated

Returns a flag indicating whether the collision manager is activated.

Public methodIsGluing

Returns a flag indicating whether the collision manager should place the object at the position just before the first collision that would occur along the transformation path.

Public methodIsObjectBBoxOnly

Returns a flag indicating whether to use the object's bounding box instead of the actual primitives when computing collisions.

Public methodIsSceneBBoxOnly

Returns a flag indicating whether to use the bounding boxes of objects in the scene instead of the actual primitives when computing collisions.

Public methodSetGluing
Calls SetGluing(true).
Public methodSetGluing(Boolean)

Sets a flag indicating that the collision manager should place the object at the position just before the first collision that would occur along the transformation path.

Public methodSetGluingLevel

Sets the gluing level.

Public methodSetObject

Sets the object that will be transformed.

Public methodSetObjectBBoxOnly
Calls SetObjectBBoxOnly(true).
Public methodSetObjectBBoxOnly(Boolean)

Sets a flag indicating whether to use the object's bounding box instead of the actual primitives when computing collisions.

Public methodSetScene

Sets the scene the object is interacting with.

Public methodSetSceneBBoxOnly
Calls SetSceneBBoxOnly(true).
Public methodSetSceneBBoxOnly(Boolean)

Sets a flag indicating whether to use the bounding boxes of objects in the scene instead of the actual primitives when computing collisions.

Public methodSetTransform

Sets the transformation that will be watched.

Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyFilterCallback

Sets the callback function called when an object shape collides with a scene shape.

Top
Events
  NameDescription
Public eventBBoxCollision
Public eventCollision
Top
Remarks

The OIV.Inventor.Collision.SoCollisionManager class manages collisions, i.e., it controls the position of an object in a scene, preventing it from colliding with other objects in the scene.

The collision manager references a scene, an object and a transformation. It can prevent collisions between the specified object and other objects within the scene.

It can use the actual primitives of the objects during the computation, or for faster performance, it may use their bounding boxes.

When the referenced transformation changes, the collision manager looks for a collision between the bounding box of the object and the bounding boxes of objects within the scene. If a collision between the bounding boxes is detected, the algorithm can (depending on what the programmer specifies) compute a more precise intersection using the actual primitives of the object and/or the objects of the scene.

The algorithm can call programmer-supplied delegateswhen there is a collision between the bounding boxes, and when there is a collision between the primitives of the shapes.

When there is a collision, the collision manager can "glue" the object on the scene. This refers to placing the object at the position just before the first collision that would occur along the transformation path. For example, if an object would collide with (intersect) a wall, the object would be placed directly against the wall.

See Also