GeoObject

Represents 3D object on the the globe or 3d space

Constructor

new GeoObject(options)

Parameters:
NameTypeDescription
optionsIGeoObjectParams

Geo object parameters:

Properties
NameTypeAttributesDefaultDescription
object3dObject3d<optional>

3D object associated with the geo object.

objSrcstring<optional>

Source url of the 3D object.

tagstring<optional>

Unique instancing drawing identifier tag.

positionVec3 | NumberArray3<optional>

Position in Cartesian coordinates.

scalenumber | Vec3 | NumberArray3<optional>
1

Scale of the object.

translateVec3 | NumberArray3<optional>

Translation offset.

colorVec4 | NumberArray4 | string<optional>

RGBA color or HTML color string.

visibilityboolean<optional>
true

Visibility flag.

Members

indices

Gets geometry mesh indices.

normals

Gets geometry mesh normals.

object3d

Gets the 3D object associated with this geo object.

tag

Gets the unique tag of the geo object.

texCoords

Gets geometry mesh texture coordinates.

vertices

Gets geometry mesh vertices.

Methods

getDirection() → {Vec3}

Returns object direction

Returns:
Type: 
Vec3

getLocalPosition() → {Vec3}

Gets local offset position.

Returns:
Type: 
Vec3

getOpacity() → {number}

Gets the opacity of the geo object.

Returns:
Type: 
number

getPosition() → {Vec3}

Gets the position of the geo object.

Returns:
Type: 
Vec3

getRotation() → {Quat}

Returns orientation quaternion.

Returns:
Type: 
Quat

getScale() → {Vec3}

Gets scale.

Returns:
Type: 
Vec3

getVisibility() → {boolean}

Returns geo object visibility.

Returns:
Type: 
boolean

remove()

Removes the geo object from the handler.

setColor(r, g, b, aopt)

Sets the color of the geo object.

Parameters:
NameTypeAttributesDescription
rnumber

Red component.

gnumber

Green component.

bnumber

Blue component.

anumber<optional>

Alpha component.

setColor4v(color)

Sets color.

Parameters:
NameTypeDescription
colorVec3 | Vec4

RGBA vector.

setColorHTML(color)

Sets object HTML color.

Parameters:
NameTypeDescription
colorstring

setLocalPosition3v(localPosition)

Sets local offset position.

Parameters:
NameTypeDescription
localPositionVec3

setObject(object)

Sets Object3d for the object

Parameters:
NameTypeDescription
objectObject3d

setObjectSrc(src)

Sets the object url source.

Parameters:
NameTypeDescription
srcstring

setOpacity(a)

Sets the opacity of the geo object.

Parameters:
NameTypeDescription
anumber

Opacity value (0 to 1).

setPickingColor3v(color)

Sets billboard picking color.

Parameters:
NameTypeDescription
colorVec3

Picking color.

setPosition(x, y, z)

Sets geo object position.

Parameters:
NameTypeDescription
xnumber

X coordinate.

ynumber

Y coordinate.

znumber

Z coordinate.

setPosition3v(position)

Sets geo object position.

Parameters:
NameTypeDescription
positionVec3

Cartesian coordinates.

setRotation(qRot)

Sets the rotation quaternion.

Parameters:
NameTypeDescription
qRotQuat

Rotation quaternion.

setScale(scale)

Sets scales.

Parameters:
NameTypeDescription
scalenumber

setScale3v(scale)

Sets X, Y, Z axis scales

Parameters:
NameTypeDescription
scaleVec3

setVisibility(visibility)

Sets geo object visibility.

Parameters:
NameTypeDescription
visibilityboolean

Visibility flag.

updateRotation()

Update object rotation