TransformRay Constructor
Constructor of the TransformRay control object.
Signatures
- GUIControls.TransformRay(viewport, controls, options, paramNamePosition,
Details
The GUI control object can either be bound to an paramate open parameter or not (see https://docs.paramate.trinckle.com/js/page_ref_controls_initialization.php
The GUI control is designed in a flexible style that allows to control either open parameter(s) that are a single vector and ray or an array of vectors and rays. The type is automatically determined from the open parameter. See explanation to argument paramNamePosition.
Parameters
- viewport
-
The paramate viewport object (see viewport constructor or viewport for WebGL constructor).
- controls
-
The paramate controls object (see manually generated controls or auto generated controls).
- options
-
An object containing settings for the control. It shall have the following form:
{
dragModeActive: <boolean>,
connectLines: <boolean>,
drawLabel: <boolean>,
labelText: <string>[]
}
If no settings shall be made, the value is set to false.
- options.dragModeActive
-
Optional parameter Boolean value that defines whether selected point(s) can be moved. (Default: true)
- Optional
-
parameter options.connectLines Boolean value that defines whether control points shall be connected by a line. (Default: false)
- options.drawLabel
-
Optional parameter. Boolean value that defines whether the helper labels will be rendered together with the point. (Default: false)
- options.labelText
-
Optional parameter. List of string values that define the text for the labels that shall be rendered. This parameter shall automatically be ignored if the options.drawLabel parameter is set to false.
- paramNamePosition
-
Optional parameter Either a string defining the name of the paramate open parameter or, if no open parameter shall be connected, the value undefined.
- paramNameRay
-
Optional parameter Either a string defining the name of the paramate open parameter or, if no open parameter shall be connected, the value undefined.
- positions
-
TODO: do I need positions or just rays? Test this (!!!) Optional parameter. An array of elements of type ref_paramateDTypes_Vector3 that define the inital value of the control. If the control is attached to an open parameter (i.e. if argument paramNamePosition is not undefined), this parameter is ignored.
- rays
-
Optional parameter. An array of elements of type ref_paramateDTypes_Ray that define the inital value of the control. If the control is attached to an open parameter (i.e. if argument paramNameRay is not undefined), this parameter is ignored.