Creates a new arcticLayer object.

A layer is a subset of the screen area where you can display 3D objects. There are several reasons you may want to use a layer instead of adding the models to your main world object. Objects rendered in a new layer are always in front of objects from it's parent. Even by zooming in or out you cannot make objects from the parent layer appear in front of objects from a child layer. This is achieved by making each layer 'own' part of the z-buffer range. Secondly a layer will clip objects if they fall outside the layer's screen range. Generally you would define layers covering only part of the original screen area. This way you can create effects like overhead windows, or more game-like layouts of your 3D window.


Syntax:

arcticLayer newLayer(
 VARIANT width,
 VARIANT height,
 String anchor,
 VARIANT xOffset,
 VARIANT yOffset,
 float zRange)
Return: a new arcticLayer object
Parameters:
width

The width of the layer. You can either enter the width in pixels or in terms of a percentage of the window size of the 3D control. If you intend to use a percentage value you must enter the width as a string with the final character a percentage sign.

height

The height of the layer. You can either enter the height in pixels or in terms of a percentage of the window size of the 3D control. If you intend to use a percentage value you must enter the width as a string with the final character a percentage sign.

anchor

The anchor indicates relative to which point of the original window you want the new layer to render. The anchor is given as a 2 character string, the first character indicates where you want the new window located horizontally. The 3 allowed values are;
T

locate the new layer at the top of the window
C

locate the new layer at the centre(horizontally) of the window

B

locate the new layer at the bottom of the window

The second character indicates where you want the window vertically. The 3 allowed values are;

L

locate the new layer at the left of the window

C

locate the new layer at the center(vertiacally) of the window

R

locate the new layer at the right of the window

xOffset

The horizontal offset from the anchor position. You can either enter the width in pixels or in terms of a percentage of the window size of the 3D control.
yOffset

The vertical offset from the anchor position. You can either enter the width in pixels or in terms of a percentage of the window size of the 3D control.
zRange

The amount of 'z-space' this layer uses. This is not an absolute value. The viewer shares out the z-buffer depth to the various layers based on the total amount requested by all layers. Each layer receives a pro-rata share of the buffer depth. The original (master) layer has a z-range of one. Each layer is created in front of it's parent layer.

See also:

Class arcticLayer |

 

©2000 arcticpigs. All rights reserved.
This is a draft version! The functionality of parts of the software are liable to change.