PageRenderTime 32ms CodeModel.GetById 23ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/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 ***********************************************************************/
18package org.mt4j.util.camera;
19
20import org.mt4j.util.math.Vector3D;
21
22/**
23 * The Interface IFrustum.
24 * @author Christopher Ruff
25 */
26public interface IFrustum {
27	
28	/** The Constant OUTSIDE. */
29	public static final int OUTSIDE 	= 0;
30	
31	/** The Constant INTERSECT. */
32	public static final int INTERSECT 	= 1;
33	
34	/** The Constant INSIDE. */
35	public static final int INSIDE 		= 2;
36	
37	/**
38	 * Checks if sphere is in frustum.
39	 * 
40	 * @param p the p
41	 * @param radius the radius
42	 * 
43	 * @return the int
44	 */
45	public int isSphereInFrustum(Vector3D p, float radius);
46	
47	/**
48	 * Checks if point is in frustum.
49	 * 
50	 * @param p the p
51	 * 
52	 * @return the int
53	 */
54	public int isPointInFrustum(Vector3D p) ;
55	
56	/**
57	 * Returns the height of the near plane
58	 * @return the float
59	 */
60	public float getHeightOfNearPlane();
61	
62	/**
63	 * Returns the width of the near plane
64	 * @return the float
65	 */
66	public float getWidthOfNearPlane();
67	
68	/**
69	 * Returns the top left point of the near plane
70	 * @return the Vector3D
71	 */
72	public Vector3D getNearTopLeft();
73	
74	/**
75	 * Returns the width of the plane at a specific z value
76	 * @return the float
77	 */
78	public float getWidthOfPlane(float z);
79	
80	/**
81	 * Returns the height of the plane at a specific z value
82	 * @return the float
83	 */
84	public float getHeightOfPlane(float z);
85	
86	/**
87	 * Returns the z value of the near plane
88	 * @return the float
89	 */
90	public float getZValueOfNearPlane();
91	
92
93}