Public Types | Public Member Functions | Public Attributes | Protected Attributes | Friends

HitListWrapper Class Reference

Search for all occurrences

#include <ObjectWrapper.h>

Inheritance diagram for HitListWrapper:
Inheritance graph
[legend]

List of all members.

Public Types

enum   { empty = 0, triObject, polyObject, patchObject }
 

The type of the underlying object against which the hit testing occurred; triObject for Mesh, polyObject for MNMesh, and patchObject for PatchMesh.

More...

Public Member Functions

CoreExport  HitListWrapper ()
CoreExport  ~HitListWrapper ()
CoreExport bool  GoToFirst ()
CoreExport bool  GoToNext ()
CoreExport DWORD  GetDist ()
CoreExport int  GetIndex ()
CoreExport void  Init (int type)
CoreExport void  Release ()

Public Attributes

enum HitListWrapper:: { ... }   type
SubObjHitList meshHitList
SubObjHitList polyHitList
SubPatchHitList patchHitList
MeshSubHitRec curMeshHitRec
MeshSubHitRec curPolyHitRec
PatchSubHitRec curPatchHitRec

Protected Attributes

union {
   SubObjHitList *   meshHitList
   SubObjHitList *   polyHitList
   SubPatchHitList *   patchHitList
}; 
union {
   MeshSubHitRec *   curMeshHitRec
   MeshSubHitRec *   curPolyHitRec
   PatchSubHitRec *   curPatchHitRec
}; 

Friends

class  ObjectWrapper

Member Enumeration Documentation

anonymous enum

The type of the underlying object against which the hit testing occurred; triObject for Mesh, polyObject for MNMesh, and patchObject for PatchMesh.

The empty type indicates that no hit testing has been performed yet

Enumerator:
empty 
triObject 
polyObject 
patchObject 

Constructor & Destructor Documentation

CoreExport HitListWrapper ( ) [inline]
Remarks:
Constructor. This does not call the Init() method, so wrapper must still be initialized before it can be used.
{type=empty;}
CoreExport ~HitListWrapper ( )
Remarks:
Destructor. Deallocates used memory by calling Release()

Member Function Documentation

CoreExport bool GoToFirst ( )
Remarks:
Sets the first hit entry in the list as the current hit
Returns:
FALSE if no hit entries are in the list, otherwise TRUE
CoreExport bool GoToNext ( )
Remarks:
Sets the current hit to the next entry in the list
Returns:
FALSE if the operation fails because no entries remain the list, otherwise TRUE
CoreExport DWORD GetDist ( )
Remarks:
The distance of the current hit. If the user is in wireframe mode, this is the distance in pixels to the item that was hit. If the user is in shaded mode, this is the Z depth distance. Smaller numbers indicate a closer hit.
Returns:
The distance of the current hit.
CoreExport int GetIndex ( )
Remarks:
The index of the sub-object component of the current hit. For example, if faces were being hit tested, this would be the index of the face which was hit.
Returns:
The index of the sub-object component of the current hit.
CoreExport void Init ( int  type )
Remarks:
Initializes the wrapper to the specified object type, allocating the type-specific hit list used by the wrapper. This must be called before the wrapper can store any hit test results.
Parameters:
type - one of the type enum values
CoreExport void Release ( )
Remarks:
Releases the type-specific hit list used by the wrapper. This is normally called by the destructor.

Friends And Related Function Documentation

friend class ObjectWrapper [friend]

Member Data Documentation

union { ... } [protected]
union { ... } [protected]
enum { ... } type

HitListWrapper HitListWrapper HitListWrapper HitListWrapper HitListWrapper HitListWrapper HitListWrapper HitListWrapper HitListWrapper HitListWrapper
HitListWrapper HitListWrapper HitListWrapper HitListWrapper HitListWrapper HitListWrapper HitListWrapper HitListWrapper HitListWrapper HitListWrapper