crystalspace.jbind.impl.varia.view
Class csView

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.varia.view.csView
All Implemented Interfaces:
iBase, iPointer, iView

public class csView
extends csBase
implements iView

Author:
Quentin Anciaux

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csView(iPointer nPointer)
           
 
Method Summary
 void addViewVertex(int x, int y)
          Add a vertex to clipping polygon (non-rectangular clipping).
 void clearView()
          Clear clipper in order to start building a polygon-based clipper.
 void draw()
          Draw 3D world as seen from the camera.
 iCamera getCamera()
          Get current camera.
 iClipper2D getClipper()
          Return the current clipper.
 iGraphics3D getContext()
          Get Context.
 iEngine getEngine()
          Get engine handle.
 java.lang.String getName()
          Return the name of the interface
 int getVersion()
          Return the version of the interface
protected  boolean isNativePointerValidSafe(long pointer)
           
 void restrictClipperToScreen()
          Clip the view clipper to the screen boundaries.
 void setCamera(iCamera c)
          Set current camera.
 void setContext(iGraphics3D ig3d)
          Set Context.
 void SetEngine(iEngine e)
           
 void setRectangle(int x, int y, int w, int h)
          Set clipping rectangle.
 void updateClipper()
          Update the Clipper.
 
Methods inherited from class crystalspace.jbind.impl.csutil.scf.csBase
decRef, equals, finalize, getRefCount, incRef, nDelete, queryInterface, queryInterfaceSafe
 
Methods inherited from class crystalspace.jbind.impl.csNativeObject
changePointer, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, newNativeObject, setMemoryOwner, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface crystalspace.jbind.interfaces.ivaria.view.iView
setEngine
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getRefCount, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Constructor Detail

csView

public csView(iPointer nPointer)
Parameters:
nPointer -
Method Detail

getVersion

public int getVersion()
Description copied from interface: iBase
Return the version of the interface

Specified by:
getVersion in interface iBase
Specified by:
getVersion in class csBase
See Also:
iBase.getVersion()

getName

public java.lang.String getName()
Description copied from interface: iBase
Return the name of the interface

Specified by:
getName in interface iBase
Specified by:
getName in class csBase
See Also:
iBase.getName()

isNativePointerValidSafe

protected boolean isNativePointerValidSafe(long pointer)
Specified by:
isNativePointerValidSafe in class csNativeObject
See Also:
csNativeObject.isNativePointerValidSafe(long)

getEngine

public iEngine getEngine()
Description copied from interface: iView
Get engine handle.

Specified by:
getEngine in interface iView
Returns:
iEngine
See Also:
iView.getEngine()

SetEngine

public void SetEngine(iEngine e)
See Also:
crystalspace.jbind.interfaces.ivaria.view.iView#SetEngine(crystalspace.jbind.interfaces.iengine.engine.iEngine)

getCamera

public iCamera getCamera()
Description copied from interface: iView
Get current camera.

Specified by:
getCamera in interface iView
Returns:
iCamera
See Also:
iView.getCamera()

setCamera

public void setCamera(iCamera c)
Description copied from interface: iView
Set current camera.

Specified by:
setCamera in interface iView
Parameters:
c -
See Also:
iView.setCamera(crystalspace.jbind.interfaces.iengine.camera.iCamera)

getContext

public iGraphics3D getContext()
Description copied from interface: iView
Get Context.

Specified by:
getContext in interface iView
Returns:
iGraphics3D
See Also:
iView.getContext()

setContext

public void setContext(iGraphics3D ig3d)
Description copied from interface: iView
Set Context.

Specified by:
setContext in interface iView
Parameters:
ig3d -
See Also:
iView.setContext(crystalspace.jbind.interfaces.ivideo.graph3d.iGraphics3D)

setRectangle

public void setRectangle(int x,
                         int y,
                         int w,
                         int h)
Description copied from interface: iView
Set clipping rectangle.

Specified by:
setRectangle in interface iView
Parameters:
x -
y -
w -
h -
See Also:
iView.setRectangle(int, int, int, int)

clearView

public void clearView()
Description copied from interface: iView
Clear clipper in order to start building a polygon-based clipper.

Specified by:
clearView in interface iView
See Also:
iView.clearView()

addViewVertex

public void addViewVertex(int x,
                          int y)
Description copied from interface: iView
Add a vertex to clipping polygon (non-rectangular clipping).

Specified by:
addViewVertex in interface iView
Parameters:
x -
y -
See Also:
iView.addViewVertex(int, int)

restrictClipperToScreen

public void restrictClipperToScreen()
Description copied from interface: iView
Clip the view clipper to the screen boundaries.

Specified by:
restrictClipperToScreen in interface iView
See Also:
iView.restrictClipperToScreen()

updateClipper

public void updateClipper()
Description copied from interface: iView
Update the Clipper. This is usually called from Draw.

Specified by:
updateClipper in interface iView
See Also:
iView.updateClipper()

getClipper

public iClipper2D getClipper()
Description copied from interface: iView
Return the current clipper. This function may call UpdateClipper ().

Specified by:
getClipper in interface iView
Returns:
iClipper2D
See Also:
iView.getClipper()

draw

public void draw()
Description copied from interface: iView
Draw 3D world as seen from the camera.

Specified by:
draw in interface iView
See Also:
iView.draw()