TransformEditorViewModel

ion SDK new Cesium.TransformEditorViewModel(options)

Creates an interactive transform editor
Name Type Description
options Object An object with the following properties
Name Type Default Description
scene Scene The scene
transform Matrix4 The transform of the primitive that needs positioning
boundingSphere BoundingSphere The bounding sphere of the primitive that needs positioning
originOffset Cartesian3 optional A offset vector (in local coordinates) from the origin as defined by the transform translation.
pixelSize Number 100 optional The desired size of the transformation widget in pixels. Set this to zero to disable screen space scaling.
maximumSizeInMeters Number Infinity optional The maximum size of the transformation widget in meters. Set this to Infinity for no limit.

Members

static Cesium.TransformEditorViewModel.originOffset : Cartesian3

Gets and sets the offset of the transform editor UI components from the origin as defined by the transform
Gets whether the widget is active. Use the activate and deactivate functions to set this value.
Gets and sets the selected interactive mode.
Gets and sets whether non-uniform scaling is enabled
Gets and sets the heading pitch roll
Gets the x screen coordinate of the widget menu
Gets and sets whether the menu is expanded
Gets and sets the position
Gets and sets the scale
Gets the y screen coordinate of the widget menu

Methods

Activates the widget by showing the primitives and enabling mouse handlers
Deactivates the widget by disabling mouse handlers and hiding the primitives
Destroys the view model.
Expands the widget menu
Returns:
true if the object has been destroyed, false otherwise.
Activates the rotation interactive mode
Activates the scale interactive mode
Activates the translation interactive mode
Sets the originOffset based on the Cartesian3 position in world coordinates
Name Type Description
position Cartesian3
Toggles whether non-uniform scaling is enabled
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.