Class SubPatchHitList

3DS Max Plug-In SDK

Class SubPatchHitList

See Also: Class PatchMesh, Class PatchSubHitRec.

class SubPatchHitList

Description:

This class describes a list of sub-patch hit records. Methods are available to return the first PatchSubHitRec in the list, and to add hits to the list. All methods of this class are implemented by the system.

Methods:

Prototype:

SubPatchHitList();

Remarks:

Constructor. The first sub hit is set to NULL.

Prototype:

~SubPatchHitList();

Remarks:

Destructor. The list of patch hits are deleted.

Prototype:

PatchSubHitRec *First();

Remarks:

Returns the first sub hit record.

Prototype:

void AddHit(DWORD dist, PatchMesh *patch, int index, int type)

Remarks:

Creates a new sub hit record and adds it to the list.

Parameters:

DWORD dist

The distance of the 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.

PatchMesh *patch

The PatchMesh associated with this sub-patch hit.

int index

The index of the sub-object component. For example, if vertices were being hit tested, this would be the index into the vertex table.

int type

The type of the hit. One of the following values:

PATCH_HIT_PATCH

PATCH_HIT_EDGE

PATCH_HIT_VERTEX

PATCH_HIT_VECTOR

PATCH_HIT_INTERIOR