MeshSubHitRec Struct Reference
#include <mesh.h>
This class allows access to the sub-object hit records used in Mesh hit testing.
All methods of this class are implemented by the system. SubObjHitList use Tab instead of linked-list in Max 2017 for performance of large amount of data. The constructor's change is to keep code compatibility. Although internal storage changed, client code only needs recompile without any modification.
- See also
- Class Mesh, Class BitArray.
Constructor.
The data members are initialized to the data members passed.
- Parameters
-
dist | distance of the hit point |
index | the sub object's index |
DWORD dist
The distance of the hit.
Definition: mesh.h:931
int index2
The second level index of the sub-object component.
Definition: mesh.h:943
int index
The index of the sub-object component.
Definition: mesh.h:937
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.
The index of the sub-object component.
For example, if faces were being hit tested, this would be the index of the mesh's BitArray faceSel. For edges, this is the index into the edgeSel BitArray, where the index is 3*faceIndex+edgeIndex.
The second level index of the sub-object component.
Usually it is used for MNMesh's diagonal selection, in this case the index is the poly face index while index2 is the diagonal index within the poly face.