Go to the documentation of this file.
28 #ifndef __SceneQuery_H__
29 #define __SceneQuery_H__
42 class SceneQueryListener;
176 {
return &mSupportedWorldFragments;}
369 return this->distance < rhs.
distance;
virtual ~AxisAlignedBoxSceneQuery()
SceneManager * mParentSceneMgr
list< Plane >::type * planes
Planes bounding a convex region, only applicable for WFT_PLANE_BOUNDED_REGION.
WorldFragmentType
This type can be used by collaborating applications & SceneManagers to agree on the type of world geo...
SphereSceneQuery(SceneManager *mgr)
A class for performing queries on a scene.
@ WFT_CUSTOM_GEOMETRY
Custom geometry as defined by the SceneManager.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
void setSphere(const Sphere &sphere)
Sets the sphere which is to be used for this query.
@ WFT_SINGLE_INTERSECTION
Return a single intersection point (typically RaySceneQuery only)
virtual RaySceneQueryResult & getLastResults(void)
Gets the results of the last query that was run using this object, provided the query was executed us...
RaySceneQuery(SceneManager *mgr)
virtual void execute(SceneQueryListener *listener)=0
Executes the query and returns each match through a listener interface.
virtual void setRay(const Ray &ray)
Sets the ray which is to be used for this query.
virtual IntersectionSceneQueryResult & execute(void)
Executes the query, returning the results back in one list.
virtual ~IntersectionSceneQueryListener()
@ WFT_NONE
Return no world geometry hits at all.
virtual bool queryResult(MovableObject *movable, SceneQuery::WorldFragment *fragment)=0
Called when a movable intersects a world fragment.
This optional class allows you to receive per-result callbacks from SceneQuery executions instead of ...
virtual SceneQueryResult & execute(void)
Executes the query, returning the results back in one list.
virtual const set< WorldFragmentType >::type * getSupportedWorldFragmentTypes(void) const
Returns the types of world fragments this query supports.
Specialises the SceneQuery class for querying within a sphere.
virtual ~RaySceneQueryListener()
void setBox(const AxisAlignedBox &box)
Sets the size of the box you wish to query.
const PlaneBoundedVolumeList & getVolumes() const
Gets the volume which is being used for this query.
SceneQueryResultWorldFragmentList worldFragments
List of world fragments.
WorldFragmentType fragmentType
The type of this world fragment.
virtual bool getSortByDistance(void) const
Gets whether the results are sorted by distance.
RegionSceneQuery(SceneManager *mgr)
Standard constructor, should be called by SceneManager.
Abstract class defining a movable object in a scene.
virtual ~SphereSceneQuery()
list< SceneQueryMovableObjectWorldFragmentPair >::type SceneQueryMovableWorldFragmentIntersectionList
Separate SceneQuery class to query for pairs of objects which are possibly intersecting one another.
SceneQueryMovableWorldFragmentIntersectionList movables2world
List of movable / world intersections.
list< SceneQuery::WorldFragment * >::type SceneQueryResultWorldFragmentList
Specialises the SceneQuery class for querying within an axis aligned box.
void setVolumes(const PlaneBoundedVolumeList &volumes)
Sets the volume which is to be used for this query.
virtual void setWorldFragmentType(enum WorldFragmentType wft)
Tells the query what kind of world geometry to return from queries; often the full renderable geometr...
virtual uint32 getQueryTypeMask(void) const
Returns the current mask for this query.
bool queryResult(MovableObject *first)
Self-callback in order to deal with execute which returns collection.
WorldFragmentType mWorldFragmentType
virtual bool queryResult(MovableObject *obj, Real distance)=0
Called when a movable objects intersects the ray.
virtual bool queryResult(SceneQuery::WorldFragment *fragment)=0
Called when a WorldFragment is returned by a query.
bool queryResult(MovableObject *first, MovableObject *second)
Self-callback in order to deal with execute which returns collection.
SceneQuery::WorldFragment * worldFragment
The world fragment, or NULL if this is not a fragment result.
SceneQuery(SceneManager *mgr)
Standard constructor, should be called by SceneManager.
virtual WorldFragmentType getWorldFragmentType(void) const
Gets the current world fragment types to be returned from the query.
virtual bool queryResult(MovableObject *object)=0
Called when a MovableObject is returned by a query.
Real distance
Distance along the ray.
virtual bool queryResult(MovableObject *first, MovableObject *second)=0
Called when 2 movable objects intersect one another.
vector< RaySceneQueryResultEntry >::type RaySceneQueryResult
virtual ~IntersectionSceneQuery()
Manages the organisation and rendering of a 'scene' i.e.
Holds the results of an intersection scene query (pair values).
bool queryResult(MovableObject *obj, Real distance)
Self-callback in order to deal with execute which returns collection.
std::pair< MovableObject *, SceneQuery::WorldFragment * > SceneQueryMovableObjectWorldFragmentPair
RaySceneQueryResult mResult
AxisAlignedBoxSceneQuery(SceneManager *mgr)
virtual RaySceneQueryResult & execute(void)
Executes the query, returning the results back in one list.
list< SceneQueryMovableObjectPair >::type SceneQueryMovableIntersectionList
Abstract class defining a query which returns single results from a region.
SceneQueryMovableIntersectionList movables2movables
List of movable / movable intersections (entities, particle systems etc)
A 3D box aligned with the x/y/z axes.
virtual ~PlaneBoundedVolumeListSceneQuery()
SceneQueryResult * mLastResult
This struct allows a single comparison of result data no matter what the type.
set< WorldFragmentType >::type mSupportedWorldFragments
A sphere primitive, mostly used for bounds checking.
const Sphere & getSphere() const
Gets the sphere which is being used for this query.
virtual void clearResults(void)
Clears the results of the last query execution.
virtual ~SceneQueryListener()
Specialises the SceneQuery class for querying along a ray.
Alternative listener class for dealing with IntersectionSceneQuery.
list< MovableObject * >::type SceneQueryResultMovableList
Specialises the SceneQuery class for querying within a plane-bounded volume.
virtual void setSortByDistance(bool sort, ushort maxresults=0)
Sets whether the results of this query will be sorted by distance along the ray.
virtual IntersectionSceneQueryResult & getLastResults(void) const
Gets the results of the last query that was run using this object, provided the query was executed us...
virtual void execute(RaySceneQueryListener *listener)=0
Executes the query and returns each match through a listener interface.
MovableObject * movable
The movable, or NULL if this is not a movable result.
Alternative listener class for dealing with RaySceneQuery.
RenderOperation * renderOp
General render operation structure, fallback if nothing else is available.
virtual void setQueryMask(uint32 mask)
Sets the mask for results of this query.
IntersectionSceneQueryResult * mLastResult
virtual SceneQueryResult & getLastResults(void) const
Gets the results of the last query that was run using this object, provided the query was executed us...
Represents part of the world geometry that is a result of a SceneQuery.
IntersectionSceneQuery(SceneManager *mgr)
virtual ~RegionSceneQuery()
bool queryResult(SceneQuery::WorldFragment *fragment, Real distance)
Self-callback in order to deal with execute which returns collection.
virtual uint32 getQueryMask(void) const
Returns the current mask for this query.
float Real
Software floating point type.
vector< PlaneBoundedVolume >::type PlaneBoundedVolumeList
virtual const Ray & getRay(void) const
Gets the ray which is to be used for this query.
virtual bool queryResult(SceneQuery::WorldFragment *fragment, Real distance)=0
Called when a world fragment is intersected by the ray.
virtual void clearResults(void)
Clears the results of the last query execution.
void * geometry
Custom geometry block, only applicable for WFT_CUSTOM_GEOMETRY.
virtual void clearResults(void)
Clears the results of the last query execution.
Holds the results of a scene query.
virtual void setQueryTypeMask(uint32 mask)
Sets the type mask for results of this query.
Representation of a ray in space, i.e.
bool queryResult(SceneQuery::WorldFragment *fragment)
Self-callback in order to deal with execute which returns collection.
Vector3 singleIntersection
Single intersection point, only applicable for WFT_SINGLE_INTERSECTION.
bool operator<(SharedPtr< T > const &a, SharedPtr< U > const &b)
const AxisAlignedBox & getBox(void) const
Gets the box which is being used for this query.
Standard 3-dimensional vector.
@ WFT_PLANE_BOUNDED_REGION
Return pointers to convex plane-bounded regions.
'New' rendering operation using vertex buffers.
virtual void execute(IntersectionSceneQueryListener *listener)=0
Executes the query and returns each match through a listener interface.
virtual ushort getMaxResults(void) const
Gets the maximum number of results returned from the query (only relevant if results are being sorted...
SceneQueryResultMovableList movables
List of movable objects in the query (entities, particle systems etc)
std::pair< MovableObject *, MovableObject * > SceneQueryMovableObjectPair
PlaneBoundedVolumeListSceneQuery(SceneManager *mgr)
PlaneBoundedVolumeList mVolumes
bool queryResult(MovableObject *movable, SceneQuery::WorldFragment *fragment)
Self-callback in order to deal with execute which returns collection.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.