Show only part of a LineStripArray?

View: New views
5 Messages — Rating Filter:   Alert me  

Show only part of a LineStripArray?

by java3d-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I am building a scene which contains several 3D curves that I have modelled with individual LineStripArrays.  Each curve can contain several thousand 3D points.  Is there a way to only show part of the curve between a start point and end point?

My idea is that I can change the start and end points dynamically during animation so that the visible part of the curve appears to move along its path.

Thanks in advance
Dave
[Message sent by forum member 'dwsubc' (dave@...)]

http://forums.java.net/jive/thread.jspa?messageID=370854

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...


Re: Show only part of a LineStripArray?

by java3d-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

the Java 3D API supports dynamical setting of an initial vertex index and a valid vertex count.

See the javadoc of GeometryArray for [b]setInitialVertexIndex(..)[/b] and [b]'setValidVertexCount(..)'[/b] for non-stripped subclasses. For a GeometryStripArray [b]'setStripVertexCounts(..)'[/b] has to be called. So, you might consider using a non-stripped LineArray.

Changing these attributes on a live scene requires to set the capability bit [b]GeometryArray.ALLOW_COUNT_WRITE[/b].

August
[Message sent by forum member 'interactivemesh' (A.Lammersdorf@...)]

http://forums.java.net/jive/thread.jspa?messageID=370952

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...


Re: Show only part of a LineStripArray?

by java3d-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks August,

It looks like this will do what I want.  I need to rework my code to take advantage of this.  If I get it to work, I will post a snippet.

Thanks again
Dave
[Message sent by forum member 'dwsubc' (dave@...)]

http://forums.java.net/jive/thread.jspa?messageID=370980

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...


Re: Show only part of a LineStripArray?

by java3d-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just an update on the above.  I tried changing the lineStripArrays to lineArrays and then changing the start vertex and vertex counts to animate the lines.  

However, this really slowed down the frame rate so I switched back to lineStripArrays.  To animate the lines I now change the coordinates of each point at each frame.  This means I need to keep the coordinates of each complete line in a separate array and then copy them across.

Dave
[Message sent by forum member 'dwsubc' ]

http://forums.java.net/jive/thread.jspa?messageID=372007

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...


Re: Show only part of a LineStripArray?

by java3d-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Shaders are good to animate lines.
But afaik some video cards (Intel) has no GLSL support  :(
[Message sent by forum member 'zesharp' ]

http://forums.java.net/jive/thread.jspa?messageID=372015

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...