POV-Ray : Newsgroups : povray.general : Raytracing applet : Re: Raytracing applet Server Time
4 Aug 2024 04:20:09 EDT (-0400)
  Re: Raytracing applet  
From: Bonsai
Date: 31 Jul 2003 10:31:12
Message: <3f292830$1@news.povray.org>
sascha schrieb:

> I was writing a kind of Povray Material Editor for JPatch, but thought 
> that this might be useful as an applet too.

Thank you for sharing this. It's very interesting for me, because it
gives me a little insight into Java3D.

> Source is available, let me know your comments/questions/suggestions

I would change the behaviour of the mouse dragging. In your version the
scene rotates to the left when the mouse is dragged to the right and
vice versa. I don't know whether this was intended or not.

I would change two lines in the mouseDragged method:

public void mouseDragged(MouseEvent event){
	int dx = event.getX() - iMouseX;
	int dy = event.getY() - iMouseY;
	iMouseX = event.getX();
	iMouseY = event.getY();			

/* old: fRotX += (float)dy/150f;*/
	fRotX += (float)-dy/150f;
/* old:	fRotY -= (float)dx/150f;*/
	fRotY -= (float)-dx/150f;

	fRotX = (float)Math.min(0.15f,fRotX);
	fRotX = (float)Math.max(-Math.PI/2,fRotX);
	repaint();
}

Just my 2 eurocents.

So long,

Bonsai

-- 
<--------------------------->
    ___ __ __  _ ___ ___  _
   | _ )  \  \( )  _) _ )( )
   | _ \() |\ \ |\ \/ _ \| |
   |___/__/_)\__)___)/ \_)_)

        www.b0n541.net
<--------------------------->


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.