I have a requirement for a class, similar to OrientedShape3D, that preserves
object size in screen coordinates rather than direction. Call it
"FixedSizeShape3D". Given the following scene graph:
.
|
BranchGroup
|
+----------+----------+
| |
TransformGroup <--- MouseZoomBehavior
|
+-----+--------+
| |
Shape3D FixedSizeShape3D
...changes to the TransformGroup which cause a perceived increase in size of
the Shape3D (either via the ViewPlatform getting closer to the Shape3D in
perspective mode, or the TransformGroup being scaled) are inverted for
FixedSizeShape3D. The location of FixedSizeShape3D relative to Shape3D stays
the same, but as Shape3D gets "larger" or "smaller" in screen coordinates,
FixedSizeShape3D occupies the same number of pixels on the screen.
I basically want to use this capability for a 3D cursor, where I select
points on the surface of my 3D model and the cursor remains the same size in
screen coordinates regardless of the scale transformations that are made
between the Shape3D and the ViewPlatform. Again, just like OrientedShape3D,
but for size.
Anyone have any recommendations on how to approach this? Or does anyone have
any insight into how OrientedShape3D works, and how that technique can be
applied to scaling?
Do I basically create a Behavior (like Billboard) with a
"WakeupOnTransformChange" WakeupCriterion, and then "reverse-out" any scale
change? If I do that, am i garaunteed to be able to affect the transform
before the next rendering pass, or is there a chance that the viewer will
see the shape "jiggle" in size?
Thanks,
Simeon
/**
* @author Simeon H.K. Fitch
* @organization Mustard Seed Software
* @web http://www.mustardseedsoftware.com
* @email [EMAIL PROTECTED]
* @voice 210.867.1616
* @fax 309.424.4982
*/
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".