View Javadoc

1   package erland.game.tileadventure;
2   
3   import erland.game.BlockContainerInterface;
4   
5   import java.awt.*;
6   
7   /*
8    * Copyright (C) 2004 Erland Isaksson (erland_i@hotmail.com)
9    *
10   * This program is free software; you can redistribute it and/or
11   * modify it under the terms of the GNU General Public License
12   * as published by the Free Software Foundation; either version 2
13   * of the License, or (at your option) any later version.
14   *
15   * This program is distributed in the hope that it will be useful,
16   * but WITHOUT ANY WARRANTY; without even the implied warranty of
17   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18   * GNU General Public License for more details.
19   *
20   * You should have received a copy of the GNU General Public License
21   * along with this program; if not, write to the Free Software
22   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23   *
24   */
25  
26  public interface IrregularBlockContainerInterface {
27  
28      //Size3D getSize();
29  
30      int getSizeX();
31  
32      int getSizeY();
33  
34      int getSizeZ();
35  
36      //Size3D getSquareSize();
37  
38      int getSquareSizeX();
39  
40      int getSquareSizeY();
41  
42      int getSquareSizeZ();
43  
44      //Size2D getOffset();
45      int getOffsetX();
46  
47      int getOffsetY();
48  
49      //Point getDrawingPosition(Point3D p);
50  
51      int getDrawingPositionX(float x, float y, float z);
52  
53      int getDrawingPositionY(float x, float y, float z);
54  
55      //Point getPosition(Point3D p);
56  
57      int getPositionX(float x, float y, float z);
58  
59      int getPositionY(float x, float y, float z);
60  
61      int getDrawingSizeX();
62  
63      int getDrawingSizeY();
64  
65      boolean getVisible(float posX, float posY, float posZ);
66  
67      int getScrollingSizeX();
68  
69      int getScrollingSizeY();
70  
71      int getPixelDrawingPositionX(float x, float y, float z);
72  
73      int getPixelDrawingPositionY(float x, float y, float z);
74  
75      int getScrollingOffsetX();
76  
77      int getScrollingOffsetY();
78  
79      /***
80       * Get the x block coordinate for a specific pixel drawing coordinate.
81       * The scrollling offset is used when calculating the block coordinate
82       * @param x The x pixel coordinate
83       * @param y The y pixel coordinate
84       * @param z THe z pixel coordinate
85       * @return The x block cordinate
86       */
87      int getBlockPositionX(int x, int y, int z);
88  
89      /***
90       * Get the y block coordinate for a specific pixel drawing coordinate
91       * The scrollling offset is used when calculating the block coordinate
92       * @param x The x pixel coordinate
93       * @param y The y pixel coordinate
94       * @param z The z pixel coordinate
95       * @return The y block cordinate
96       */
97      int getBlockPositionY(int x, int y, int z);
98  }