• Advertisement
Sign in to follow this  

model clipped wrongly

This topic is 4621 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
Um, I don't know, could it? I don't think so. But I would like to know how to move 'just' the far and near planes around.

Share this post


Link to post
Share on other sites
You set the near and far planes when you set the perspective matrix. I don't know what the function is for OpenGL though.

Chris

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement