org.ogre4j
Class Sphere

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

public class Sphere
extends NativeObject
implements ISphere


Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  Sphere()
          Standard constructor - creates a unit sphere around the origin.
  Sphere(InstancePointer p)
          This constructor is public for internal useage only!
protected Sphere(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  Sphere(IVector3 center, float radius)
          Constructor allowing arbitrary spheres.
  Sphere(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
 IVector3 getCenter()
          Returns the center point of the sphere.
 float getRadius()
          Returns the radius of the sphere.
 boolean intersects(IAxisAlignedBox box)
          Returns whether or not this sphere intersects a box.
 boolean intersects(IPlane plane)
          Returns whether or not this sphere intersects a plane.
 boolean intersects(ISphere s)
          Returns whether or not this sphere intersects another sphere.
 boolean intersects(IVector3 v)
          Returns whether or not this sphere intersects a point.
 void setCenter(IVector3 center)
          Sets the center point of the sphere.
 void setRadius(float radius)
          Sets the radius of the sphere.
 
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

Sphere

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


Sphere

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


Sphere

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

Sphere

public Sphere()
Standard constructor - creates a unit sphere around the origin.


Sphere

public Sphere(IVector3 center,
              float radius)
Constructor allowing arbitrary spheres.

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

getRadius

public float getRadius()
Returns the radius of the sphere.

Specified by:
getRadius in interface ISphere

setRadius

public void setRadius(float radius)
Sets the radius of the sphere.

Specified by:
setRadius in interface ISphere

getCenter

public IVector3 getCenter()
Returns the center point of the sphere.

Specified by:
getCenter in interface ISphere

setCenter

public void setCenter(IVector3 center)
Sets the center point of the sphere.

Specified by:
setCenter in interface ISphere

intersects

public boolean intersects(ISphere s)
Returns whether or not this sphere intersects another sphere.

Specified by:
intersects in interface ISphere

intersects

public boolean intersects(IAxisAlignedBox box)
Returns whether or not this sphere intersects a box.

Specified by:
intersects in interface ISphere

intersects

public boolean intersects(IPlane plane)
Returns whether or not this sphere intersects a plane.

Specified by:
intersects in interface ISphere

intersects

public boolean intersects(IVector3 v)
Returns whether or not this sphere intersects a point.

Specified by:
intersects in interface ISphere


Copyright © 2007 netAllied GmbH. All Rights Reserved.