Modifier and Type | Class and Description |
---|---|
static class |
Model.Triangle
Triangles used to form a 3D object.
|
Constructor and Description |
---|
Model(Coordinate position,
float heading,
Model.Triangle[] triangles,
int color)
Creates a 3D object using the provided
Model.Triangle objects and sets it to the requested coordinate and
heading. |
Model(Coordinate position,
Model.Triangle[] triangles,
int color)
Creates a 3D object using the provided
Model.Triangle objects and sets it's position to the requested coordinate. |
Model(Model.Triangle[] triangles,
int color)
Creates a 3D object using the provided
Model.Triangle objects. |
Model(Vector3 position,
float heading,
Model.Triangle[] triangles,
int color)
Creates a 3D object using the provided
Model.Triangle objects and sets it to requested position and
heading. |
Model(Vector3 position,
Model.Triangle[] triangles,
int color)
Creates a 3D object using the provided
Model.Triangle objects and sets it to the requested position. |
Modifier and Type | Method and Description |
---|---|
com.mappedin.sdk.FocusPoints |
getPoints()
Returns a focusable object's 3D points
|
Vector3 |
getPosition()
Returns model's current center position
|
void |
set(Coordinate newPosition,
java.lang.Float heading,
java.lang.Integer color,
float over)
Set model's center and map to new Position (potentially on a new map) with the new heading
value and color.
|
void |
set(Vector3 newPosition,
java.lang.Float heading,
java.lang.Integer color,
float over)
Set model's center to a new position with the new heading value.
|
void |
setColor(int color,
float over)
Set tne model's color over time
|
void |
setHeading(float heading,
float over)
Rotates the model to a new heading over time.
|
void |
setPosition(Coordinate newPosition,
float over)
Moves the model to a new position (potentially on a new map) over time
|
void |
setPosition(Vector3 newPosition,
float over)
Moves the model to a new position (shows up on all maps) over time
|
public Model(Model.Triangle[] triangles, int color)
Model.Triangle
objects. It shows in all maps, pointing North,
located at 3D point x=0, y=0, z=0.
Model.Triangle triangle1 = new Model.Triangle(
new Vector3(0, 1, 3.21f), new Vector3(-1, -1, 3.21f), new Vector3(0, 0, 3.21f));
Model.Triangle triangle2 = new Model.Triangle(
new Vector3(0, 1, 3.21f), new Vector3(0, 0, 3.21f), new Vector3(1, -1, 3.21f));
Model.Triangle[] triangles = {triangle1, triangle2};
arrow = new Model(triangles, Color.RED);
mapView.addElement(arrow);
triangles
- array of Model.Triangle
color
- android.graphics.Color
public Model(Coordinate position, Model.Triangle[] triangles, int color)
Model.Triangle
objects and sets it's position to the requested coordinate. It only
shows on the requested coordinate's map, pointing North. position
- 3D object's center location and map Coordinate
triangles
- array of Model.Triangle
color
- android.graphics.Color
public Model(Vector3 position, Model.Triangle[] triangles, int color)
Model.Triangle
objects and sets it to the requested position. It
shows on all maps, pointing North. position
- 3D object's center location Vector3
triangles
- array of Model.Triangle
color
- android.graphics.Color
public Model(Coordinate position, float heading, Model.Triangle[] triangles, int color)
Model.Triangle
objects and sets it to the requested coordinate and
heading. It only shows on the requested coordinate's map.position
- 3D object's center location and map Coordinate
heading
- 3D object's heading angle in radiantriangles
- array of Model.Triangle
color
- android.graphics.Color
public Model(Vector3 position, float heading, Model.Triangle[] triangles, int color)
Model.Triangle
objects and sets it to requested position and
heading. It shows on all maps.position
- 3D object's center location Vector3
heading
- 3D object's heading angle in radiantriangles
- array of Model.Triangle
color
- android.graphics.Color
public void set(Coordinate newPosition, java.lang.Float heading, java.lang.Integer color, float over)
newPosition
- Coordinate
heading
- 3D object's new heading angle in radiancolor
- android.graphics.Color
over
- animation time in seconds.public void set(Vector3 newPosition, java.lang.Float heading, java.lang.Integer color, float over)
newPosition
- Vector3
heading
- 3D object's new heading angle in radiancolor
- android.graphics.Color
over
- period of time in seconds.public void setPosition(Coordinate newPosition, float over)
newPosition
- Coordinate
over
- period of time.public void setPosition(Vector3 newPosition, float over)
newPosition
- Vector3
over
- period of time.public void setHeading(float heading, float over)
heading
- 3D object's new heading angle in radianover
- period of time.public void setColor(int color, float over)
color
- android.graphics.Color
over
- period of time.public Vector3 getPosition()
Vector3
public com.mappedin.sdk.FocusPoints getPoints()
Focusable