Hello

Warning: Bad English ahead.

On Sunday 01 August 2004 05:26, you wrote:
> this is my first message to this interest group, so please excuse any lack
> of etiquette .

Don't worry, there's no special etiquette here. But you should search the 
archives for the "[JAVA3D] New Java 3D interest list -- 
[EMAIL PROTECTED]"-message.

> I would like to add extra objects to the environment after compile time, to
> represent the actual weld as it moves across the metal, but I have
> absolutely no idea how to do this, or even if it can be done.

First read the docs for "BranchGroup" and "Group".

What you have to do before compiling/showing anything on the screen:

Create a BranchGroup WELD and call:

WELD.setCapability(WELD.ALLOW_CHILDREN_EXTEND);
WELD.setCapability(ALLOW_CHILDREN_READ);
WELD.setCapability(ALLOW_CHILDREN_WRITE);

attach WELD to the scene-graph at a "good" position, compile the whole thing 
(the metal-box and the rest) and show it.


If you want to add a bit later:
TransformGroup TG = new TransformGroup ();
TG.setTransform(transform_to_the_right_position_realtive_to_WELD);
TG.addChild (the_thing_representing_the_weld_bit);

WELD.addChild(TG);


The trick is to tell java3d BEFORE compiling/setting live that later where 
will be changes in the BranchGroup by calling setCapability. You have to use 
setCapability for a lot of things, like for:

changing textures/colors, 

removing stuff (BranchGroup.ALLOW_DETACH => BranchGroup.detach()), 

picking (for finding out what the user clicked on ALLOW_PICKABLE_READ, 
ALLOW_PICKABLE_WRITE, ENABLE_PICK_REPORTING + some stuff in GeometryArray),

or collision detection (ENABLE_COLLISION_REPORTING).


For your problem i would have a look at:
PickCanvas (The user clicks on something and PickCanvas figures out what it 
was an where, use GEOMETRY_INTERSECT_INFO)

Box.getShape(...) (For marking the shapes as pickable and the geometry 
readable to PickCanvas)

good luck & cu

===========================================================================
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".

Reply via email to