Class OsnapMarker

3DS Max Plug-In SDK

Class OsnapMarker

See Also: Class Osnap, Class IOsnapManager, Class GraphicsWindow, Class IPoint3.

class OsnapMarker

Description:

This class is available in release 2.0 and later only.

This class is used for drawing Osnap markers in the viewports. The marker is drawn as a polyline. The class maintains a cache of the points for the polyline. There are constructors used to initialize the cache and a display() method to draw the marker in the specified viewport.

The Osnap class must implement the GetMarkers() method which typically returns pointers to these static instances.

Methods:

Prototype:

OsnapMarker();

Remarks:

Constructor. The cache of marker points is set to NULL and the number of points is set to 0.

Prototype:

OsnapMarker(int n, IPoint3 *ppt, int *pes);

Remarks:

Constructor. This initializes the cache with the points and edge flags passed.

Parameters:

int n

The number of points in the marker polyline.

IPoint3 *ppt

The array of points for the polyline.

int *pes

The edge state array. This is an array that indicates if the 'n-th' edge is one of three state:

GW_EDGE_SKIP

Nonexistent - totally invisible.

GW_EDGE_VIS

Exists and is solid.

GW_EDGE_INVIS

Exists and is hidden - shown as a dotted line.

You may pass NULL for this array and the method will assume that the edges are all solid.

Prototype:

OsnapMarker(const OsnapMarker& om);

Remarks:

Constructor. The marker data is initialzed from the OsnapMarker passed.

Parameters:

const OsnapMarker& om

The settings are copied from this OsnapMarker.

Prototype:

~OsnapMarker();

Remarks:

Destructor. If any marker points have been allocated for the cache they are freed.

Prototype:

void display(IPoint3 xyz, int markersize, GraphicsWindow *gw);

Remarks:

This is method is used internally to display the marker cache at the specified size in the specified viewport. Plugin developers need not call this method.

Operators:

Prototype:

OsnapMarker& operator=(const OsnapMarker& om);

Remarks:

Assignment operator.

Parameters:

const OsnapMarker& om

The OsnapMarker to assign.