JSViewFrustum

API for creating and modifying frustum objects.

Create a API with Module.createViewFrustum.

var object = Module.createViewFrustum("ID");

Function

createViewFrustum(position, pan, tilt, x, y, distance)

Creates a frustum object.

Rotation information based on the pan input value: 0, 360 (north), 90 (east), 180 (south), 270 (west).

Rotation information based on the tilt input value: 0 (front), tilt<0 (top), tilt>0 (bottom).

Name
Type
Description

position

Frustum's location coordinates (longitude, latitude, altitude).

pan

number

Frustum's Y-axis rotation setting.

tilt

number

Frustum's X-axis rotation setting.

x

number

Frustum's field of view width setting.

y

number

Frustum's field of view height setting.

distance

number

Frustum's length setting.

getFov() → JSVector2D

Returns the field of view size of the frustum.

  • Return

    • JSVector2D : Returns the view size(width, height) of the frustum successfully.

    • null: Size return failed.

getId() → string

Returns the ID of the object.

  • Return

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

    • null: If the object is null.

setFovX(value) → boolean

Changes the field of view width of the frustum.

Name
Type
Description

value

number

Frustum width setting

  • Return

    • true: Setting successful.

    • false: Setting failed.

  • Sample

setFovY(value) → boolean

Changes the field of view height of the frustum.

Name
Type
Description

value

number

Frustum height setting

  • Return

    • true: Setting successful.

    • false: Setting failed.

  • Sample

Getter / Setter

getColor(), setColor(color) → JSColor

Changes the color of the frustum object.

Name
Type
Description

color

Frustum's visualization color.

  • Return

    • JSColor: Returns the color of the frustum successfully.

    • null: Color return failed.

  • Sample

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.

getPan(), setPan(pan) → number

Changes the Y-axis rotation value of the frustum.

Rotation information based on the pan input value: 0, 360 (north), 90 (east), 180 (south), 270 (west).

Name
Type
Description

pan

number

Frustum Y-axis rotation setting

  • Return

    • number: Y-axis rotation value.

  • Sample

getTilt(), setTilt(tilt) → number

Changes the X-axis rotation value of the frustum.

Rotation information based on the tilt input value: 0 (front), tilt<0 (top), tilt>0 (bottom).

Name
Type
Description

tilt

number

Frustum X-axis rotation setting

  • Return

    • number: X-axis rotation value.

  • Sample

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