crystalspace.jbind.impl.csgeom.polymesh
Class csPolygonMesh

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.csgeom.polymesh.csPolygonMesh
All Implemented Interfaces:
iBase, iPointer, iPolygonMesh

public class csPolygonMesh
extends csBase
implements iPolygonMesh

Author:
Quentin Anciaux

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csPolygonMesh(iPointer nPointer)
           
 
Method Summary
 int getChangeNumber()
          When this number changes you know the polygon mesh has changed (deformation has occured); since the last time you got another number from this function.
 csFlags getFlags()
          Get flags for this polygon mesh.
static java.lang.Class getInterfaceClass()
           
static java.lang.String getInterfaceName()
           
static int getInterfaceVersion()
           
 java.lang.String getName()
          Return the name of the interface
 int getPolygonCount()
          Get the number of polygons for this mesh.
 csMeshedPolygonArray getPolygons()
          Get the pointer to the array of polygons.
 int getTriangleCount()
          Get the number of triangles for this mesh.
 csTriangleArray getTriangles()
          Get the triangle table for this mesh.
 int getVersion()
          Return the version of the interface
 int getVertexCount()
          Get the number of vertices for this mesh.
 csVector3Array getVertices()
          Get the pointer to the array of vertices.
static void initSCF()
           
protected  boolean isNativePointerValidSafe(long pointer)
           
 void lock()
          Lock the polygon mesh.
 void unlock()
          Unlock the polygon mesh.
 
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.iutil.scf.iBase
decRef, getRefCount, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Constructor Detail

csPolygonMesh

public csPolygonMesh(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

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

initSCF

public static void initSCF()

getInterfaceVersion

public static int getInterfaceVersion()

getInterfaceName

public static java.lang.String getInterfaceName()

getInterfaceClass

public static java.lang.Class getInterfaceClass()

isNativePointerValidSafe

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

getChangeNumber

public int getChangeNumber()
Description copied from interface: iPolygonMesh
When this number changes you know the polygon mesh has changed (deformation has occured); since the last time you got another number from this function. Implemented in csPortalContainerPolyMeshHelper, csPolygonMesh, csPolygonMeshBox, BezierPolyMeshHelper, and PolyMeshHelper.

Specified by:
getChangeNumber in interface iPolygonMesh
Returns:
See Also:
iPolygonMesh.getChangeNumber()

getFlags

public csFlags getFlags()
Description copied from interface: iPolygonMesh
Get flags for this polygon mesh. This is zero or a combination of the following flags: CS_POLYMESH_CLOSED: mesh is closed. CS_POLYMESH_NOTCLOSED: mesh is not closed. CS_POLYMESH_CONVEX: mesh is convex. CS_POLYMESH_NOTCONVEX: mesh is not convex. CS_POLYMESH_DEFORMABLE: mesh is deformable. CS_POLYMESH_TRIANGLEMESH: mesh prefers triangle mesh. Note that if neither CS_POLYMESH_CLOSED nor CS_POLYMESH_NOTCLOSED are set then the closed state is not known. Setting both is illegal. Note that if neither CS_POLYMESH_CONVEX nor CS_POLYMESH_NOTCONVEX are set then the convex state is not known. Setting both is illegal. Implemented in csPortalContainerPolyMeshHelper, csPolygonMesh, csPolygonMeshBox, BezierPolyMeshHelper, and PolyMeshHelper.

Specified by:
getFlags in interface iPolygonMesh
Returns:
See Also:
iPolygonMesh.getFlags()

getPolygonCount

public int getPolygonCount()
Description copied from interface: iPolygonMesh
Get the number of polygons for this mesh. Implemented in csPortalContainerPolyMeshHelper, csPolygonMesh, csPolygonMeshBox, BezierPolyMeshHelper, and PolyMeshHelper.

Specified by:
getPolygonCount in interface iPolygonMesh
Returns:
See Also:
iPolygonMesh.getPolygonCount()

getPolygons

public csMeshedPolygonArray getPolygons()
Description copied from interface: iPolygonMesh
Get the pointer to the array of polygons. Implemented in csPortalContainerPolyMeshHelper, csPolygonMesh, csPolygonMeshBox, BezierPolyMeshHelper, and PolyMeshHelper.

Specified by:
getPolygons in interface iPolygonMesh
Returns:
See Also:
iPolygonMesh.getPolygons()

getTriangleCount

public int getTriangleCount()
Description copied from interface: iPolygonMesh
Get the number of triangles for this mesh. Implemented in csPortalContainerPolyMeshHelper, csPolygonMesh, csPolygonMeshBox, BezierPolyMeshHelper, and PolyMeshHelper.

Specified by:
getTriangleCount in interface iPolygonMesh
Returns:
See Also:
iPolygonMesh.getTriangleCount()

getTriangles

public csTriangleArray getTriangles()
Description copied from interface: iPolygonMesh
Get the triangle table for this mesh. Implemented in csPortalContainerPolyMeshHelper, csPolygonMesh, csPolygonMeshBox, BezierPolyMeshHelper, and PolyMeshHelper.

Specified by:
getTriangles in interface iPolygonMesh
Returns:
See Also:
iPolygonMesh.getTriangles()

getVertexCount

public int getVertexCount()
Description copied from interface: iPolygonMesh
Get the number of vertices for this mesh. Implemented in csPortalContainerPolyMeshHelper, csPolygonMesh, csPolygonMeshBox, BezierPolyMeshHelper, and PolyMeshHelper.

Specified by:
getVertexCount in interface iPolygonMesh
Returns:
See Also:
iPolygonMesh.getVertexCount()

getVertices

public csVector3Array getVertices()
Description copied from interface: iPolygonMesh
Get the pointer to the array of vertices. Implemented in csPortalContainerPolyMeshHelper, csPolygonMesh, csPolygonMeshBox, BezierPolyMeshHelper, and PolyMeshHelper.

Specified by:
getVertices in interface iPolygonMesh
Returns:
See Also:
iPolygonMesh.getVertices()

lock

public void lock()
Description copied from interface: iPolygonMesh
Lock the polygon mesh. This prevents the polygon and triangle data from being cleaned up. Implemented in csPortalContainerPolyMeshHelper, csPolygonMesh, csPolygonMeshBox, BezierPolyMeshHelper, and PolyMeshHelper.

Specified by:
lock in interface iPolygonMesh
See Also:
iPolygonMesh.lock()

unlock

public void unlock()
Description copied from interface: iPolygonMesh
Unlock the polygon mesh. This allows clean up again. Implemented in csPortalContainerPolyMeshHelper, csPolygonMesh, csPolygonMeshBox, BezierPolyMeshHelper, and PolyMeshHelper.

Specified by:
unlock in interface iPolygonMesh
See Also:
iPolygonMesh.unlock()