model clipped wrongly
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.
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.
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
Chris
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement