Click or drag to resize
SoWinCollisionViewer Class

Class to manage collisions between the camera and the scene.

Inheritance Hierarchy
SystemObject
  OIV.InventorSoNetBase
    OIV.Inventor.Win.ViewersSoWinCollisionViewer

Namespace: OIV.Inventor.Win.Viewers
Assembly: OIV.Inventor.Win (in OIV.Inventor.Win.dll) Version: 10.12.3.0 (10.12.3.0)
Syntax
public class SoWinCollisionViewer : SoNetBase

The SoWinCollisionViewer type exposes the following members.

Constructors
  NameDescription
Public methodSoWinCollisionViewer

Constructor.

Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetCollisionDetection

Gets the collision detection active flag.

Public methodGetDistance

Gets the distance between the camera and the objects.

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

Gets the number of steps to be used in the collision computation.

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

Gets the original viewer.

Public methodGetZBufferOptimistation

Gets the Z buffer optimization active flag.

Public methodSetCollisionDetection
Calls SetCollisionDetection(true).
Public methodSetCollisionDetection(Boolean)

Sets the collision detection active flag.

Public methodSetDistance

Sets the distance between the camera and the objects.

Public methodSetNumSteps

Sets the number of steps to be used in the collision computation.

Public methodSetZBufferOptimization
Calls SetZBufferOptimization(true, false).
Public methodSetZBufferOptimization(Boolean)
Calls SetZBufferOptimization(value, false).
Public methodSetZBufferOptimization(Boolean, Boolean)

Sets the Z buffer optimization active flag.

Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Public eventCollision
Top
Remarks

This class is used to constrain a viewer, preventing the viewer's camera from colliding with the objects in the scene. It overrides the RenderCallback on the viewer that it's attached to.

The programmer can define the maximum distance between the camera and the objects.

When Z-buffer optimization is enabled, the algorithm looks at the Z-buffer to see if there is an object in front of the camera when the user moves forward, and an OIV.Inventor.Collision.SoIntersectionDetectionAction when the user moves backward.

NOTE: This class is not a viewer.

See Also