Papervision 3D Programming Tutorial - Mouse Selection

Posted Feb 15, 2009 by mcasperson / comments 0 comments / Print / Font Size Decrease font size Increase font size

Learn how to highlight the Papervision object under the mouse pointer with this sample application. Demo and source code included.

VIEW THE DEMO
DOWNLOAD THE CODE

In the Photo Slide application I showed you how to add interactivity to a Papervision 3D application. Two classes were created to allow objects to respond to mouse click events: PickableObjectManager and PickableObject. PickableObjectManager was responsible for feeding the mouse coordinates into the Papervision Viewport hitTestPoint2D function, and then determining if any PickableObject had indeed been clicked on. The PickableObject class in turn simply received these events and expose appropriate functions to extending classes.

In the Photo Slide application the PickableObjectManager class (and therefore the PickableObject class) could only respond to a mouse click. In this sample application I have extended the PickableObjectManager class to allow it to determine if a PickableObject is under the mouse pointer as well as being able to detect if a PickableObject was clicked on. I have used this extended functionality to highlight the photo under the mouse pointer with a standard Flash GlowEffect.

Go back to Papervision Tutorials

Check out these other Papervision examples:

Loading and Displaying a 3D Model

Particle Systems with Flint

Modify Textures At Runtime

WOW Physics

Shading

Effects

Animated Textures

Mouse Selection

Texture Smoothing

Transparency

Animations

SkyBox

Environment Mapping

3D Text

BitmapViewport

3D Spectrum Analyser

Depth of Field

Casting Shadows

Photo Cloud

Photo Slide

Rate this Article:

Be the first to rate me.


* You must be logged in order to leave comments, please login or join us.

Comments

No comments yet.



Bookmark and Share
Sign up for our email newsletter
Name:
Email: