Name: | Starfield |
Version: | 1.0 |
ID: | ID_STARFIELD |
Status: | Stable |
Category: | Effect |
Date: | February 2001 |
Author: | Rocklyte Systems |
Copyright: | Rocklyte Systems (c) 2000-2001. All rights reserved. |
Short: | This class creates a real-time animated starfield. |
The Starfield class displays a zooming starfield, a classic effect often used in older graphics demonstrations. When creating a Starfield object, you must make sure that it is contained by a graphical object area (e.g. that provided by a Render object). Another graphical object should also be used to define the background underneath the Starfield. Here is an example:
<render width="300" height="200"/> <box colour="#000000"/> <starfield maxelements="1000"/> </render>
Once initialised, the Starfield will run automatically until it is freed from the system. The amount of processor cycles used by the Starfield is directly proportional to the amount of requested stars, as specified by the MaxElements field. Generally, 500 to 1000 stars is sufficient for an adequate effect and minimal processor usage.
The Starfield object consists of the following public fields:
MaxElements The total number of stars is defined by this field. XOffset The horizontal location of the Starfield's center. YOffset The vertical location of the Starfield's center.
Field: | XOffset | |
Short: | The horizontal location of the Starfield's center. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | YOffset | |
Short: | The vertical location of the Starfield's center. | |
Type: | LONG | |
Status: | Read/Write | |
|