java.lang.Object | |||
↳ | com.carto.vectorelements.VectorElement | ||
↳ | com.carto.vectorelements.Billboard | ||
↳ | com.carto.vectorelements.NMLModel |
A 3D model that can be displayed on the map.
NML models can be created from Collada files directly and placed anywhere on the map or converted from KMZ files.
NML models are optimized for fast loading and rendering.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
NMLModel(Billboard baseBillboard, NMLModelStyle style)
Constructs a NMLModel object with the specified style and attaches it to a billboard element.
| |||||||||||
NMLModel(Geometry geometry, NMLModelStyle style)
Constructs a NMLModel object from a geometry object and a source model.
| |||||||||||
NMLModel(MapPos pos, NMLModelStyle style)
Constructs a NMLModel object from a map position and a source model.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
synchronized void | delete() | ||||||||||
float |
getRotationAngle()
This method is deprecated.
No replacement.
| ||||||||||
MapVec |
getRotationAxis()
Returns the rotation axis of this model.
| ||||||||||
float |
getScale()
Returns the scale of this model.
| ||||||||||
NMLModelStyle |
getStyle()
Returns the style of this object.
| ||||||||||
void |
setRotation(MapVec axis, float angle)
Sets the rotation of this model using an axis and an angle.
| ||||||||||
void |
setRotationAngle(float angle)
This method is deprecated.
No replacement.
| ||||||||||
void |
setRotationAxis(MapVec axis)
Sets the rotation axis of this model.
| ||||||||||
void |
setScale(float scale)
Sets the scale of this model.
| ||||||||||
void |
setStyle(NMLModelStyle style)
Sets a style for this object.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructs a NMLModel object with the specified style and attaches it to a billboard element.
baseBillboard | The billboard this model will be attached to. |
---|---|
style | The style for this model. |
Constructs a NMLModel object from a geometry object and a source model.
geometry | The geometry object that defines the location of this model. |
---|---|
style | The style for this model. |
Constructs a NMLModel object from a map position and a source model.
pos | The map position that defines the location of this model. |
---|---|
style | The style for this model. |
This method is deprecated.
No replacement.
Returns the rotation angle of this model. This is deprecated. Use getRotation instead.
Returns the rotation axis of this model. If rotation angle is 0, then the axis is irrelevant.
Returns the scale of this model.
Returns the style of this object.
Sets the rotation of this model using an axis and an angle.
axis | The axis of rotation. |
---|---|
angle | The rotation angle in degrees. |
This method is deprecated.
No replacement.
Sets the rotation angle of this model. This is deprecated. Use setRotation instead.
angle | The new rotation angle in degrees. |
---|
Sets the rotation axis of this model.
axis | The new axis of rotation. |
---|
Sets the scale of this model. The default is 1.
scale | The relative scale of this model. |
---|
Sets a style for this object.
style | The new style that defines what this object looks like. |
---|