Open volcoma opened 8 years ago
when behind the camera the gizmo is still rendered but wrong. Add the following stuff to prevent this.
gContext.mCameraNearPlane.x = (gContext.mViewProjection.m[0][2]); gContext.mCameraNearPlane.y = (gContext.mViewProjection.m[1][2]); gContext.mCameraNearPlane.z = (gContext.mViewProjection.m[2][2]); gContext.mCameraNearPlane.w = (gContext.mViewProjection.m[3][2]);
and this
`void Manipulate(const float _view, const float projection, OPERATION operation, MODE mode, float matrix, float *deltaMatrix) { ComputeContext(view, projection, matrix, mode); // set delta to identity if (deltaMatrix) ((matrixt)deltaMatrix)->SetToIdentity();
vec_t cameraEyeToGizmo = Normalized(gContext.mModel.v.position - gContext.mCameraEye); if (cameraEyeToGizmo.Dot3(gContext.mCameraNearPlane) < 0) return;'
Shame on me! And same applies to the debug cube display. That will be fixed tomorrow. Thank you!
when behind the camera the gizmo is still rendered but wrong. Add the following stuff to prevent this.
gContext.mCameraNearPlane.x = (gContext.mViewProjection.m[0][2]); gContext.mCameraNearPlane.y = (gContext.mViewProjection.m[1][2]); gContext.mCameraNearPlane.z = (gContext.mViewProjection.m[2][2]); gContext.mCameraNearPlane.w = (gContext.mViewProjection.m[3][2]);
and this
`void Manipulate(const float _view, const float projection, OPERATION operation, MODE mode, float matrix, float *deltaMatrix) { ComputeContext(view, projection, matrix, mode); // set delta to identity if (deltaMatrix) ((matrixt)deltaMatrix)->SetToIdentity();