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