Class PatchSubHitRec

3DS Max Plug-In SDK

Class PatchSubHitRec

See Also: Class PatchMesh.

class PatchSubHitRec

Description:

This class represents a single hit record for sub-patch level hit testing. All methods of this class are implemented by the system.

Data Members:

public:

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

Methods:

Prototype:

PatchSubHitRec(DWORD dist, PatchMesh *patch, int index,

int type, PatchSubHitRec *next);

Remarks:

Constructor. The data members are set to the values passed.

Prototype:

PatchSubHitRec *Next();

Remarks:

Returns the next sub hit record.