MapMarker3DModel class abstract

Represents a 3D model that can be used by a MapMarker3D to be shown on the map.

Geometry of 3D marker can be provided in form of a Wavefront OBJ file as specified in http://www.martinreddy.net/gfx/3d/OBJ.spec or as mesh built via MeshBuilder.

1. Creating MapMarker3DModel from OBJ file

For OBJ files, HERE SDK only supports the following set of features of the OBJ specification:

  • Triangle Meshes
  • Following vertex attributes must be present:
    • Vertex Position
    • Vertex Normal
    • Texture Coordinates
    • Geometry must be indexed (contain an Index Buffer)
    • Face element

HERE SDK does not support:

  • Multi Texturing
  • Materials (mtllib [external .mtl file name] )
    • Lines
    • Higher Order Surfaces
    • Vendor specific extensions

For supported texture formats, HERE SDK allows the following formats to be specified: JPG, PNG, GPU compressed texture formats: ECT1 (OpenGL only), YUV, ASTC, KTX.

2. Creating MapMarker3DModel programatically

A 3D mesh can be specified programatically using MeshBuilder and passed to MapMarker3DModel constructor. This method supports creating a mesh from quads and triangles. Textured geometry is also supported, the mesh faces need to have texture coordinates and a texture file needs to be passed along with the mesh to MapMarker3DModel constructor.

Constructors

MapMarker3DModel(String geometryFilePath)
Creates a new 3D model from path to .obj file.
factory
MapMarker3DModel.fromMesh(Mesh mesh)
Creates a new 3D model from a mesh.
factory
MapMarker3DModel.fromMeshWithTextureFilePath(Mesh mesh, String textureFilePath)
Creates a new 3D model from mesh and texture.
factory
MapMarker3DModel.fromMeshWithTextureFilePathAndColor(Mesh mesh, String textureFilePath, Color color)
Creates a new 3D model from mesh, texture and color.
factory
MapMarker3DModel.withTextureFilePath(String geometryFilePath, String textureFilePath)
Creates a new 3D model from path to .obj file and texture.
factory
MapMarker3DModel.withTextureFilePathAndColor(String geometryFilePath, String textureFilePath, Color color)
Creates a new 3D model from path to .obj file, texture and color.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited