Justin Couch wrote:
Holger Kral wrote:
if i do a fast rotation via usercontrols i still
see the patches of my terrain 'popping' in at the
border of the screen. if the above is the right way
to do the manualplatformmove, then it may be a bug in
my application....
The code you're posting looks right to me so I guess it's a problem with
your app code not correctly dealing with partially clipped polygons.
It's a bit hard to say though, it could be the VF code's fault too. Can
you create some edge cases where you just move a single triangle just
into and just out of the frustum and check on the return values of
isPointInFrustum() and isTriangleInFrustum()? If both of those return
the correct answer, then the bug is most probably in your code, if they
don't return the correct answer, time for me to go hunting for the
problem :)
hi!
i've just had a look into the code of the j3d.org frustum.
ViewFrustum.java:
public void manualPlatformMove(Matrix4d tx)
{
tx.transform(frustumPoints[0]);
tx.transform(frustumPoints[1]);
tx.transform(frustumPoints[2]);
tx.transform(frustumPoints[3]);
tx.transform(frustumPoints[4]);
tx.transform(frustumPoints[5]);
tx.transform(frustumPoints[6]);
tx.transform(frustumPoints[7]);
}
everything this method does is to transform the frustum points.
the methods isPointInFrustum/isTriangleInFrustum use the computed
frustumplanes for intersection tests. a call to one of those methods
will get results which are correct for the last rendered frame, because
the transformed frustumpoints are never used.
maybe i'm wrong with my assumptions and i'm missing something.
the only public method which the frustumpoins are concerned seems to be
getbounds()....
thnx for your patience...
holger
--
Justin Couch http://www.vlc.com.au/~justin/
Java Architect & Bit Twiddler 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".
===========================================================================
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".