Package com.massifmaps.vectorelements
Class NMLModel
java.lang.Object
com.massifmaps.vectorelements.VectorElement
com.massifmaps.vectorelements.Billboard
com.massifmaps.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.
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 Summary
ConstructorsConstructorDescriptionNMLModel(MapPos pos, NMLModelStyle style) Constructs a NMLModel object from a map position and a source model.NMLModel(Geometry geometry, NMLModelStyle style) Constructs a NMLModel object from a geometry object and a source model.NMLModel(Billboard baseBillboard, NMLModelStyle style) Constructs a NMLModel object with the specified style and attaches it to a billboard element. -
Method Summary
Modifier and TypeMethodDescriptionfloatDeprecated.Returns the rotation axis of this model.floatgetScale()Returns the scale of this model.getStyle()Returns the style of this object.voidsetRotation(MapVec axis, float angle) Sets the rotation of this model using an axis and an angle.voidsetRotationAngle(float angle) Deprecated.voidsetRotationAxis(MapVec axis) Sets the rotation axis of this model.voidsetScale(float scale) Sets the scale of this model.voidsetStyle(NMLModelStyle style) Sets a style for this object.Methods inherited from class com.massifmaps.vectorelements.Billboard
getBaseBillboard, getBounds, getGeometry, getRootGeometry, getRotation, setBaseBillboard, setGeometry, setPos, setRotationMethods inherited from class com.massifmaps.vectorelements.VectorElement
containsMetaDataKey, equals, getId, getMetaData, getMetaDataElement, hashCode, isVisible, notifyElementChanged, setId, setMetaData, setMetaDataElement, setVisible
-
Constructor Details
-
NMLModel
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
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
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
Returns the rotation axis of this model. If rotation angle is 0, then the axis is irrelevant.- Returns:
- The rotation axis vector.
-
setRotationAxis
Sets the rotation axis of this model.- Parameters:
axis- The new axis of rotation.
-
setRotation
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
Returns the style of this object.- Returns:
- The style that defines what this object looks like.
-
setStyle
Sets a style for this object.- Parameters:
style- The new style that defines what this object looks like.
-