crystalspace.jbind.impl.csgeom.sphere
Class csSphere

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csgeom.sphere.csSphere
All Implemented Interfaces:
iPointer

public class csSphere
extends csNativeObject

This class represents a sphere.

Author:
Quentin Anciaux

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csSphere()
          Create a new empty sphere at (0,0,0).
csSphere(csSphere s)
          Copy Constructor.
csSphere(csVector3 center, float radius)
          Create a new sphere.
csSphere(iPointer nPointer)
          Create a java csSphere object which points to the native csSphere nPointer.
 
Method Summary
 csSphere add(csSphere s)
          Calculate the union of this sphere and another one.
static csSphere add(csSphere s1, csSphere s2)
          Calculate the union of two spheres.
 csVector3 getCenter()
          Get the center of this sphere.
 float getRadius()
          Get the radius of this sphere.
protected  boolean isNativePointerValidSafe(long nPointer)
           
protected  void nDelete(long pointer)
           
 void setCenter(csVector3 c)
          Set the center of this sphere.
 void setRadius(float r)
          Set the radius of this sphere.
 void union(csVector3 ocenter, float oradius)
          Calculate the union of this sphere and another.
 
Methods inherited from class crystalspace.jbind.impl.csNativeObject
changePointer, equals, finalize, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, newNativeObject, setMemoryOwner, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

csSphere

public csSphere(iPointer nPointer)
Create a java csSphere object which points to the native csSphere nPointer.

Parameters:
nPointer -

csSphere

public csSphere()
Create a new empty sphere at (0,0,0).


csSphere

public csSphere(csVector3 center,
                float radius)
Create a new sphere.

Parameters:
center -
radius -

csSphere

public csSphere(csSphere s)
Copy Constructor.

Parameters:
s -
Method Detail

nDelete

protected void nDelete(long pointer)
Specified by:
nDelete in class csNativeObject
See Also:
csNativeObject.nDelete(long)

isNativePointerValidSafe

protected boolean isNativePointerValidSafe(long nPointer)
Specified by:
isNativePointerValidSafe in class csNativeObject
See Also:
crystalspace.jbind.impl.csNativeObject#isNativePointerValidSafe()

getCenter

public final csVector3 getCenter()
Get the center of this sphere.

Returns:

setCenter

public final void setCenter(csVector3 c)
Set the center of this sphere.

Parameters:
c -

getRadius

public final float getRadius()
Get the radius of this sphere.

Returns:

setRadius

public final void setRadius(float r)
Set the radius of this sphere.

Parameters:
r -

union

public final void union(csVector3 ocenter,
                        float oradius)
Calculate the union of this sphere and another.

Parameters:
ocenter -
oradius -

add

public final csSphere add(csSphere s)
Calculate the union of this sphere and another one.

Parameters:
s -
Returns:

add

public static final csSphere add(csSphere s1,
                                 csSphere s2)
Calculate the union of two spheres.

Parameters:
s1 -
s2 -
Returns: