ParallelGraphics
Home  »  Developer Zone  »  Products  »  Cortona VRML Client for Mac OS X  »  VRML Extensions  »  Drag & Drop Handling
Up to VRML Extensions

AdvancedAppearance 

Splines 

Nurbs 

Keyboard Input 

SFVec2f Interpolator 

Drag & Drop Handling 


Subscribe to Newsletter
 


Google Searchsite search:

 

%(domain)s %(domain)s
Install Cortona VRML Client!

Outline 3D

Try RobinZone!


Drag & Drop Handling
DropSensor

[drag me]

[drag me]

[drag me]
Scene size: 405bytes

[drag me]

[drag me]

[drag me]
The DropSensor node generates events based on input from a pointing device. Retrieves an object's uniform resource locator (URL) of an object (resource) dragged to the 3D window.

To texture an object, drag and drop the texture or links (in Netscape Navigator) onto the box in the 3D window. You can also drag a link to any of image file from your local drive or Internet.


Node description
DropSensor {
  exposedField	SFBool	enabled TRUE
  eventOut	SFVec3f	hitPoint
  eventOut	SFVec3f	hitNormal	
  eventOut	SFVec2f	hitTexCoord
  eventOut	SFTime	dropTime
  eventOut	MFNode	nodeChain	
  eventOut	MFString	url
}

 
enabled indicates whether the sensor is currently paying attention to pointing device input.

 
hitPoint the location on the surface of the underlying geometry at which the primary button of the pointing device was released.

 
hitNormal the normal at the point given by hitPoint.

 
hitTexCoord the texture coordinate at the point given by hitPoint.

 
dropTime the time at which the primary button of the pointing device was released.

 
nodeChain returns the nodes names from the top-level to the geometry at which the primary button of the pointing device was released.

 
url returns the URL for the object (resource) currently dragged to the 3D window.



Example
#VRML V2.0 utf8
NavigationInfo {
 type "EXAMINE"
}
Transform {
 rotation 1 1 1 1	
 children [
  DEF DS DropSensor {}
  Shape {
   geometry Box {}
   appearance Appearance {
    texture DEF IT ImageTexture {}
    material Material {
     shininess 1
    }		  
   }
  }
 ]
}
ROUTE DS.url TO IT.url

You can see this example in Cortona at top left corner of this page.




Last updated: Tue, 07 Oct 2008
© 2000-2008 ParallelGraphics. All rights reserved. Terms of use.