org.ogre4j
Class Ray

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

public class Ray
extends NativeObject
implements IRay


Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  Ray()
           
  Ray(InstancePointer p)
          This constructor is public for internal useage only!
protected Ray(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  Ray(IVector3 origin, IVector3 direction)
           
  Ray(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
 IVector3 getDirection()
          Gets the direction of the ray.
 IVector3 getOrigin()
          Gets the origin of the ray.
 void getPoint(IVector3 returnValue, float t)
          Gets the position of a point t units along the ray.
 void intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue, IAxisAlignedBox box)
          Tests whether this ray intersects the given box.
 void intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue, IPlane p)
          Tests whether this ray intersects the given plane.
 void intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue, IPlaneBoundedVolume p)
          Tests whether this ray intersects the given plane bounded volume.
 void intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue, ISphere s)
          Tests whether this ray intersects the given sphere.
 void operatorMultiplication(IVector3 returnValue, float t)
          Gets the position of a point t units along the ray.
 void setDirection(IVector3 dir)
          Sets the direction of the ray.
 void setOrigin(IVector3 origin)
          Sets the origin of the ray.
 
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

Ray

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


Ray

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


Ray

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

Ray

public Ray()

Ray

public Ray(IVector3 origin,
           IVector3 direction)
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

setOrigin

public void setOrigin(IVector3 origin)
Sets the origin of the ray.

Specified by:
setOrigin in interface IRay

getOrigin

public IVector3 getOrigin()
Gets the origin of the ray.

Specified by:
getOrigin in interface IRay

setDirection

public void setDirection(IVector3 dir)
Sets the direction of the ray.

Specified by:
setDirection in interface IRay

getDirection

public IVector3 getDirection()
Gets the direction of the ray.

Specified by:
getDirection in interface IRay

getPoint

public void getPoint(IVector3 returnValue,
                     float t)
Gets the position of a point t units along the ray.

Specified by:
getPoint in interface IRay

operatorMultiplication

public void operatorMultiplication(IVector3 returnValue,
                                   float t)
Gets the position of a point t units along the ray.

Specified by:
operatorMultiplication in interface IRay

intersects

public void intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue,
                       IPlane p)
Tests whether this ray intersects the given plane.

Specified by:
intersects in interface IRay

intersects

public void intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue,
                       IPlaneBoundedVolume p)
Tests whether this ray intersects the given plane bounded volume.

Specified by:
intersects in interface IRay

intersects

public void intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue,
                       ISphere s)
Tests whether this ray intersects the given sphere.

Specified by:
intersects in interface IRay

intersects

public void intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue,
                       IAxisAlignedBox box)
Tests whether this ray intersects the given box.

Specified by:
intersects in interface IRay


Copyright © 2007 netAllied GmbH. All Rights Reserved.