AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to stop a moving TransformGroup?

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> 3D Graphics API's for Java
View previous topic :: View next topic  
Author Message
folding
Guest





PostPosted: Sat Apr 22, 2006 4:12 am    Post subject: How to stop a moving TransformGroup? Reply with quote



Dear all,
my problem is that I am using a keyboard to navigate a transformgroup
object
the class implements KeyEventDispatcher
Below is the example of the coding

if(ycounter>3.7 && ycounter<4.83)
{
x = -(Math.cos(xcounter)*Math.cos(ycounter));
y = -(Math.sin(xcounter));
z = -(Math.sin(xcounter)*Math.sin(ycounter));

n = new Vector3d(v.x+x,v.y+y,v.z+z);

if((v.x+x<15)||(v.x+x>-15)||(v.z+z>-15)||(v.z+z>-15))
{
T3.setTranslation(n);

T3.setScale(0.9); // Add this line here to do the real
SCALE
transformGroupView.setTransform(T3);
}

how do I stop the movement, for example if the z coordinate reaches
10?
Thanks a lot
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> 3D Graphics API's for Java All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.