jme3tools.navigation
クラス MapModel3D

java.lang.Object
  上位を拡張 jme3tools.navigation.MapModel3D

public class MapModel3D
extends java.lang.Object

A representation of the actual map in terms of lat/long and x,y,z co-ordinates. The Map class contains various helper methods such as methods for determining the world unit positions for lat/long coordinates and vice versa. This map projection does not handle screen/pixel coordinates.

導入されたバージョン:
1.0

フィールドの概要
static int DEFAULT_MAP_WIDTH_LONGITUDE
           
 
コンストラクタの概要
MapModel3D(int worldWidth)
          Constructor.
 
メソッドの概要
 void calculateMinutesPerWorldUnit(double mapWidthInLongitude)
          Calculates the number of minutes per pixels using a given map width in longitude.
 Position getCentre()
          Returns the Position centre of the map.
 Vector3f getCentreWu()
          Returns the WU (x,y,z) centre of the map.
 double getMetersPerWu()
          Returns the meters per WU.
 double getMinutesPerWu()
          Returns the number of minutes there are per WU.
 int getWorldHeight()
          Returns the height of the viewport in pixels.
 int getWorldWidth()
          Returns the width of the viewport in pixels.
 void setCentre(Position centre)
          Sets the map's centre.
 void setCentre(Vector3f posVec)
          Defines the centre of the map in pixels.
 void setWorldHeight(int viewportHeight)
          Sets the world's desired height.
 void setWorldWidth(int viewportWidth)
          Sets the world's desired width.
 Position toPosition(Vector3f posVec)
          Converts a world position into a Mercator position.
 Vector3f toWorldUnit(Position position)
          Converts a latitude/longitude position into a WU coordinate.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

DEFAULT_MAP_WIDTH_LONGITUDE

public static final int DEFAULT_MAP_WIDTH_LONGITUDE
関連項目:
定数フィールド値
コンストラクタの詳細

MapModel3D

public MapModel3D(int worldWidth)
Constructor.

パラメータ:
viewportWidth - The world unit width the map's area
導入されたバージョン:
1.0
メソッドの詳細

getWorldHeight

public int getWorldHeight()
Returns the height of the viewport in pixels.

戻り値:
The height of the viewport in pixels.
導入されたバージョン:
1.0

calculateMinutesPerWorldUnit

public void calculateMinutesPerWorldUnit(double mapWidthInLongitude)
Calculates the number of minutes per pixels using a given map width in longitude.

パラメータ:
mapWidthInLongitude - The map's with in degrees of longitude.
導入されたバージョン:
1.0

getWorldWidth

public int getWorldWidth()
Returns the width of the viewport in pixels.

戻り値:
The width of the viewport in pixels.
導入されたバージョン:
1.0

setWorldWidth

public void setWorldWidth(int viewportWidth)
Sets the world's desired width.

パラメータ:
viewportWidth - The world's desired width in WU.
導入されたバージョン:
1.0

setWorldHeight

public void setWorldHeight(int viewportHeight)
Sets the world's desired height.

パラメータ:
viewportHeight - The world's desired height in WU.
導入されたバージョン:
1.0

setCentre

public void setCentre(Position centre)
Sets the map's centre.

パラメータ:
centre - The Position denoting the map's desired centre.
導入されたバージョン:
1.0

getMinutesPerWu

public double getMinutesPerWu()
Returns the number of minutes there are per WU.

戻り値:
The number of minutes per WU.
導入されたバージョン:
1.0

getMetersPerWu

public double getMetersPerWu()
Returns the meters per WU.

戻り値:
The meters per WU.
導入されたバージョン:
1.0

toWorldUnit

public Vector3f toWorldUnit(Position position)
Converts a latitude/longitude position into a WU coordinate.

パラメータ:
position - The Position to convert.
戻り値:
The Point a pixel coordinate.
導入されたバージョン:
1.0

toPosition

public Position toPosition(Vector3f posVec)
Converts a world position into a Mercator position.

パラメータ:
p - Vector containing the world unit coordinates that are to be converted into longitude / latitude coordinates.
戻り値:
The resulting Position in degrees of latitude and longitude.
導入されたバージョン:
1.0

setCentre

public void setCentre(Vector3f posVec)
Defines the centre of the map in pixels.

パラメータ:
p - Vector3f object denoting the map's new centre.
導入されたバージョン:
1.0

getCentreWu

public Vector3f getCentreWu()
Returns the WU (x,y,z) centre of the map.

戻り値:
Vector3f object marking the map's (x,y) centre.
導入されたバージョン:
1.0

getCentre

public Position getCentre()
Returns the Position centre of the map.

戻り値:
Position object marking the map's (lat, long) centre.
導入されたバージョン:
1.0