There are new APIs in 1.2 that allows you to set a bigger
GeometryArray and use only part of it.
For Copy case:
GeometryArray::setInitialVertexIndex()
GeometryArray::setValidVertexCount()
For By Reference Case:
GeometryArray::setInitialColorIndex()
GeometryArray::setInitialCoordIndex()
GeometryArray::setInitialNormalIndex()
GeometryArray::setInitialTexCoordIndex()
GeometryArray::setValidVertexCount()
-Uma
----- Begin Included Message -----
>From [EMAIL PROTECTED] Sat Apr 29 08:33:16 2000
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Date: Sat, 29 Apr 2000 17:36:58 +0200
From: Marco Lohse <[EMAIL PROTECTED]>
Subject: Re: [JAVA3D] Changing the length of strips & GeometryArrays
To: [EMAIL PROTECTED]
Hi Duncan,
I am thinking about two things which might help you:
1) try using geometry by reference as introduced with J3D 1.2. Then you
could use System.arraycopy(..) to recreate things which should be very fast.
2) some (possible urgly) fix would be: since you said only 3% of your data
changes, just create the geometry with an upper bound of your number of
vertices, then set all unused strips to some dummy point like (0,0,0) (so
they won´t be rendered as triangles), later just change things in the
geometry array which is passed by reference (see above).
Maybe, another thing would be to use immediate mode rendering,...
Regards,
Marco.
----- Original Message -----
From: D.A. Woods <[EMAIL PROTECTED]>
> Hi there,
>
> I need to lengthen, shorten, add & remove triangle strips at run
> time.
>
> Does anyone have any idea how to do this efficently or
> even approach this problem?
>
> It seems to me that the triangleStripArrays have pre-declared
> length and strip lengths so a whole new array has to be created. This is
> a problem beacuse I only want to change ~3% of the data each time so is
> there a fast way of doing this from another array that doesn't require all
> the data to be physically copied?
>
> Even a fast way of changing the array length would be a great
> help.
>
> Please help or tell me it can't be done,
>
> Thanks,
> Duncan
>
>
===========================================================================
> 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".
----- End Included Message -----
===========================================================================
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".