TransformPoint Constructor

Constructor of the TransformPoint control object.

Signatures

  •   GUIControls.TransformPoint(viewport, controls, options, paramNamePosition, positions)

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 an open parameter that is a single vector or an array of vectors. 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

Boolean value that defines whether selected point(s) can be moved. (Default: true)

options.connectLines

Boolean value that defines whether point(s) 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

Either a string defining the name of the paramate open parameter or, if no open parameter shall be connected, the value undefined.

positions

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.