org.ogre4j
Class RaySceneQuery

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.RaySceneQuery
All Implemented Interfaces:
IAllocatedObject<ISceneCtlAllocPolicy>, IRaySceneQuery, IRaySceneQueryListener, ISceneCtlAllocatedObject, ISceneQuery, INativeObject

public class RaySceneQuery
extends NativeObject
implements IRaySceneQuery


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.ogre4j.ISceneQuery
ISceneQuery.IWorldFragment
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  RaySceneQuery(InstancePointer p)
          This constructor is public for internal useage only!
protected RaySceneQuery(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  RaySceneQuery(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void clearResults()
          Clears the results of the last query execution.
 void delete()
          Deletes the corresponding C++ object.
 IRaySceneQueryResult execute()
          Executes the query, returning the results back in one list.
 void execute(IRaySceneQueryListener listener)
          Executes the query and returns each match through a listener interface.
 void finalize()
           
 IRaySceneQueryResult getLastResults()
          Gets the results of the last query that was run using this object, provided the query was executed using the collection-returning version of execute.
 int getMaxResults()
          Gets the maximum number of results returned from the query (only relevant if results are being sorted)
 long getQueryMask()
          Returns the current mask for this query.
 long getQueryTypeMask()
          Returns the current mask for this query.
 IRay getRay()
          Gets the ray which is to be used for this query.
 boolean getSortByDistance()
          Gets whether the results are sorted by distance.
 void getSupportedWorldFragmentTypes(Iset<SceneQuery.WorldFragmentType> returnValue)
          Returns the types of world fragments this query supports.
 SceneQuery.WorldFragmentType getWorldFragmentType()
          Gets the current world fragment types to be returned from the query.
 boolean queryResult(IMovableObject obj, float distance)
          Self-callback in order to deal with execute which returns collection.
 boolean queryResult(ISceneQuery.IWorldFragment fragment, float distance)
          Self-callback in order to deal with execute which returns collection.
 void setQueryMask(long mask)
          Sets the mask for results of this query.
 void setQueryTypeMask(long mask)
          Sets the type mask for results of this query.
 void setRay(IRay ray)
          Sets the ray which is to be used for this query.
 void setSortByDistance(boolean sort, int maxresults)
          Sets whether the results of this query will be sorted by distance along the ray.
 void setWorldFragmentType(SceneQuery.WorldFragmentType wft)
          Tells the query what kind of world geometry to return from queries; often the full renderable geometry is not what is needed.
 
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

RaySceneQuery

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


RaySceneQuery

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


RaySceneQuery

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()
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

setRay

public void setRay(IRay ray)
Sets the ray which is to be used for this query.

Specified by:
setRay in interface IRaySceneQuery

getRay

public IRay getRay()
Gets the ray which is to be used for this query.

Specified by:
getRay in interface IRaySceneQuery

setSortByDistance

public void setSortByDistance(boolean sort,
                              int maxresults)
Sets whether the results of this query will be sorted by distance along the ray.

Specified by:
setSortByDistance in interface IRaySceneQuery

getSortByDistance

public boolean getSortByDistance()
Gets whether the results are sorted by distance.

Specified by:
getSortByDistance in interface IRaySceneQuery

getMaxResults

public int getMaxResults()
Gets the maximum number of results returned from the query (only relevant if results are being sorted)

Specified by:
getMaxResults in interface IRaySceneQuery

execute

public IRaySceneQueryResult execute()
Executes the query, returning the results back in one list.

Specified by:
execute in interface IRaySceneQuery

execute

public void execute(IRaySceneQueryListener listener)
Executes the query and returns each match through a listener interface.

Specified by:
execute in interface IRaySceneQuery

getLastResults

public IRaySceneQueryResult getLastResults()
Gets the results of the last query that was run using this object, provided the query was executed using the collection-returning version of execute.

Specified by:
getLastResults in interface IRaySceneQuery

clearResults

public void clearResults()
Clears the results of the last query execution.

Specified by:
clearResults in interface IRaySceneQuery

queryResult

public boolean queryResult(IMovableObject obj,
                           float distance)
Self-callback in order to deal with execute which returns collection.

Specified by:
queryResult in interface IRaySceneQuery
Specified by:
queryResult in interface IRaySceneQueryListener

queryResult

public boolean queryResult(ISceneQuery.IWorldFragment fragment,
                           float distance)
Self-callback in order to deal with execute which returns collection.

Specified by:
queryResult in interface IRaySceneQuery
Specified by:
queryResult in interface IRaySceneQueryListener

setQueryMask

public void setQueryMask(long mask)
Sets the mask for results of this query.

Specified by:
setQueryMask in interface ISceneQuery

getQueryMask

public long getQueryMask()
Returns the current mask for this query.

Specified by:
getQueryMask in interface ISceneQuery

setQueryTypeMask

public void setQueryTypeMask(long mask)
Sets the type mask for results of this query.

Specified by:
setQueryTypeMask in interface ISceneQuery

getQueryTypeMask

public long getQueryTypeMask()
Returns the current mask for this query.

Specified by:
getQueryTypeMask in interface ISceneQuery

setWorldFragmentType

public void setWorldFragmentType(SceneQuery.WorldFragmentType wft)
Tells the query what kind of world geometry to return from queries; often the full renderable geometry is not what is needed.

Specified by:
setWorldFragmentType in interface ISceneQuery

getWorldFragmentType

public SceneQuery.WorldFragmentType getWorldFragmentType()
Gets the current world fragment types to be returned from the query.

Specified by:
getWorldFragmentType in interface ISceneQuery

getSupportedWorldFragmentTypes

public void getSupportedWorldFragmentTypes(Iset<SceneQuery.WorldFragmentType> returnValue)
Returns the types of world fragments this query supports.

Specified by:
getSupportedWorldFragmentTypes in interface ISceneQuery


Copyright © 2007 netAllied GmbH. All Rights Reserved.