Translation and rotation of MDX (1)

Source: Internet
Author: User
Tags min

To do the project for a year, although said not to learn very well, but over the past year, I have learned more, but also have some experience, as I said before the now do not have to write more, wait two days will not have so much time, the project at the beginning, that may not have much time.

The project I'm working on is a geology-related project, there will be some essential graphic display, the two dimensions of the teacher's own very good, but in 3D, we have no experience, only on their own to grope, in their own groping process, the most headaches is no information, in the is to ask others no one to answer you, Asked others also be said to call himself to the book step by step knocking examples, the people are angry death, well, I now will I encountered in the study of the two problems I have two months to write out for your reference, but also please more exchanges.

Speaking of translation, we have to talk about two projection modes, one is the parallel mapping mode, the other is the perspective projection mode.

The so-called parallel projection mode, is the model of every point, are projected vertically to the screen, attention is direct. Regardless of the distance between the model and the screen, the projection on the screen is the same as the actual size. and perspective projection is similar to our usual perspective, objects in line with the "near big far small" visual habits. That's the picture.

This is the pattern we use in all the available data, isn't it, but have you ever thought about what it would be like if I switched the projection mode to parallel?

Perspective projection
device. Transform.projection = MATRIX.PERSPECTIVEFOVLH (float) Math.pi/4, (float) this. Width/this. Height, Min, max);
Orthogonal projection
device. Transform.projection = Matrix.ortholh (this. Width, this. Height, Min, max);

This is precisely the key, just change the projection mode can be, to achieve very good translation effect, now think, originally in order to achieve the eyeshot of the kind of mouse movement function I look at that effect for a few hours, now think but a penny is not worth, now thank Dr. Lin Rui, Because it is to see his program I solve this problem, now put his program, attention in the use of time, we must pay attention to the choice of parallel projection mode, otherwise it will not achieve the effect I said. I'll write the translation tomorrow, that's not a good thing to say all of a sudden.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.