SoVRMLTouchSensor Class |
Note: This API is now obsolete.
Detects when the user has pointed at a specific piece of geometry.
Namespace: OIV.Inventor.VRMLnodes
The SoVRMLTouchSensor type exposes the following members.
Name | Description | |
---|---|---|
![]() | SoVRMLTouchSensor | Constructor. |
Name | Description | |
---|---|---|
![]() | AffectsState | Returns true if a node has an effect on the state during traversal. |
![]() | Callback | (Inherited from SoNode.) |
![]() | Copy | Calls Copy(false). (Inherited from SoNode.) |
![]() | Copy(Boolean) | Creates and returns an exact copy of the node. |
![]() | CopyFieldValues(SoFieldContainer) | Calls CopyFieldValues(fc, false). (Inherited from SoFieldContainer.) |
![]() | CopyFieldValues(SoFieldContainer, Boolean) | Copies the contents of fc's fields into this object's fields. |
![]() | Dispose |
Releases all resources used by SoDisposable.
(Inherited from SoDisposable.) |
![]() | Distribute | (Inherited from SoNode.) |
![]() | DoAction | (Inherited from SoNode.) |
![]() ![]() | EnableEvents | Enables/disables events for all SoVRMLTouchSensor objects. |
![]() | EnableNotify | Notification at this Field Container is enabled (if flag == true) or disabled (if flag == false). |
![]() | Equals | (Inherited from Object.) |
![]() | FieldsAreEqual | Returns true if this object's fields are exactly equal to fc's fields. |
![]() | Get | Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string. |
![]() | GetAllFields | Returns a list of fields, including the eventIn's and eventOut's. |
![]() | GetAlternateRep | This method is called by actions to allow the node to provide an "alternate representation" when appropriate (typically depending on the action type). |
![]() | GetBoundingBox | (Inherited from SoNode.) |
![]() | GetEventIn | Returns a the eventIn with the given name. |
![]() | GetEventOut | Returns the eventOut with the given name. |
![]() | GetField | Returns a the field of this object whose name is fieldName. |
![]() | GetFieldName | Returns the name of the given field in the fieldName argument. |
![]() | GetFields | Appends references to all of this object's fields to resultList, and returns the number of fields appended. |
![]() | GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) |
![]() | GetMatrix | (Inherited from SoNode.) |
![]() | GetName | Returns the name of an instance. |
![]() | GetPrimitiveCount | (Inherited from SoNode.) |
![]() | GetRenderUnitID | (Inherited from SoNode.) |
![]() | GetStringName | (Inherited from SoBase.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | GLRender | (Inherited from SoVRMLNode.) |
![]() | GLRenderBelowPath | (Inherited from SoNode.) |
![]() | GLRenderInPath | (Inherited from SoNode.) |
![]() | GLRenderOffPath | (Inherited from SoNode.) |
![]() | GrabEventsCleanup | (Inherited from SoNode.) |
![]() | GrabEventsSetup | (Inherited from SoNode.) |
![]() | HandleEvent | (Overrides SoNodeHandleEvent(SoHandleEventAction).) |
![]() | HasDefaultValues | Returns true if all of the object's fields have their default values. |
![]() | IsBoundingBoxIgnoring | 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. |
![]() ![]() | IsEventsEnabled | Queries if events are enabled for all objects of this class. |
![]() | IsNotifyEnabled | Notification is the process of telling interested objects that this object has changed. |
![]() | IsOverride | Returns the state of the override flag. |
![]() | IsSynchronizable | Gets the ScaleViz synchronizable state of this object. |
![]() | Pick | (Inherited from SoNode.) |
![]() | RayPick | (Inherited from SoNode.) |
![]() | Search | (Inherited from SoNode.) |
![]() | Set | 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. |
![]() | SetName | (Inherited from SoBase.) |
![]() | SetOverride | Turns the override flag on or off. |
![]() | SetSynchronizable | Sets this to be a ScaleViz synchronizable object. |
![]() | SetToDefaults | Sets all fields in this object to their default values. |
![]() | ToString |
Converts this SoBase structure to a human readable string.
(Inherited from SoBase.) |
![]() | Touch | Marks an instance as modified, simulating a change to it. |
![]() | Write | (Inherited from SoNode.) |
Name | Description | |
---|---|---|
![]() | description | String that describes the sensor. |
![]() | enabled | Enables (true) or disables (false) the sensor. |
![]() | hitNormal_changed | Output event sent when cursor is on shape. |
![]() | hitPoint_changed | Output event sent when cursor on shape. |
![]() | hitTexCoord_changed | Output event sent when cursor on shape. |
![]() | isActive | Output event sent on button press/release. |
![]() | IsDisposable | ISafeDisposable interface implementation.
(Inherited from SoDisposable.) |
![]() | isOver | Output event sent when cursor on shape. |
![]() | metadata | Specifies the metadata node. |
![]() | touchTime | Output events sent on button release. |
![]() | UserData |
Gets or sets the user data to be contained by the field container.
(Inherited from SoFieldContainer.) |
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.
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.
VRMLTouchSensor {
enabled | true |
description | "" |
metadata | NULL |
SoSFBool | set_enabled |
SoSFBool | set_description |
SoSFNode | set_metadata |
SoSFString | description_changed |
SoSFBool | enabled_changed |
SoSFVec3f | hitNormal_changed |
SoSFVec3f | hitPoint_changed |
SoSFVec2f | hitTexCoord_changed |
SoSFBool | isActive |
SoSFBool | isOver (Note: Not implemented) |
SoSFTime | touchTime |
SoSFNode | metadata_changed |