public class

NMLModel

extends Billboard
java.lang.Object
   ↳ com.carto.vectorelements.VectorElement
     ↳ com.carto.vectorelements.Billboard
       ↳ com.carto.vectorelements.NMLModel

Class Overview

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.

Summary

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
From class com.carto.vectorelements.Billboard
From class com.carto.vectorelements.VectorElement
From class java.lang.Object

Public Constructors

public NMLModel (Billboard baseBillboard, NMLModelStyle style)

Constructs a NMLModel object with the specified style and attaches it to a billboard element.

Parameters
baseBillboard The billboard this model will be attached to.
style The style for this model.

public NMLModel (Geometry geometry, NMLModelStyle style)

Constructs a NMLModel object from a geometry object and a source model.

Parameters
geometry The geometry object that defines the location of this model.
style The style for this model.

public NMLModel (MapPos pos, NMLModelStyle style)

Constructs a NMLModel object from a map position and a source model.

Parameters
pos The map position that defines the location of this model.
style The style for this model.

Public Methods

public synchronized void delete ()

public float getRotationAngle ()

This method is deprecated.
No replacement.

Returns the rotation angle of this model. This is deprecated. Use getRotation instead.

Returns
  • The rotation angle of this model in degrees.

public MapVec getRotationAxis ()

Returns the rotation axis of this model. If rotation angle is 0, then the axis is irrelevant.

Returns
  • The rotation axis vector.

public float getScale ()

Returns the scale of this model.

Returns
  • model The relative scale.

public NMLModelStyle getStyle ()

Returns the style of this object.

Returns
  • The style that defines what this object looks like.

public void setRotation (MapVec axis, float angle)

Sets the rotation of this model using an axis and an angle.

Parameters
axis The axis of rotation.
angle The rotation angle in degrees.

public void setRotationAngle (float angle)

This method is deprecated.
No replacement.

Sets the rotation angle of this model. This is deprecated. Use setRotation instead.

Parameters
angle The new rotation angle in degrees.

public void setRotationAxis (MapVec axis)

Sets the rotation axis of this model.

Parameters
axis The new axis of rotation.

public void setScale (float scale)

Sets the scale of this model. The default is 1.

Parameters
scale The relative scale of this model.

public void setStyle (NMLModelStyle style)

Sets a style for this object.

Parameters
style The new style that defines what this object looks like.