Click or drag to resize

Snapping Class

Serializable class used to contain snapping settings for TransformSyncs.
Inheritance Hierarchy
SystemObject
  ImmerseSDK.InteractionSnapping

Namespace:  ImmerseSDK.Interaction
Assembly:  ImmerseSDK.App (in ImmerseSDK.App.dll) Version: 3.9.0.0 (3.9.0.0)
Syntax
C#
[SerializableAttribute]
public class Snapping

The Snapping type exposes the following members.

Constructors
  NameDescription
Private methodStatic memberSnapping
Public methodSnapping
Initializes a new instance of the Snapping class
Top
Properties
  NameDescription
Public propertyAllowPhysicsWhenSnappedToOrigin
Returns true if this object will not be kinematic when snapped to origin, otherwise false
Public propertyAlwaysSnap
True if this object always snaps to the nearest target
Public propertyDefaultSnapTarget
Returns the default snap target
Public propertyEnabled
True if snapping is supported (targets were specified or we snap to origin)
Public propertyMaxDistanceTolerance
Maximum Distance tolerance for snapping Note: This only applies if AlwaysSnap is false
Public propertyOriginSnapTargetIndex
The original snap target index, or UnassignedSnapTarget (255) if not assigned
Public propertyPreviewSnap
True if preview snap is enabled
Public propertyRotationAxisFilter
Filter for all snapping targets Note: This only applies if AlwaysSnap is false
Public propertySnapToOrigin
Returns true if this object will snap to its original position
Public propertyTargetCount
Returns the number of snap targets available
Top
Methods
  NameDescription
Public methodCenterSnapTargetOffsetToBounds
Public methodDoesTargetsContain
Public methodGetClosest
Gets the closest snap target index to the Transform Sync
Public methodGetIndex
Gets the index of the specified SnapTarget. Returns 255 (TransformSync.NotSnappedState) if it is not found
Public methodGetTarget
Get target at specified index
Top
Fields
  NameDescription
Private field_allowPhysicsWhenSnappedToOrigin
Set this to true to allow physics after snapping to origin
Private field_alwaysSnap
Ignore tolerance and always snap to the closest SnapTarget?
Private field_defaultSnapTarget
If no SnapTarget is found, this value will be used (255 = no default snap target)
Private field_previewSnap
Toggle snapping preview
Private field_snapToOrigin
Set this to true if you want an object to start in a snapped state. This will create a SnapTarget at it's location
Private field_targets
List of SnapTargets available. If you allow SnapToOrigin, then the origin will be automatically added at runtime to this list (at the end)
Private field_unsnapRequirements
A set of requirements to check before unsnap is allowed
Public fieldStatic memberRotationAxisAll
Cached object to not mask anything
Public fieldStatic memberRotationAxisX
Cached object to mask for a X axis rotation only (thus including only X rotation)
Public fieldStatic memberRotationAxisY
Cached object to mask for a y axis rotation only (thus including only Y rotation)
Public fieldStatic memberRotationAxisZ
Cached object to mask for a Z axis rotation only (thus including only Z rotation)
Public fieldStatic memberUnassignedSnapTarget
Constant value to indicate Unassigned state
Top
See Also