org.ogre4j
Class ConvexBody

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.ConvexBody
All Implemented Interfaces:
IConvexBody, INativeObject

public class ConvexBody
extends NativeObject
implements IConvexBody


Nested Class Summary
static class ConvexBody.PolygonList
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IConvexBody
IConvexBody.IPolygonList
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  ConvexBody()
           
  ConvexBody(IConvexBody cpy)
           
  ConvexBody(InstancePointer p)
          This constructor is public for internal useage only!
protected ConvexBody(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  ConvexBody(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
static void _destroyPool()
           
static void _initialisePool()
           
 void clip(IAxisAlignedBox aab)
          Clips the body with an AAB.
 void clip(IConvexBody body)
          Clips the body with another body.
 void clip(IFrustum frustum)
          Clips the body with a frustum.
 void clip(IPlane pl, boolean keepNegative)
          Clips the object by the positive half space of a plane
 void define(IAxisAlignedBox aab)
          Build a new polygon representation from an AAB.
 void define(IFrustum frustum)
          Build a new polygon representation from a frustum.
 void delete()
          Deletes the corresponding C++ object.
 void extend(IVector3 pt)
          Extends the existing body to incorporate the passed in point as a convex hull.
 void finalize()
           
 void getAABB(IAxisAlignedBox returnValue)
          Returns an AABB representation.
 IVector3 getNormal(int poly)
          Returns the normal of a specified polygon.
 IPolygon getPolygon(int poly)
          Returns a polygon.
 int getPolygonCount()
          Returns the current number of polygons.
 IVector3 getVertex(int poly, int vertex)
          Returns a specific vertex of a polygon.
 int getVertexCount(int poly)
          Returns the number of vertices for a polygon
 boolean hasClosedHull()
          Checks if the body has a closed hull.
 void logInfo()
          details of this body
 void mergePolygons()
          Merges all neighboring polygons into one single polygon if they are lay in the same plane.
 boolean operatorEqual(IConvexBody rhs)
          Determines if the current object is equal to the compared one.
 boolean operatorNotEqual(IConvexBody rhs)
          Determines if the current object is not equal to the compared one.
 void reset()
          Resets the object.
 
Methods inherited from class org.xbig.base.NativeObject
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xbig.base.INativeObject
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Constructor Detail

ConvexBody

public ConvexBody(InstancePointer p)
This constructor is public for internal useage only! Do not use it!


ConvexBody

protected ConvexBody(InstancePointer p,
                     boolean remote)
Creates a Java wrapper object for an existing C++ object. If remote is set to 'true' this object cannot be deleted in Java.


ConvexBody

public ConvexBody(WithoutNativeObject val)
Allows creation of Java objects without C++ objects.

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

ConvexBody

public ConvexBody()

ConvexBody

public ConvexBody(IConvexBody cpy)
Method Detail

delete

public void delete()
Description copied from interface: INativeObject
Deletes the corresponding C++ object.

Subclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!

Specified by:
delete in interface INativeObject
Specified by:
delete in class NativeObject
See Also:
#remote

finalize

public void finalize()
Overrides:
finalize in class NativeObject

define

public void define(IFrustum frustum)
Build a new polygon representation from a frustum.

Specified by:
define in interface IConvexBody

define

public void define(IAxisAlignedBox aab)
Build a new polygon representation from an AAB.

Specified by:
define in interface IConvexBody

clip

public void clip(IFrustum frustum)
Clips the body with a frustum. The resulting holes are filled with new polygons.

Specified by:
clip in interface IConvexBody

clip

public void clip(IAxisAlignedBox aab)
Clips the body with an AAB. The resulting holes are filled with new polygons.

Specified by:
clip in interface IConvexBody

clip

public void clip(IConvexBody body)
Clips the body with another body.

Specified by:
clip in interface IConvexBody

clip

public void clip(IPlane pl,
                 boolean keepNegative)
Clips the object by the positive half space of a plane

Specified by:
clip in interface IConvexBody

extend

public void extend(IVector3 pt)
Extends the existing body to incorporate the passed in point as a convex hull.

Specified by:
extend in interface IConvexBody

reset

public void reset()
Resets the object.

Specified by:
reset in interface IConvexBody

getPolygonCount

public int getPolygonCount()
Returns the current number of polygons.

Specified by:
getPolygonCount in interface IConvexBody

getVertexCount

public int getVertexCount(int poly)
Returns the number of vertices for a polygon

Specified by:
getVertexCount in interface IConvexBody

getPolygon

public IPolygon getPolygon(int poly)
Returns a polygon.

Specified by:
getPolygon in interface IConvexBody

getVertex

public IVector3 getVertex(int poly,
                          int vertex)
Returns a specific vertex of a polygon.

Specified by:
getVertex in interface IConvexBody

getNormal

public IVector3 getNormal(int poly)
Returns the normal of a specified polygon.

Specified by:
getNormal in interface IConvexBody

getAABB

public void getAABB(IAxisAlignedBox returnValue)
Returns an AABB representation.

Specified by:
getAABB in interface IConvexBody

hasClosedHull

public boolean hasClosedHull()
Checks if the body has a closed hull.

Specified by:
hasClosedHull in interface IConvexBody

mergePolygons

public void mergePolygons()
Merges all neighboring polygons into one single polygon if they are lay in the same plane.

Specified by:
mergePolygons in interface IConvexBody

operatorEqual

public boolean operatorEqual(IConvexBody rhs)
Determines if the current object is equal to the compared one.

Specified by:
operatorEqual in interface IConvexBody

operatorNotEqual

public boolean operatorNotEqual(IConvexBody rhs)
Determines if the current object is not equal to the compared one.

Specified by:
operatorNotEqual in interface IConvexBody

logInfo

public void logInfo()
details of this body

Specified by:
logInfo in interface IConvexBody

_initialisePool

public static void _initialisePool()

_destroyPool

public static void _destroyPool()


Copyright © 2007 netAllied GmbH. All Rights Reserved.