I am using LineArray to do what u need. but it will work with any other Geometry. I 
make a LineArray with maximum coordinates I would need. and then keep setting the 
coordinates at run time. And it works pretty smooth;


        private static final int MaxPoints = 200;
        private int m_nLine                  = -1;
        private Shape3D m_shape;

        void createShape ()
                {

                LineArray line = new LineArray(MaxPoints*2, GeometryArray.COORDINATES 
);

                line.setCapability(line.ALLOW_COORDINATE_READ);
                line.setCapability(line.ALLOW_COORDINATE_WRITE);

                m_shape = new Shape3D( line, app );
                m_shape.setCapability( Shape3D.ALLOW_GEOMETRY_READ );
                m_shape.setCapability( Shape3D.ALLOW_GEOMETRY_WRITE );

                this.addChild( m_shape );
                }


        void addPoint (Point3f p3)
                {
                LineArray line = (LineArray)m_shape.getGeometry();
                line.setCoordinate( ++m_nLine, p3 );            }
                }

Ahmed

p.s. I m just sending u part of my code so u might have to debug it or if something is 
missing tell me





-----Original Message-----
From: Sackmunky [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 07, 2001 6:45 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Updating geometry


I have a thread in the background runnig at every two seconds. I want to
draw an increasing line that needs to update its geometry everytime the
thread executes. Can someone help in this field?

Thank you

Zak

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

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