Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 3.5

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.