The Vector Object

The vector object is returned by several properties of other objects, for example the 'base' property of the model-object or the 'diffuseColor' property of the group-object. When you obtain a vector in this manner the vector is in fact a reference to the original property. To stay with the 'base' example, if one has the following line of script

var hRocation = arcticLayer.Models("sus scrofa").base

then the variable 'hRocation' is now linked to the base-location of the model 'sus scrofa'. So if you at any time change this vector it will have an immediate impact on the location of the model. For example

hRocation.Set(0,100,0);

will move the model to the 3D location (0,100,0). For vector values representing colours the same applies; changing any value on the vector will have an immediate effect on the material or light colour in the scene.

Some functions return a vector object that identifies a colour, for example the group::diffuseColor property. For 'vectors' identifying colours you can refer to the red, green and blue components separately. Alternatively you can use the RGB property to set all three components simultaneously.

Properties, Events and Methods

Name Type Description
set MethodSets all three element of the vector.
void set(float x , float y, float z)
blue (float) PropertySets or retrieves the blue colour component of the colour-vector.
green (float) PropertySets or retrieves the green colour component of the colour-vector.
red (float) PropertySets or retrieves the red colour component of the colour-vector.
rgb (Long) PropertySets or retrieves the RGB colour value of the colour-vector.
x (float) PropertySets or retrieves the x coordinate of the vector.
y (float) PropertySets or retrieves the y coordinate of the vector.
z (float) PropertySets or retrieves the z coordinate of the vector.

 

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