How rotation camera3d and viewer3d worked in Away3d

Rotation in Away3D Flash engine

image0

In this blog entry we are going to learn about How the Rotation and camera3d and viewer3d in away3d flash engine.

Red line = x-axis

Blue line = y-axis

Green Line = z-axis

How Rotation works ..?

Rotation in away3d based on the three axis . Those are x.y and z.  the component is rotated take any one of this axis as a center then rotated. In my last post the sphere is rotated along with x axis. In that example the axis is like that (see below )

sphere.rotationX = sphere.x + 1;

The sphere takes x axis as a center and rotate like above...

In this example we add two or more components in the ObjectContainer3D then rotate this objects. In this example we are going to learn about how camera3D and Viewer3D works.

How Camera3D works ..?

image1

Camera3d = real camera

view3d = lens the viewr of the camara

renderer = recording in real cam

scen3d = what we seen

This diagram explained in Papervision3d Essential book.. In this diagram your clearly understood about camera3d.

If we assume Camera 3d is like a real camera . we assume it is with in our application in invisible mode.

The viewerport (view3d) is an lens or what you are view using the camera.

The render engine is recording engine in the real camera. In the real camera If  we start the record then only we can see the changes otherwise not. Like same as in camera3d we called

viewer.render()

method each time if anything changed in the components. In the real camara If any person is not inside the seen they are not come in the flim. Same as in the scene3d if we not add add any components in the scene 3d objects  it is not visible.

How Viewer3D Works ..?

Download the source code click here (compatible for Flashdevelop IDE)

Show Comments