Sorry, I hit C-c C-c by mistake :(

> Date:         Mon, 10 Mar 2003 16:36:24 +0200
> From: Rudy Wuite <[EMAIL PROTECTED]>
>
> I am using a GeometryArray that is BY_REFERENCE, ALLOW_REF_DATA_READ and =
> ALLOW_REF_DATA_WRITE.
>
> I would like to add more user defined vertices to that GeometryArray, so =
> I  change the length of the underlying BY_REFERENCE coordinate array.
>
> I am able to adjust the validVertexCount via setValidVertexCount but not =
> the vertexCount for the GeometryArray.
>
> It would seem that is not possible to adjust the length of the =
> GeometryArray objects.
>
> Does anyone have any Ideas, to do this efficiently and with as minimal =
> memory overhead as possible, do I have to make a new GeometryArray ?.

It's best to use a new GeometryArray.  Since you're using BY_REFERENCE,
most of the data stays put in your own arrays and there should be
minimal copying.

That said, one recent poster to this list did mention using
Integer.MAX_VALUE for the vertexCount:

> Date:         Mon, 10 Mar 2003 09:01:47 +0800
> From: Brad Christiansen <[EMAIL PROTECTED]>
>
> I have used Integer.MAX_VAL as the vertex count in the
> constructor. This works but I have no idea if it is wasting any
> resources. It seems not to be but I haven't investigated closely
> yet. I actualy asked a question a little while back if this wasted any
> resources and rescieved no answers.

It turns out that depending upon your data, BY_REFERENCE might not
actually allocate any arrays based on vertexCount, although
validVertexCount needs to be correct.

I can't actually recommend this approach because BY_REFERENCE does need
to allocate some arrays based on vertexCount for things like global
alpha, format conversion, and numerous other things.  Use this
information at your own risk; it's not supported behavior.

-- Mark Hood

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