X3d Lectures on the basics of actual combat

Source: Internet
Author: User

In the x3d scene space, X3D provides the point of view node viewpoint in order to enable the viewer to conveniently control the position and angle of observation. At the same time, in order to be able to browse in different ways, X3D provides the Navigationinfo navigation node.

Here is a description of the use of these two nodes.

One, Viewpoint node

The Viewpoint node indicates the position of observation and the direction of view in a x3d scene space, the main properties of which are as follows:

properties meaning default value use instructions
description text description of the viewpoint --
position viewpoint position 0 0 Space location of the specified observer
View direction 0 0 1 0
fieldofview zoom angle 0.785398 unit is radians, value range 0~ 3.14159, small angle is equivalent to long shot, large angle is equivalent to wide-angle lens.
jump true
Rotation center position 0 0 0

The simple sample code is as follows:

Description: The above code is used to view the cylinder in different directions. The most difficult thing to understand in code is the position and perspective of the viewpoint. By default, our human eye is in the +z direction, when the point of view position in the rear of the cylinder, that is, "back" view, our eyes are still in the direction of the direction of the eye, must be observed from the outside to see the cylinder, so we will rotate the angle around the y axis 180 degrees. Similarly, you can understand the settings for the top and left viewpoints.

The results are shown in the following figure.

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.