TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
iCollideQuery Struct Referenceabstract
Inheritance diagram for iCollideQuery:
iUnknown iCollideQuery2

Detailed Description

Collide query interface.

Public Member Functions

virtual iCollideGetCollide () const =0
 Get the parent collide object. {Property}. More...
 
virtual tBool Copy (const iCollideQuery *apSrc)=0
 Copy the specified query in this query. More...
 
virtual iCollideQueryClone () const =0
 Creates a copy of this query. More...
 
virtual void Reset ()=0
 Reset the query content. More...
 
virtual tBool SetObject1 (iCollideObject *apObj)=0
 Set the object1. {Property}. More...
 
virtual iCollideObjectGetObject1 () const =0
 Get the object1. {Property}. More...
 
virtual tBool SetObject2 (iCollideObject *apObj)=0
 Set the object1. {Property}. More...
 
virtual iCollideObjectGetObject2 () const =0
 Get the object2. {Property}. More...
 
virtual void SetPoint1 (const sVec3f &avPoint)=0
 Set the point1. {Property}. More...
 
virtual sVec3f GetPoint1 () const =0
 Get the point1. {Property}. More...
 
virtual void SetPoint2 (const sVec3f &avPoint)=0
 Set the point2. {Property}. More...
 
virtual sVec3f GetPoint2 () const =0
 Get the point2. {Property}. More...
 
virtual void SetMaterialID1 (tU32 anMatID)=0
 Set the material id of the first hit point. {Property}. More...
 
virtual tU32 GetMaterialID1 () const =0
 Get the material id of the first hit point. {Property}. More...
 
virtual void SetMaterialID2 (tU32 anMatID)=0
 Set the material id of the second hit point. {Property}. More...
 
virtual tU32 GetMaterialID2 () const =0
 Get the material id of the second hit point. {Property}. More...
 
virtual void SetNormal (const sVec3f &avNormal)=0
 Get the normal. {Property}. More...
 
virtual sVec3f GetNormal () const =0
 Set the normal. {Property}. More...
 
virtual void SetT (tF32 afT)=0
 Set T. {Property}. More...
 
virtual tF32 GetT () const =0
 Get T. {Property}. More...
 
virtual tBool SetScene (iCollideScene *apScene)=0
 Set the scene. {Property}. More...
 
virtual iCollideSceneGetScene () const =0
 Get the scene. {Property}. More...
 
virtual tBool SetResponseTable (iCollideResponseTable *apRespTable)=0
 Set the response table. {Property}. More...
 
virtual iCollideResponseTableGetResponseTable () const =0
 Get the response table. {Property}. More...
 
virtual tU32 QueryScene ()=0
 Query collisions in a scene. More...
 
virtual tU32 QueryObjectWithScene ()=0
 Query the number of collisions between object1 and any other object in the scene. More...
 
virtual tBool QueryRayCastObject (const sVec3f &avSource, const sVec3f &avTarget, tF32 afMaxParam)=0
 Query a ray cast on object1, ignore object2. More...
 
virtual tBool QueryRayCastScene (const sVec3f &avSource, const sVec3f &avTarget, tF32 afMaxParam)=0
 Query a ray cast on the scene, ignore object2. More...
 
virtual tBool QueryRayCastSceneEx (iHString *ahspClass, const sVec3f &avSource, const sVec3f &avTarget, tF32 afMaxParam)=0
 Query a ray cast on a scene and allows to specify the class to collide. More...
 
virtual tBool QueryRayCastScene2 (iHString *ahspClass, const sVec3f &avSource, const sVec3f &avTarget, tF32 afMaxParam)=0
 Query a ray cast on a scene and allows to specify the class to collide. More...
 
virtual tBool QueryRayCastSceneVertical (iHString *ahspClass, ni::tF32 afWidth, ni::sVec3f avCurPos, ni::tF32 afDist, ni::tBool abLowest)=0
 Query a vertical ray casting. Returns the closest height of a solid object. More...
 
- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual iCollide* GetCollide ( ) const
pure virtual

Get the parent collide object. {Property}.

virtual tBool Copy ( const iCollideQuery apSrc)
pure virtual

Copy the specified query in this query.

virtual iCollideQuery* Clone ( ) const
pure virtual

Creates a copy of this query.

virtual void Reset ( )
pure virtual

Reset the query content.

virtual tBool SetObject1 ( iCollideObject apObj)
pure virtual

Set the object1. {Property}.

virtual iCollideObject* GetObject1 ( ) const
pure virtual

Get the object1. {Property}.

virtual tBool SetObject2 ( iCollideObject apObj)
pure virtual

Set the object1. {Property}.

virtual iCollideObject* GetObject2 ( ) const
pure virtual

Get the object2. {Property}.

virtual void SetPoint1 ( const sVec3f avPoint)
pure virtual

Set the point1. {Property}.

virtual sVec3f GetPoint1 ( ) const
pure virtual

Get the point1. {Property}.

virtual void SetPoint2 ( const sVec3f avPoint)
pure virtual

Set the point2. {Property}.

virtual sVec3f GetPoint2 ( ) const
pure virtual

Get the point2. {Property}.

virtual void SetMaterialID1 ( tU32  anMatID)
pure virtual

Set the material id of the first hit point. {Property}.

virtual tU32 GetMaterialID1 ( ) const
pure virtual

Get the material id of the first hit point. {Property}.

virtual void SetMaterialID2 ( tU32  anMatID)
pure virtual

Set the material id of the second hit point. {Property}.

virtual tU32 GetMaterialID2 ( ) const
pure virtual

Get the material id of the second hit point. {Property}.

virtual void SetNormal ( const sVec3f avNormal)
pure virtual

Get the normal. {Property}.

virtual sVec3f GetNormal ( ) const
pure virtual

Set the normal. {Property}.

virtual void SetT ( tF32  afT)
pure virtual

Set T. {Property}.

virtual tF32 GetT ( ) const
pure virtual

Get T. {Property}.

virtual tBool SetScene ( iCollideScene apScene)
pure virtual

Set the scene. {Property}.

virtual iCollideScene* GetScene ( ) const
pure virtual

Get the scene. {Property}.

virtual tBool SetResponseTable ( iCollideResponseTable apRespTable)
pure virtual

Set the response table. {Property}.

virtual iCollideResponseTable* GetResponseTable ( ) const
pure virtual

Get the response table. {Property}.

virtual tU32 QueryScene ( )
pure virtual

Query collisions in a scene.

Returns
the number of objects collided.
virtual tU32 QueryObjectWithScene ( )
pure virtual

Query the number of collisions between object1 and any other object in the scene.

Returns
the number of collision with object1.
virtual tBool QueryRayCastObject ( const sVec3f avSource,
const sVec3f avTarget,
tF32  afMaxParam 
)
pure virtual

Query a ray cast on object1, ignore object2.

Remarks
T will be set with the t of the hit spot, point1 will be set with source + (target-source) * t, normal will be the object's normal, always pointing towards the object object1 will be set with the object hit.
Returns
eTrue if the ray intersects the object.
Remarks
Ignores the response table so the ray will be checked against all shape, use QueryRayCastSceneEx if you need reponse table filtering.
virtual tBool QueryRayCastScene ( const sVec3f avSource,
const sVec3f avTarget,
tF32  afMaxParam 
)
pure virtual

Query a ray cast on the scene, ignore object2.

Remarks
T will be set with the t of the hit spot, point1 will be set with source + (target-source) * t, normal will be the object's normal, always pointing towards the object object1 will be set with the object hit.
Returns
eTrue if the ray intersects any object in the scene.
Remarks
Doesn't call the collide response sink, sets the nearest collide object in this query.
Ignores the response table so the ray will be checked against all shape, use QueryRayCastSceneEx if you need reponse table filtering.
virtual tBool QueryRayCastSceneEx ( iHString ahspClass,
const sVec3f avSource,
const sVec3f avTarget,
tF32  afMaxParam 
)
pure virtual

Query a ray cast on a scene and allows to specify the class to collide.

Parameters
ahspClassis the class of the ray cast.
avSourceis the source of the ray.
avTargetis the target of the ray.
afMaxParamspecify the magnitude of ray to be used. niMaxF32 means an infinite ray. 1 means source to target.
Remarks
T will be set with the t of the hit spot, point1 will be set with source + (target-source) * t, normal will be the object's normal, always pointing towards the object object1 will be set with the object hit.
Doesn't call the collide response sink, sets the nearest collide object in this query.
Returns
eTrue if the ray intersects the object.
virtual tBool QueryRayCastScene2 ( iHString ahspClass,
const sVec3f avSource,
const sVec3f avTarget,
tF32  afMaxParam 
)
pure virtual

Query a ray cast on a scene and allows to specify the class to collide.

Parameters
ahspClassis the class of the ray cast.
avSourceis the source of the ray.
avTargetis the target of the ray.
afMaxParamspecify the magnitude of ray to be used. niMaxF32 means an infinite ray. 1 means source to target.
Remarks
T will be set with the t of the hit spot, point1 will be set with source + (target-source) * t, normal will be the object's normal, always pointing towards the object object1 will be set with the object hit.
Calls the collide response sink, sets the nearest collide object in this query.
Returns
eTrue if the ray intersects the object.
virtual tBool QueryRayCastSceneVertical ( iHString ahspClass,
ni::tF32  afWidth,
ni::sVec3f  avCurPos,
ni::tF32  afDist,
ni::tBool  abLowest 
)
pure virtual

Query a vertical ray casting. Returns the closest height of a solid object.

Parameters
ahspClassis the class of the ray to use for ray casting.
avCurPosis the origini of the ray cast.
afWidthis the width/radius of the object that cast the ray, the larger the object the more ray will be cast to make sure that the object never 'falls true'. If afWidth is zero only one ray will be cast.
afDistis the length of the hit test
abLowestif true returns the lowest point of intersection when multi-ray cast is performed, else return the highest point.
Remarks
T will be set with the T of the hit spot point1 will be set with the hit spot normal will be the object's normal, always pointing towards the object object1 will be set with the object hit.