문제

Why are the near and far coordinates are interpreted as negative in orthographic projection? Is it just customary or there is really any benefit of this?

도움이 되었습니까?

해결책

I don't really think there's any reason. Using orthographic projection you can set your near/far planes to be anything, it just defines what z values you want to be displayed. I can't think of any particular benefit to this.

다른 팁

The near and far clipping planes can be anything you want and I think the confusion here is because in OpenGL "forward" or into the screen is -Z. So if I want to see things from the origin to 100 units in front of me, the near will be 0 and the far is -100. But I could also have said I want to see things 30 units behind the origin to 50 units in front in which case near would be 30 and far would be -50.

An added confusion to all this is that glOrtho takes near and far clipping planes but reverses the sign on them to "help" you.

Why are the near and far coordinates are interpreted as negative in orthographic projection?

Who says that they are? There's no rule that the near/far values must be negative in orthographic projections. Your question assumes facts not in evidence.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top