David Yazel wrote:
> Soon we will be supporting layered terrain, like caves, overhangs, etc, so
> moving away from actual picking will start causing some real problems.
Exactly. The test code that I used for my code was a church - very
lovely structure - rolling hills for geometry, sloping floors and lots
of arches and nested geometry structure. Basically all the same
qualities that you have to deal with.
> geometry by reference for terrain, so I am basically loading the geometry
> arrays for each terrain quad patch directly from our own file formats and
> handing them off to Java3d to manage. So I am not sure what the right
> solution would be.
The way that we do it in Xj3D is to keep a copy of the data that is fed
to j3d. ie, if you are using tri-strip arrays for the collapsed geometry
or triangulator, you still have the original geometry. It costs a little
bit of memory, but for us we already were keeping the data around so it
didn't matter.
Internally, my terrain code will make use of the GeometryData class that
I use elsewhere in the j3d.org package for generating the geometry. If
we don't have that then we fall back to accessing it directly from the
geometry.
One item on my task list is building a bunch of different utils similar
to the Triangulator. I'm interested in doing stuff like contour
generators etc. In a future rev, they may be useful for your app because
they too will use the GeometryData.
> My real concern is more with collision detection.... I can't very well move
> every single structure, tree, rock, avatar, wall, stair, etc into
> by-reference geometry so I can search it myself. The frame rates would
> plummet. And bounds checking is no good since we collapse localized
> geometry sharing the same brush into one geometry array for speed of
> rendering., so conceivably you could be in a room surrounded by a geometry
> contained in a single geometry array.
Have a look at Shape3D.intersect(). I never got a sensible answer on its
behaviour, but it might be what you need if you pass in a PickSegment.
--
Justin Couch http://www.vlc.com.au/~justin/
Freelance Java Consultant http://www.yumetech.com/
Author, Java 3D FAQ Maintainer http://www.j3d.org/
-------------------------------------------------------------------
"Humanism is dead. Animals think, feel; so do machines now.
Neither man nor woman is the measure of all things. Every organism
processes data according to its domain, its environment; you, with
all your brains, would be useless in a mouse's universe..."
- Greg Bear, Slant
-------------------------------------------------------------------
===========================================================================
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".