JSFigure

API for creating and modifying 3D Figure objects.

Create a API with Module.createFigure.

JSFigure Type Constants

let figure = Module.createFigure("ID");

Function

getAngle() → number

Returns the rotation angle around the y-axis of the object.

  • Return

    • Valid angle (number): Successful return of the rotation angle.

    • -999.0 (number): If the object is null.

getBoundary() → JSAABBox3D

Returns the object's boundary.

  • Return

    • JSAABBox3D: The function successfully returns the object's bounds.

    • null: Object bounds return failed.

getCenter() → JSVector3D

Returns the center point of the object.

  • Return

    • JSVector3D: Returns the centroid coordinates (longitude, latitude, altitude) of the object successfully.

    • null: Coordinate return failed.

getExtent() → number

Returns the distance between Min-Max of the object boundary Box.

  • Return

    • number: Distance between Min-Max of the object boundary Box.

getFigureType() → number

Returns the Figure type of the object.

JSFigure Type Constants

  • Return

    • Valid constant (number): Successful return of the Figure type.

    • -1 (number): If the object is null.

getId() → string

Returns the ID of the object.

  • Return

    • string: Successful return of the object's Key string.

    • null: If the object is null.

getPosition() → JSVector3D

Returns the bottom center position of the object.

  • Return

    • JSVector3D: Returns the bottom center coordinates (longitude, latitude, altitude) of the object successfully.

    • null: Coordinate return failed.

getSize() → JSVector3D

Returns the size values of the object.

  • Return

    • JSVector3D: Successfully returns the scale of the object corresponding to the x, y, z axes.

    • null: size return failed.

setAngle(angle) → boolean

Sets the rotation angle around the y-axis of the object.

Name
Type
Description

angle

number

Rotation angle around the y-axis (in degrees).

  • Return

    • true: Rotation angle setting successful.

    • false: If the object is null or the input angle is outside the range of 0º to 360º.

setDepth(depth) → boolean

Sets the depth (Z-axis direction size) of the object.

Name
Type
Description

depth

number

Object depth.

  • Return

    • true: Object depth setting successful.

    • false: If the object is null.

setHeight(height) → boolean

Sets the height (Y-axis direction size) of the object.

Name
Type
Description

height

number

Object height.

  • Return

    • true: Object height setting successful.

    • false: If the object is null.

setWidth(width) → boolean

Sets the width (X-axis direction size) of the object.

Name
Type
Description

width

number

Object width.

  • Return

    • true: Object width setting successful.

    • false: If the object is null.

setPosition(position) → boolean

Sets the bottom center position of the object.

Name
Type
Description

position

Figure location (based on the bottom center point) coordinates (longitude, latitude, altitude).

  • Return

    • true: Setting successful.

    • false: Setting failed.

setSize(width, height, depth) → boolean

Sets the size of the object.

Name
Type
Description

width

number

Object width (size in the x-axis direction).

height

number

Object height (size in the y-axis direction).

depth

number

Object depth (size in the z-axis direction).

  • Return

    • true: Object size setting successful.

    • false: If the object is null.

Getter / Setter

getDescription(), setDescription(desc) → string

Set a description for the object.

Name
Type
Description

desc

string

Object description string.

  • Return

    • string: Successful return of the object's description string.

    • null: If the object is null.

getName(), setName(name) → string

Sets the name of the object.

Name
Type
Description

name

string

The name to set for the object.

  • Return

    • string: Successful return of the object's name.

    • null: If the object is null.

getStyle(), setStyle(style) → JSPolygonStyle

Changes the object style with options applied in JSPolygonStyle.

Currently settable styles (subject to updates - refer to JSPolygonStyle)

Name
Type
Description

style

Object style

  • Return

    • Valid object style (JSPolygonStyle): Successful return of the object style.

    • Simple initialized state of object style (JSPolygonStyle): If the object is null.

getVisible(), setVisible(visible) → boolean

Sets the visibility state of an object.

Name
Type
Description

visible

boolean

true: Make the object visible. false: Hide the object.

  • Return

    • true: Object visible state.

    • false: Object hidden state.

Last updated