Sign in to follow this  
Wizumwalt_

model clipped wrongly

Recommended Posts

I'm trying to get my camera positioned correctly on a finite 3d orthographic model I have. My models farthest point on the Z axis is -1.200000048 The models nearest point on the Z axis is 0.4825999737 My Z axis centroid point is -0.5024517178535461 My problem is that if I multiply the nearest Z point by 2 and place my camera on that z point (if I understand coorectly, then this should move the camera further away from the model so I can see all of it) by using the following java gluLookAt line ... glu.gluLookAt(centroid.getX() + xTrans, centroid.getY() + yTrans, centroid.getZ() + zTrans + (centroid.getMax_Z() * 2), centroid.getX() + xTrans, centroid.getY() + yTrans, centroid.getZ(), 0.0, 1.0, 0.0); ... then my model gets clipped from what looks to be the z-axis centroid and everything on back when I rotate it. Anyone have ideas on what is going on? I can't understand why it clips the back half of my model when I do this.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this