I am inserted a line in a Shape3D and before It�s add in a BranchGroup.
I like to know what can I do to change the color line again, after it is
inserted into a shape3d and branchGroup.
I need to get the line that was insert in BranghGroup?? How I can do it?
As follow, my code is:
Shape3D createLine()
{
Vector3f v1 = new Vector3f();//point 1
Vector3f v2 = new Vector3f();//point 2
LineArray line = new LineArray(2, GeometryArray.COORDINATE ||
GeometryArray.COLOR_3);
BranchGroup b = new BranchGroup();//cria-se um branch para cada linha
line.setCoordinate( 0, new Point3f(v1.x,v1.y,v1.z));//create line
line.setCoordinate( 1, new Point3f(v2.x,v2.y,v2.z));
for (int i=0;i<2;i++)//change line color
line.setColor(i,this.penColor);
Shape3D s = new Shape3D(line);//shape contain the line
b.addChild(s);//insert the shape into branchGroup
}
Now I can get this line again to change color! How I can do It?
I supose that it can be done that:
b.getChild(0).getGeometry();?????
/*********************************************
SILVANO MALFATTI
COMPUTER SCIENCE - URI University
HOME - http://www.urisan.tche.br/~smalfatti
********************************************/
-------------------------------------------------
URI - Campus de Santo Angelo-RS
http://www.urisan.tche.br
===========================================================================
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".