Вопрос

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