(cocos2dx-3.3) 3D coordinate system

Source: Internet
Author: User

OpenGL uses right-hand coordinates

From left to right, x increments
From bottom to top, y increments
From far to near, Z increments

OpenGL coordinate system can be divided into: World coordinate system and current drawing coordinate system.

The world coordinate system takes the center of the screen as the origin (0, 0, 0). You face the screen, your right side is the x positive axis, the top is the y positive axis, the screen points to your z-axis. The unit of length is determined as follows: The window range is exactly ( -1,-1) to (in) the unit.

The current drawing coordinate system is the coordinate system at which the object is drawn. When the program is just initialized, the world coordinate system and the current drawing coordinate system are coincident. When using Gltranslatef (), Glscalef (), Glrotatef () to translate, scale, and rotate the current drawing coordinate system, the world coordinate system and the current drawing coordinate system are no longer coincident. After the change, and then using glvertex3f () and other drawing functions to draw, are in the current drawing coordinate system to draw, all the function parameters are relative to the current drawing coordinate system in terms of. rotation around the x, Y, Z axis is equivalent to the pitch angle (pitch, tilt), yaw angle (yaw, pan), Tumbling angle (roll)

(cocos2dx-3.3) 3D coordinate system

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.