|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmr3d.debug.ErrorHandling
mr3d.SceneManager
The SceneManager is a fassade for the mr3d-engine. It is the interface between system and programmer. It gives access to all important system functionality necessary to produce 3-dimensional pictures.
SceneManager is a Singleton.
| Field Summary | |
static ObjectArray |
ALL
Object array managing all 3D-objects in the 3D-scene. |
private static int |
backClippingPlane
Back Clipping Plane. |
private boolean |
debugMode
Determines if the SceneManager is in debug mode.
|
private boolean |
errorBreak
Is true if error(s) have occured. |
private static int |
frontClippingPlane
Front Clipping Plane. |
private static SceneManager |
instance
Reference to the only instance of the class. |
private static int |
nrOfInstances
Stores the numbers of instances of SceneManager. |
static PointArrayTable |
PAT
Point array table object managing all the 3D-points needed for the 3D scene. |
static CentralProjectionCamera |
sceneCamera
Camera object for projecting the points to a view port. |
static Renderer |
sceneRenderer
sceneRenderer object for rendering a picture from the
projections the camera calculates. |
| Fields inherited from class mr3d.debug.ErrorHandling |
|
| Fields inherited from interface mr3d.debug.Debugable |
ERROR_INT, ERROR_STRING |
| Constructor Summary | |
private |
SceneManager()
Constructor of SceneManager. |
| Method Summary | |
static int |
backClippingPlane()
Returns the value of the frontClippingPlane. |
static void |
clearScene()
Deletes all data in the scene. |
int |
create3DObjectFromFile(java.lang.String fileName)
Loads an 3D object from a file and adds it into the object array. |
static SceneManager |
createInstance()
Creates one instance of the SceneManager. |
void |
drawScene(Graphics g)
Draws the whole scene to the specified Graphics objects. |
static int |
frontClippingPlane()
Returns the value of the frontClippingPlane. |
TriangleBased3DObject |
getObject(int OAI)
|
private boolean |
hasErrors()
Returns errorBreak variable. |
void |
setClippingPlanes(int frontClip,
int backClip)
Limits the view volume. |
void |
setDisplayDimensions(int screenwidth,
int screenheight)
Specifiies the screen dimensions. |
private void |
stopOnError()
Sets errorBreak to true. |
void |
toConsole()
Prints the contents of the object to the Java console. |
void |
toConsole(java.lang.String msgString)
Prints the contents of the object to the Java console together with an information string. |
void |
toggleDebugMode(boolean toogleDebug)
Activates or deactivates the debug mode. |
| Methods inherited from class mr3d.debug.ErrorHandling |
getErrMsg, notifyError |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static ObjectArray ALL
private static int backClippingPlane
private boolean debugMode
SceneManager is in debug mode.
In debug mode the system puts out additional debug info.
private boolean errorBreak
private static int frontClippingPlane
private static SceneManager instance
private static int nrOfInstances
public static PointArrayTable PAT
public static CentralProjectionCamera sceneCamera
public static Renderer sceneRenderer
sceneRenderer object for rendering a picture from the
projections the camera calculates.
| Constructor Detail |
private SceneManager()
SceneManager. It is
private because SceneManager is
a Singleton.
| Method Detail |
public static int backClippingPlane()
frontClippingPlane.
frontClippingPlanepublic static void clearScene()
public int create3DObjectFromFile(java.lang.String fileName)
throws java.io.IOException
fileName - name and path of the file
java.io.IOExceptionpublic static SceneManager createInstance()
public void drawScene(Graphics g)
Graphics objects.
g - the Graphics object the scene should be written onpublic static int frontClippingPlane()
frontClippingPlane.
frontClippingPlanepublic TriangleBased3DObject getObject(int OAI)
private boolean hasErrors()
errorBreak variable. This method returns
true if errors have occured while processing the
file.
errorBreak variable
public void setClippingPlanes(int frontClip,
int backClip)
backClippingPlane
the object becomes invisible. If the z-coordinate of any object's
point is greater than the value stored in
frontClippingPlane the objects also becomes invisible.
To avoid graphic errors in the drawing process you have to make sure
the follwong rules apply.
The value for frontClippingPlane must be greater than
the value n backClippingPlane. The value
frontClippingPlane must not exceed or be equal to the
value viewPlaneDistance.
public void setDisplayDimensions(int screenwidth,
int screenheight)
screenwidth - width of the screen in pixelsscreenheight - height of the screen in pixelsprivate void stopOnError()
errorBreak to true. This method is called when
an error has occured.
public void toConsole()
Debugable
toConsole in interface Debugablepublic void toConsole(java.lang.String msgString)
Debugable
toConsole in interface Debugablepublic void toggleDebugMode(boolean toogleDebug)
toogleDebug - if true debug mode is On,
if false debug mode is Off
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||