Class MapMarker3DModel
Class MapMarker3DModel
- java.lang.Object
-
- com.here.NativeBase
-
- com.here.sdk.mapview.MapMarker3DModel
-
public final class MapMarker3DModel extends NativeBase
Represents a 3D model that can be used by a
MapMarker3Dto 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 viaMeshBuilder.1. Creating
MapMarker3DModelfrom OBJ fileFor 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
MapMarker3DModelprogramaticallyA 3D mesh can be specified programatically using
MeshBuilderand passed toMapMarker3DModelconstructor. 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 toMapMarker3DModelconstructor.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMapMarker3DModel.InstantiationErrorCodeIndicates the reason for a failure to createMapMarker3DModel.static classMapMarker3DModel.InstantiationExceptionThrown when a problem occurs while trying to createMapMarker3DModel.
-
Constructor Summary
Constructors Constructor Description MapMarker3DModel(Mesh mesh)Creates a new 3D model from a mesh.MapMarker3DModel(Mesh mesh, java.lang.String textureFilePath)Creates a new 3D model from mesh and texture.MapMarker3DModel(Mesh mesh, java.lang.String textureFilePath, Color color)Creates a new 3D model from mesh, texture and color.MapMarker3DModel(java.lang.String geometryFilePath)Creates a new 3D model from path to .obj file.MapMarker3DModel(java.lang.String geometryFilePath, java.lang.String textureFilePath)Creates a new 3D model from path to .obj file and texture.MapMarker3DModel(java.lang.String geometryFilePath, java.lang.String textureFilePath, Color color)Creates a new 3D model from path to .obj file, texture and color.
-
-
-
Constructor Detail
-
MapMarker3DModel
public MapMarker3DModel(@NonNull java.lang.String geometryFilePath, @NonNull java.lang.String textureFilePath, @NonNull Color color)Creates a new 3D model from path to .obj file, texture and color.
- Parameters:
geometryFilePath-Absolute path to obj file.
textureFilePath-Absolute path to texture file.
color-Color to be blend with texture. This color is multiplied with color of texture.
-
MapMarker3DModel
public MapMarker3DModel(@NonNull Mesh mesh, @NonNull java.lang.String textureFilePath, @NonNull Color color) throws MapMarker3DModel.InstantiationExceptionCreates a new 3D model from mesh, texture and color.
- Parameters:
mesh-Mesh containing the 3d geometry together with texture coordinates.
textureFilePath-Absolute path to texture file.
color-Color to be blend with texture. This color is multiplied with color of texture.
- Throws:
MapMarker3DModel.InstantiationException-Indicates what went wrong when the instantiation was attempted.
-
MapMarker3DModel
public MapMarker3DModel(@NonNull java.lang.String geometryFilePath, @NonNull java.lang.String textureFilePath)Creates a new 3D model from path to .obj file and texture.
- Parameters:
geometryFilePath-Absolute path to obj file.
textureFilePath-Absolute path to texture file.
-
MapMarker3DModel
public MapMarker3DModel(@NonNull Mesh mesh, @NonNull java.lang.String textureFilePath) throws MapMarker3DModel.InstantiationExceptionCreates a new 3D model from mesh and texture.
- Parameters:
mesh-Mesh containing the 3d geometry together with texture coordinates.
textureFilePath-Absolute path to texture file.
- Throws:
MapMarker3DModel.InstantiationException-Indicates what went wrong when the instantiation was attempted.
-
MapMarker3DModel
public MapMarker3DModel(@NonNull java.lang.String geometryFilePath)Creates a new 3D model from path to .obj file.
- Parameters:
geometryFilePath-Absolute path to obj file.
-
MapMarker3DModel
public MapMarker3DModel(@NonNull Mesh mesh)Creates a new 3D model from a mesh.
- Parameters:
mesh-Mesh containing the 3d geometry 3D data.
-
-