crystalspace.jbind.impl.cstool.csview
Class csView

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.cstool.csview.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(iEngine engine, iGraphics3D g3d)
           
 
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.
static java.lang.Class getInterfaceClass()
           
static java.lang.String getInterfaceName()
           
static int getInterfaceVersion()
           
 java.lang.String getName()
          Return the name of the interface
 int getVersion()
          Return the version of the interface
static void initSCF()
           
protected  boolean isNativePointerValidSafe(long nPointer)
           
protected  void nDelete(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)
          Set engine handle.
 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, 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.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(iEngine engine,
              iGraphics3D g3d)
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

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

getCamera

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

Specified by:
getCamera in interface iView
Returns:
iCamera

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 -

getInterfaceVersion

public static int getInterfaceVersion()

getInterfaceName

public static java.lang.String getInterfaceName()

getInterfaceClass

public static java.lang.Class getInterfaceClass()

initSCF

public static void initSCF()

draw

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

Specified by:
draw in interface iView

isNativePointerValidSafe

protected boolean isNativePointerValidSafe(long nPointer)
Specified by:
isNativePointerValidSafe in class csNativeObject

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)

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()

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()

getContext

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

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

getEngine

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

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

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()

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)

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)

setEngine

public void setEngine(iEngine e)
Description copied from interface: iView
Set engine handle.

Specified by:
setEngine in interface iView
Parameters:
e -
See Also:
crystalspace.jbind.interfaces.ivaria.view.iView#SetEngine(crystalspace.jbind.interfaces.iengine.engine.iEngine)

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()

nDelete

protected void nDelete(long pointer)
Overrides:
nDelete in class csBase
See Also:
csNativeObject.nDelete(long)