Constructor
new GeoObject(options)
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | IGeoObjectParams | Geo object parameters: Properties
|
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
- Type:
- Vec3
getLocalPosition() → {Vec3}
Gets local offset position.
- Type:
- Vec3
getOpacity() → {number}
Gets the opacity of the geo object.
- Type:
- number
getPosition() → {Vec3}
Gets the position of the geo object.
- Type:
- Vec3
getRotation() → {Quat}
Returns orientation quaternion.
- Type:
- Quat
getScale() → {Vec3}
Gets scale.
- Type:
- Vec3
getVisibility() → {boolean}
Returns geo object visibility.
- Type:
- boolean
remove()
Removes the geo object from the handler.
setColor(r, g, b, aopt)
Sets the color of the geo object.
| Name | Type | Attributes | Description |
|---|---|---|---|
r | number | Red component. | |
g | number | Green component. | |
b | number | Blue component. | |
a | number | <optional> | Alpha component. |
setColor4v(color)
Sets color.
setColorHTML(color)
Sets object HTML color.
| Name | Type | Description |
|---|---|---|
color | string |
setLocalPosition3v(localPosition)
Sets local offset position.
| Name | Type | Description |
|---|---|---|
localPosition | Vec3 |
setObject(object)
Sets Object3d for the object
| Name | Type | Description |
|---|---|---|
object | Object3d |
setObjectSrc(src)
Sets the object url source.
| Name | Type | Description |
|---|---|---|
src | string |
setOpacity(a)
Sets the opacity of the geo object.
| Name | Type | Description |
|---|---|---|
a | number | Opacity value (0 to 1). |
setPickingColor3v(color)
Sets billboard picking color.
| Name | Type | Description |
|---|---|---|
color | Vec3 | Picking color. |
setPosition(x, y, z)
Sets geo object position.
| Name | Type | Description |
|---|---|---|
x | number | X coordinate. |
y | number | Y coordinate. |
z | number | Z coordinate. |
setPosition3v(position)
Sets geo object position.
| Name | Type | Description |
|---|---|---|
position | Vec3 | Cartesian coordinates. |
setRotation(qRot)
Sets the rotation quaternion.
| Name | Type | Description |
|---|---|---|
qRot | Quat | Rotation quaternion. |
setScale(scale)
Sets scales.
| Name | Type | Description |
|---|---|---|
scale | number |
setScale3v(scale)
Sets X, Y, Z axis scales
| Name | Type | Description |
|---|---|---|
scale | Vec3 |
setVisibility(visibility)
Sets geo object visibility.
| Name | Type | Description |
|---|---|---|
visibility | boolean | Visibility flag. |
updateRotation()
Update object rotation