congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IGraphicsGrid.getHeightAt
Code IndexAdd Tabnine to your IDE (free)

How to use
getHeightAt
method
in
jsettlers.common.map.IGraphicsGrid

Best Java code snippets using jsettlers.common.map.IGraphicsGrid.getHeightAt (Showing top 4 results out of 315)

origin: jsettlers/settlers-remake

public int getHeight(int x, int y) {
  if (x >= 0 && x < map.getWidth() && y >= 0 && y < map.getHeight()) {
    return map.getHeightAt(x, y);
  } else {
    return 0;
  }
}
origin: jsettlers/settlers-remake

int dheight = map.getHeightAt(centerX, mapMinY) - map.getHeightAt(centerX, Math.min(mapMinY + mapLineHeight, mapHeight - 1));
basecolor *= 1 + .15f * dheight;
origin: jsettlers/settlers-remake

/**
 * @param screenX
 *            The x coordinate in draw space
 * @param screenY
 *            The y coordinate in draw space.
 * @return The map position under the point.
 */
private ShortPoint2D getPositionUnder(float screenX, float screenY) {
  // do a three step iteration by using the coordinate transformation and the map height
  int mapX = getConverter().getMapX(screenX, screenY);
  int mapY = getConverter().getMapY(screenX, screenY);
  if (mapX < 0 || map.getWidth() <= mapX || mapY < 0 || map.getHeight() <= mapY) {
    return new ShortPoint2D(mapX, mapY);
  }
  float height = map.getHeightAt(mapX, mapY);
  mapX = (int) (getConverter().getExactMapXwithHeight(screenX, screenY, height) + 0.5);
  mapY = (int) (getConverter().getExactMapYwithHeight(screenX, screenY, height) + 0.5);
  height = map.getHeightAt(mapX, mapY);
  mapX = (int) (getConverter().getExactMapXwithHeight(screenX, screenY, height) + 0.5);
  mapY = (int) (getConverter().getExactMapYwithHeight(screenX, screenY, height) + 0.5);
  return new ShortPoint2D(mapX, mapY);
}
origin: jsettlers/settlers-remake

  return;
float height = context.getMap().getHeightAt(x, y);
EDirection direction = ship.getDirection();
EDirection shipImageDirection = direction.rotateRight(3); // ship images have a different direction numbering
jsettlers.common.mapIGraphicsGridgetHeightAt

Popular methods of IGraphicsGrid

  • getDebugColorAt
  • getHeight
  • getLandscapeTypeAt
  • getMapObjectsAt
    Gets the first map object that is placed on the given position. There may be more map objects that c
  • getMovableAt
  • getPartitionData
    Gets the current data and settings of the partition at the given position.
  • getPlayerIdAt
  • getVisibleStatus
  • getWidth
  • isBorder
  • isBuilding
    Returns true if the given position is covered by the blocked area of a building.
  • setBackgroundListener
    This method can be used to set a IGraphicsBackgroundListener to this IGraphicsGrid.
  • isBuilding,
  • setBackgroundListener

Popular in Java

  • Reading from database using SQL prepared statement
  • getApplicationContext (Context)
  • addToBackStack (FragmentTransaction)
  • notifyDataSetChanged (ArrayAdapter)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • JComboBox (javax.swing)
  • JTextField (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now