OsnapMarker Class Reference
 
 
 
OsnapMarker Class Reference

This reference page is linked to from the following overview topics: Snapping.


#include <osnapmk.h>

Inheritance diagram for OsnapMarker:
MaxHeapOperators

Class Description

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

Description:
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.

Public Member Functions

CoreExport  OsnapMarker ()
CoreExport  ~OsnapMarker ()
CoreExport  OsnapMarker (int n, IPoint3 *ppt, int *pes)
CoreExport  OsnapMarker (const OsnapMarker &om)
CoreExport OsnapMarker operator= (const OsnapMarker &om)
void  display (IPoint3 xyz, int markersize, GraphicsWindow *gw)

Constructor & Destructor Documentation

CoreExport OsnapMarker ( )
Remarks:
Constructor. The cache of marker points is set to NULL and the number of points is set to 0.
CoreExport ~OsnapMarker ( )
Remarks:
Destructor. If any marker points have been allocated for the cache they are freed.
CoreExport 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.
CoreExport 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.

Member Function Documentation

CoreExport OsnapMarker& operator= ( const OsnapMarker om )
Remarks:
Assignment operator.
Parameters:
const OsnapMarker& om

The OsnapMarker to assign.
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: