org.ogre4j
Class Plane

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

public class Plane
extends NativeObject
implements IPlane


Nested Class Summary
static class Plane.Side
           
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  Plane()
          Default constructor - sets everything to 0.
  Plane(float a, float b, float c, float d)
          Construct a plane using the 4 constants directly
  Plane(InstancePointer p)
          This constructor is public for internal useage only!
protected Plane(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  Plane(IPlane rhs)
           
  Plane(IVector3 rkNormal, float fConstant)
          Construct a plane through a normal, and a distance to move the plane along the normal.
  Plane(IVector3 rkNormal, IVector3 rkPoint)
           
  Plane(IVector3 rkPoint0, IVector3 rkPoint1, IVector3 rkPoint2)
           
  Plane(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
 float getd()
           
 float getDistance(IVector3 rkPoint)
          This is a pseudodistance.
 void getnormal(IVector3 returnValue)
           
 Plane.Side getSide(IAxisAlignedBox rkBox)
          returns the side where the aligneBox is. the flag BOTH_SIDE indicates an intersecting box. one corner ON the plane is sufficient to consider the box and the plane intersecting.
 Plane.Side getSide(IVector3 rkPoint)
           
 Plane.Side getSide(IVector3 centre, IVector3 halfSize)
          Returns which side of the plane that the given box lies on.
 float normalise()
          Normalises the plane.
 boolean operatorEqual(IPlane rhs)
           
 boolean operatorNotEqual(IPlane rhs)
           
 void projectVector(IVector3 returnValue, IVector3 v)
          Project a vector onto the plane.
 void redefine(IVector3 rkNormal, IVector3 rkPoint)
          Redefine this plane based on a normal and a point.
 void redefine(IVector3 rkPoint0, IVector3 rkPoint1, IVector3 rkPoint2)
          Redefine this plane based on 3 points.
 void setd(float _jni_value_)
           
 void setnormal(IVector3 _jni_value_)
           
 
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

Plane

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


Plane

protected Plane(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.


Plane

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

Plane

public Plane()
Default constructor - sets everything to 0.


Plane

public Plane(IPlane rhs)

Plane

public Plane(IVector3 rkNormal,
             float fConstant)
Construct a plane through a normal, and a distance to move the plane along the normal.


Plane

public Plane(float a,
             float b,
             float c,
             float d)
Construct a plane using the 4 constants directly


Plane

public Plane(IVector3 rkNormal,
             IVector3 rkPoint)

Plane

public Plane(IVector3 rkPoint0,
             IVector3 rkPoint1,
             IVector3 rkPoint2)
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

getSide

public Plane.Side getSide(IVector3 rkPoint)
Specified by:
getSide in interface IPlane

getSide

public Plane.Side getSide(IAxisAlignedBox rkBox)
returns the side where the aligneBox is. the flag BOTH_SIDE indicates an intersecting box. one corner ON the plane is sufficient to consider the box and the plane intersecting.

Specified by:
getSide in interface IPlane

getSide

public Plane.Side getSide(IVector3 centre,
                          IVector3 halfSize)
Returns which side of the plane that the given box lies on. The box is defined as centre/half-size pairs for effectively.

Specified by:
getSide in interface IPlane

getDistance

public float getDistance(IVector3 rkPoint)
This is a pseudodistance. The sign of the return value is positive if the point is on the positive side of the plane, negative if the point is on the negative side, and zero if the point is on the plane.

Specified by:
getDistance in interface IPlane

redefine

public void redefine(IVector3 rkPoint0,
                     IVector3 rkPoint1,
                     IVector3 rkPoint2)
Redefine this plane based on 3 points.

Specified by:
redefine in interface IPlane

redefine

public void redefine(IVector3 rkNormal,
                     IVector3 rkPoint)
Redefine this plane based on a normal and a point.

Specified by:
redefine in interface IPlane

projectVector

public void projectVector(IVector3 returnValue,
                          IVector3 v)
Project a vector onto the plane.

Specified by:
projectVector in interface IPlane

normalise

public float normalise()
Normalises the plane.

Specified by:
normalise in interface IPlane

operatorEqual

public boolean operatorEqual(IPlane rhs)
Specified by:
operatorEqual in interface IPlane

operatorNotEqual

public boolean operatorNotEqual(IPlane rhs)
Specified by:
operatorNotEqual in interface IPlane

getnormal

public void getnormal(IVector3 returnValue)
Specified by:
getnormal in interface IPlane

setnormal

public void setnormal(IVector3 _jni_value_)
Specified by:
setnormal in interface IPlane

getd

public float getd()
Specified by:
getd in interface IPlane

setd

public void setd(float _jni_value_)
Specified by:
setd in interface IPlane


Copyright © 2007 netAllied GmbH. All Rights Reserved.