Class NMLModel


public class NMLModel extends Billboard
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.
  • Constructor Details

    • NMLModel

      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.
    • NMLModel

      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.
    • NMLModel

      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.
  • Method Details

    • getRotationAngle

      public float getRotationAngle()
      Deprecated.
      Returns the rotation angle of this model. This is deprecated. Use getRotation instead.
      Returns:
      The rotation angle of this model in degrees.
    • setRotationAngle

      public void setRotationAngle(float angle)
      Deprecated.
      Sets the rotation angle of this model. This is deprecated. Use setRotation instead.
      Parameters:
      angle - The new rotation angle in degrees.
    • getRotationAxis

      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.
    • setRotationAxis

      public void setRotationAxis(MapVec axis)
      Sets the rotation axis of this model.
      Parameters:
      axis - The new axis of rotation.
    • setRotation

      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.
    • getScale

      public float getScale()
      Returns the scale of this model.
      Returns:
      model The relative scale.
    • setScale

      public void setScale(float scale)
      Sets the scale of this model. The default is 1.
      Parameters:
      scale - The relative scale of this model.
    • getStyle

      public NMLModelStyle getStyle()
      Returns the style of this object.
      Returns:
      The style that defines what this object looks like.
    • setStyle

      public void setStyle(NMLModelStyle style)
      Sets a style for this object.
      Parameters:
      style - The new style that defines what this object looks like.