/src/org/mt4j/util/camera/IFrustum.java

http://mt4j.googlecode.com/ · Java · 93 lines · 15 code · 15 blank · 63 comment · 0 complexity · e52df822c19164b40eac530a6f940a5a MD5 · raw file

  1. /***********************************************************************
  2. * mt4j Copyright (c) 2008 - 2009 C.Ruff, Fraunhofer-Gesellschaft All rights reserved.
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. *
  17. ***********************************************************************/
  18. package org.mt4j.util.camera;
  19. import org.mt4j.util.math.Vector3D;
  20. /**
  21. * The Interface IFrustum.
  22. * @author Christopher Ruff
  23. */
  24. public interface IFrustum {
  25. /** The Constant OUTSIDE. */
  26. public static final int OUTSIDE = 0;
  27. /** The Constant INTERSECT. */
  28. public static final int INTERSECT = 1;
  29. /** The Constant INSIDE. */
  30. public static final int INSIDE = 2;
  31. /**
  32. * Checks if sphere is in frustum.
  33. *
  34. * @param p the p
  35. * @param radius the radius
  36. *
  37. * @return the int
  38. */
  39. public int isSphereInFrustum(Vector3D p, float radius);
  40. /**
  41. * Checks if point is in frustum.
  42. *
  43. * @param p the p
  44. *
  45. * @return the int
  46. */
  47. public int isPointInFrustum(Vector3D p) ;
  48. /**
  49. * Returns the height of the near plane
  50. * @return the float
  51. */
  52. public float getHeightOfNearPlane();
  53. /**
  54. * Returns the width of the near plane
  55. * @return the float
  56. */
  57. public float getWidthOfNearPlane();
  58. /**
  59. * Returns the top left point of the near plane
  60. * @return the Vector3D
  61. */
  62. public Vector3D getNearTopLeft();
  63. /**
  64. * Returns the width of the plane at a specific z value
  65. * @return the float
  66. */
  67. public float getWidthOfPlane(float z);
  68. /**
  69. * Returns the height of the plane at a specific z value
  70. * @return the float
  71. */
  72. public float getHeightOfPlane(float z);
  73. /**
  74. * Returns the z value of the near plane
  75. * @return the float
  76. */
  77. public float getZValueOfNearPlane();
  78. }