WorldWind Source Analysis Series: Visual Body Class

Source: Internet
Author: User

The Visual body Class frustum in PLUGINSDK is a concept in three-dimensional computer graphics, which is mainly used to describe the process of perspective projection. In three-dimensional computer graphics, the rendering of three-dimensional objects, Direct3D and OpenGL are first through the world in the real world transformation, and then by setting the observation matrix to place a virtual camera in the scene, to build a visual body to crop the visible area of the scene, Then in the projection transformation (parallel projection or perspective projection), get the "image" of the three-dimensional scene, and finally through the viewport transformation, the scene "like" raster output to a two-dimensional display screen. As shown in.

There are two kinds of projection transformations: Perspective projection and parallel projection. The view body class frustum is precisely used to describe the projection transformation process in the perspective projection. As shown in. The key parameters are as follows: Y-view field angle, far clipping plane, near clipping plane, projection window aspect ratio. These factors can construct a perspective projection to participate in three-dimensional object rendering operations.

The class diagram of the Frustum class of the scene body class is as follows.

The field planes array uses 6 planes to describe the 6 boundary planes of the scene body.

The Update method updates the 6 boundary planes of the scene with a given matrix object. The MICROSOFT.DIRECTX plane plane structure, the Vector3 class, and the Matrix class are used.

The intersects method is used to test whether the scene object intersects with the outer bounding sphere of the input. Its overloaded form is used to test whether it intersects the outer bounding box.

The Contains method is used to test whether the visual body object completely contains an outer bounding box.

The Containspoint method is used to test whether the visual body object contains exactly one point vector.

WorldWind Source Analysis Series: Visual Body Class

Related Article

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.