Click or drag to resize
SoVRMLTouchSensor Class

Note: This API is now obsolete.

Detects when the user has pointed at a specific piece of geometry.

Inheritance Hierarchy

Namespace: OIV.Inventor.VRMLnodes
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 9.9.13.0 (9.9.13.0)
Syntax
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
[ObsoleteAttribute("See documentation for more details")]
public class SoVRMLTouchSensor : SoVRMLNode

The SoVRMLTouchSensor type exposes the following members.

Constructors
  NameDescription
Public methodSoVRMLTouchSensor

Constructor.

Top
Methods
  NameDescription
Public methodAffectsState

Returns true if a node has an effect on the state during traversal.

(Overrides SoNodeAffectsState.)
Public methodCallback
(Inherited from SoNode.)
Public methodCopy
Calls Copy(false).
(Inherited from SoNode.)
Public methodCopy(Boolean)

Creates and returns an exact copy of the node.

(Inherited from SoNode.)
Public methodCopyFieldValues(SoFieldContainer)
Calls CopyFieldValues(fc, false).
(Inherited from SoFieldContainer.)
Public methodCopyFieldValues(SoFieldContainer, Boolean)

Copies the contents of fc's fields into this object's fields.

(Inherited from SoFieldContainer.)
Public methodDispose
Releases all resources used by SoDisposable.
(Inherited from SoDisposable.)
Public methodDistribute
(Inherited from SoNode.)
Public methodDoAction
(Inherited from SoNode.)
Public methodStatic memberEnableEvents

Enables/disables events for all SoVRMLTouchSensor objects.

Public methodEnableNotify

Notification at this Field Container is enabled (if flag == true) or disabled (if flag == false).

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

Returns true if this object's fields are exactly equal to fc's fields.

(Inherited from SoFieldContainer.)
Public methodGet

Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string.

(Inherited from SoFieldContainer.)
Public methodGetAllFields

Returns a list of fields, including the eventIn's and eventOut's.

(Inherited from SoFieldContainer.)
Public methodGetAlternateRep

This method is called by actions to allow the node to provide an "alternate representation" when appropriate (typically depending on the action type).

(Inherited from SoNode.)
Public methodGetBoundingBox
(Inherited from SoNode.)
Public methodGetEventIn

Returns a the eventIn with the given name.

(Inherited from SoFieldContainer.)
Public methodGetEventOut

Returns the eventOut with the given name.

(Inherited from SoFieldContainer.)
Public methodGetField

Returns a the field of this object whose name is fieldName.

(Inherited from SoFieldContainer.)
Public methodGetFieldName

Returns the name of the given field in the fieldName argument.

(Inherited from SoFieldContainer.)
Public methodGetFields

Appends references to all of this object's fields to resultList, and returns the number of fields appended.

(Inherited from SoFieldContainer.)
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetMatrix
(Inherited from SoNode.)
Public methodGetName

Returns the name of an instance.

(Inherited from SoBase.)
Public methodGetPrimitiveCount
(Inherited from SoNode.)
Public methodGetRenderUnitID
(Inherited from SoNode.)
Public methodGetStringName (Inherited from SoBase.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGLRender
(Inherited from SoVRMLNode.)
Public methodGLRenderBelowPath
(Inherited from SoNode.)
Public methodGLRenderInPath
(Inherited from SoNode.)
Public methodGLRenderOffPath
(Inherited from SoNode.)
Public methodGrabEventsCleanup
(Inherited from SoNode.)
Public methodGrabEventsSetup
(Inherited from SoNode.)
Public methodHandleEvent
Public methodHasDefaultValues

Returns true if all of the object's fields have their default values.

(Inherited from SoFieldContainer.)
Public methodIsBoundingBoxIgnoring

This method is used by getBoundingBox action traversal to know if the current node must be traversed or not, ie the bounding should be ignored.

(Inherited from SoNode.)
Public methodStatic memberIsEventsEnabled

Queries if events are enabled for all objects of this class.

Public methodIsNotifyEnabled

Notification is the process of telling interested objects that this object has changed.

(Inherited from SoFieldContainer.)
Public methodIsOverride

Returns the state of the override flag.

(Inherited from SoNode.)
Public methodIsSynchronizable

Gets the ScaleViz synchronizable state of this object.

(Inherited from SoBase.)
Public methodPick
(Inherited from SoNode.)
Public methodRayPick
(Inherited from SoNode.)
Public methodSearch
(Inherited from SoNode.)
Public methodSet

Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.

(Inherited from SoFieldContainer.)
Public methodSetName (Inherited from SoBase.)
Public methodSetOverride

Turns the override flag on or off.

(Inherited from SoNode.)
Public methodSetSynchronizable

Sets this to be a ScaleViz synchronizable object.

(Inherited from SoBase.)
Public methodSetToDefaults

Sets all fields in this object to their default values.

(Inherited from SoFieldContainer.)
Public methodToString
Converts this SoBase structure to a human readable string.
(Inherited from SoBase.)
Public methodTouch

Marks an instance as modified, simulating a change to it.

(Inherited from SoNode.)
Public methodWrite
(Inherited from SoNode.)
Top
Properties
  NameDescription
Public propertydescription

String that describes the sensor.

Public propertyenabled

Enables (true) or disables (false) the sensor.

Public propertyhitNormal_changed

Output event sent when cursor is on shape.

Public propertyhitPoint_changed

Output event sent when cursor on shape.

Public propertyhitTexCoord_changed

Output event sent when cursor on shape.

Public propertyisActive

Output event sent on button press/release.

Public propertyIsDisposable
ISafeDisposable interface implementation.
(Inherited from SoDisposable.)
Public propertyisOver

Output event sent when cursor on shape.

Public propertymetadata

Specifies the metadata node.

(Inherited from SoVRMLNode.)
Public propertytouchTime

Output events sent on button release.

Public propertyUserData
Gets or sets the user data to be contained by the field container.
(Inherited from SoFieldContainer.)
Top
Remarks

A SoVRMLTouchSensor tracks the location and state of the pointing device and detects when the user points at geometry contained by the SoVRMLTouchSensor's parent group. This sensor can be enabled or disabled by sending it an enabled event with a value of true or false. If the SoVRMLTouchSensor is disabled, it does not track user input or send output events.

<font color="#0000FF">NOTE:</font> This class does not exist in Open Inventor 10.0 and later.

VRML97 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML97 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML97 specification that are not present in this help file. The complete VRML97 spec is available at http://www.web3d.org.

A SoVRMLTouchSensor tracks the location and state of the pointing device and detects when the user points at geometry contained by the SoVRMLTouchSensor's parent group. This sensor can be enabled or disabled by sending it an enabled event with a value of true or false. If the SoVRMLTouchSensor is disabled, it does not track user input or send output events.

The SoVRMLTouchSensor generates events as the pointing device "passes over" any geometry nodes that are descendants of the SoVRMLTouchSensor's parent group. Typically, the pointing device is a 2D device such as a mouse. In this case, the pointing device is considered to be moving within a plane a fixed distance from the viewer and perpendicular to the line of sight; this establishes a set of 3D coordinates for the pointer. If a 3D pointer is in use, then the SoVRMLTouchSensor generates events only when the pointer is within the user's field of view. In either case, the pointing device is considered to "pass over" geometry when that geometry is intersected by a line extending from the viewer and passing through the pointer's 3D coordinates. If multiple surfaces intersect this line (hereafter called the bearing), only the nearest will be eligible to generate events.

The isOver eventOut reflects the state of the pointing device with regard to whether it is over the SoVRMLTouchSensor's geometry or not. When the pointing device changes state from a position such that its bearing does not intersect any of the SoVRMLTouchSensor's geometry to one in which it does intersect geometry, an isOver true event is generated. When the pointing device moves from a position such that its bearing intersects geometry to one in which it no longer intersects the geometry, or some other geometry is obstructing the SoVRMLTouchSensor's geometry, an isOver false event is generated. These events are generated only when the pointing device has moved and changed `over state; events are not generated if the geometry itself is animating and moving underneath the pointing device.

As the user moves the bearing over the SoVRMLTouchSensor's geometry, the point of intersection (if any) between the bearing and the geometry is determined. Each movement of the pointing device, while isOver is true, generates hitPoint_changed, hitNormal_changed, and hitTexCoord_changed events. hitPoint_changed events contain the 3D point on the surface of the underlying geometry, given in the SoVRMLTouchSensor's coordinate system. hitNormal_changed events contain the surface normal vector at the hitPoint. hitTexCoord_changed events contain the texture coordinates of that surface at the hitPoint, which can be used to support the 3D equivalent of an image map.

If isOver is true, the user may activate the pointing device to cause the SoVRMLTouchSensor to generate isActive events (e.g. press the primary mouse button). When the SoVRMLTouchSensor generates an isActive true event, it grabs all further motion events from the pointing device until it releases and generates an isActive false event (other pointing device sensors will not generate events during this time). Motion of the pointing device while isActive is true is referred to as a "drag". If a 2D pointing device is in use, isActive events will typically reflect the state of the primary button associated with the device (i.e., isActive is true when the primary button is pressed, and false when not released). If a 3D pointing device is in use, isActive events will typically reflect whether the pointer is within or in contact with the SoVRMLTouchSensor's geometry.

The eventOut field touchTime is generated when all three of the following conditions are true:

  • the pointing device was over the geometry when it was initially activated (isActive is true),

  • the pointing device is currently over the geometry (isOver is true),

  • and, the pointing device is deactivated (isActive false event is also generated).

See "Concepts - Pointing Device Sensors" for more details.

FILE FORMAT/DEFAULT

VRMLTouchSensor {
enabled true
description ""
metadata NULL
}

EVENTS

eventIn

SoSFBoolset_enabled
SoSFBoolset_description
SoSFNodeset_metadata

eventOut

SoSFStringdescription_changed
SoSFBoolenabled_changed
SoSFVec3fhitNormal_changed
SoSFVec3fhitPoint_changed
SoSFVec2fhitTexCoord_changed
SoSFBoolisActive
SoSFBoolisOver (Note: Not implemented)
SoSFTimetouchTime
SoSFNodemetadata_changed
Obsoletesince Open Inventor 9500 The VRML API is no longer supported. See section http://oivdoc95.vsg3d.com/content/compatibility-notes-4#Deprecation of the Reference Manual.

See Also