vector
An Euclidean vector.
Signatures
- vector( float x, float y )
- vector( float x, float y, float z )
Details
The basic vector value type.
The first constructor may be used to define 2-dimensional vectors. It creates a vector with a zero length Z component.
A short-hand notation exists for writing a vector constant that is the vector components inside double brackets '<[' and ']>'.
Example
vector v1( 1.0, -1.0, 2.5 )
vector v2 = <[ 3.0, -0.5 ]>
Example
open vector v
{
name = "Point selection"
descr = "A number of points that can be selected"
value = <[1,4,-2]>
options = [<[0,0,1]>, <[3,2,1]>, <[1,5,-2]>, <[4,4,2]>]
}
echo( v )
Output
<[1,5,-2]>
Casts To
Members
- float x
-
Allows to read/write the X component of the vector.
- float y
-
Allows to read/write the Y component of the vector.
- float z
-
Allows to read/write the Z component of the vector.
Optional Open Parameter Attributes
- bool readonly
-
Tells the user interface or frontend to disable the setting of the open parameter.
- string style
-
Specifies some limited styling instructions for the user interface or frontend.
- vector[] options
-
An array of vectors that defines a selection of allowed values. The user interface or frontend may use a drop-down list to display this open parameter's control. The system enforces that the open parameter value is of the selection options.
- string[] options_texts
-
This attribute requires an options attribute to be present. The options_texts attribute is an array of string values that should ideally have the same length as the options array. Its function is to provide a short name or description for each of the options values. These may be used in the drop-down list by the user interface or frontend.
Parameters
- x
-
Vector component in X direction.
- y
-
Vector component in Y direction.
- z
-
Vector component in Z direction.