All of the predefined pick and mouse behaviors operate on
TransformGroup nodes rather than shape nodes.  You will need to provide
your own behaviors--using the existing behaviors as a starting point,
if you wish--that operate on the vertices of a geometry object.  As
long as you set the corresponding capability bits, you can modify the
coordinates of a live geometry objects at runtime.  Just use the
GeometryArray.setCoordinate method to alter the position of your
vertex.  If you need to apply a transformation to the existing position
to compute the new position, you can use the Transform3D.transform
method.

-- 
Kevin Rushforth
Java 3D Team
Sun Microsystems

[EMAIL PROTECTED]


>Date: Fri, 12 Feb 1999 11:27:05 +0000 (GMT)
>From: Tim Needham <[EMAIL PROTECTED]>
>To: "Sean J. Miller" <[EMAIL PROTECTED]>
>cc: Java 3D Interest Group <[EMAIL PROTECTED]>
>
>Hi,
>
>Yes that's one consideration but I also wish to interact with my shapes on
>a vertex level. Roughly - each shape type has a getVertex(PickRay) or
>similar and a setVertex(Point3d, Vector3d) or similar, to get the vertex
>nearest to the ray and then to alter it by the mouse drag amount.
>
>I think this might be a question for the Java3D team though as vertex
>manipulation appears to me to have been abstracted away from the user -
>there are so many things in the way of doing it nicely or cleanly.
>
>ie - is it the case that when a shape is transformed, by say a standard
>pick behaviour, that the transform group gets all the changes and that the
>vertex information inside the shape remains constant? If so then I need to
>apply the transforms explicitly to the vertices and not to the transform
>group.
>
>Basically, I just want to stick a cube on the screen, move it around and
>then drag individual points around to change its shape.
>
>Thanks,
>
>Tim.
>
>,----------------------------------------------------------------------.
>| Tim Needham.                                                         |
>| OU Computer Society President.             |\    ___,,--,_        __ |
>| [EMAIL PROTECTED]                   /,`--''        \`,,__,',-'| 
>| http://ox.compsoc.net/~timothy            |,4   ) )_    ) /~-----'   |
>`------------------------------------------'---^~(_/-_)--(_/_)---------'
>            Q: Why did the chicken cross the Moebius strip? 
>                 A: To get to the other ... er, um ... 
>
>On Thu, 11 Feb 1999, Sean J. Miller wrote:
>
>> Hello,
>> 
>> 
>> If I understand you right, you want to be able to "pick" individual
>> transforms within a Scenegraph and manipulate them by rotation, translation,
>> and zoom.
>
>---Clipped---
>
>> 
>> Attached is the revamped PickRotateBehavior.
>> 
>> Good luck,
>> Sean
>> 
>> 
>> 
>> 
>> 
>> 
>
>
>=====================================================================
>To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
>Java 3D Home Page: http://java.sun.com/products/java-media/3D/
>
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to