Article Preview
Buy Now
COLUMN
Control Panel Library
Panel Class
Issue: 3.5 (May/June 2005)
Author: Joe Nastasi
Author Bio: Joe Nastasi is the president of Pyramid Design, a software development firm and the developers of A-OK! Spacecraft Simulation System and FTP Suite.
Article Description: No description available.
Article Length (in bytes): 10,296
Starting Page Number: 38
Article Number: 3517
Related Link(s): None
Excerpt of article text...
First, let's discuss the setup and use of the camera in the Panel Class. Remember that this class is based on the RB3DSpace control, so we need to set up the camera. The camera will be moved to give the appearance of zooming in and out of the panel and dragging the panel around.
There are three private properties that define the limits of how the control panel can be viewed:
WidthLimit -- How far the panel can be dragged horizontally.
HeightLimit -- How far the panel can be dragged vertically.
DistanceLimit -- How far the camera can be moved away from the panel; essentially define where the "zoom out" feature will stop. Remember that the camera in the Panel Class has to have a very narrow field of view so the panel appears flat. So to provide the ability to zoom in and out, the camera is moved in the Z axis.
These properties are saved by calling the SetCameraLimits method when a panel is first set up. After setting up a narrow field of view and flat lighting, the ResetCamera method calculates the required position and Yon values:
...End of Excerpt. Please purchase the magazine to read the full article.