Class Documentation

Name:Bounce
Version:1.0
ID:ID_BOUNCE
Status:Stable
Category:Effect
Date:May 2001
Author:Rocklyte Systems
Copyright:  Rocklyte Systems (c) 2000-2001. All rights reserved.
Short:  Bounces graphical objects within their containers.



Description

This class bounces objects up and down inside their containers (as odd as that may sound). You can apply it to practically everything in the GUI, including Windows, Text, Buttons and Icons by adding a Bounce object as a child of any drawable object. This class is something of a toy and has no major purpose beyond having some humorous value when applied to rendered graphics.

Structure

The Bounce object consists of the following public fields:

Gravity  The current gravity level.
HVelocity  The horizontal velocity of the bouncing object.
Object  Refers to the object that will be bounced.
VVelocity  The current vertical velocity of the bounce.
Field:Gravity
Short:The current gravity level.
Type:FLOAT
Status:Read/Write

The level of gravity affecting the bounced object is determined by this field. The higher the value, the faster that the object will bounce towards the ground. A value between 0.25 and 0.75 will normally provide an adequate gravity level.


Field:HVelocity
Short:The horizontal velocity of the bouncing object.
Type:FLOAT
Status:Read/Write

This value reflects the velocity of the bouncing object in a horizontal direction. You can change it to adjust the rate at which the object moves to the left and right. Negative values indicate that the object is moving to the left, positive values indicate that it is moving to the right.


Field:Object
Short:Refers to the object that will be bounced.
Type:OBJECTID
Status:Read/Init

You can specify the object that should be bounced by setting this field. If you do not set the Object field, the Bounce object will attempt to bounce its container.


Field:VVelocity
Short:The current vertical velocity of the bounce.
Type:FLOAT
Status:Read/Write

This field indicates the current vertical speed of the bouncing object. If negative, the object is moving upwards - if positive then the object is moving downwards.