This reference page is linked to from the following overview
topics: Snapping.
#include <osnaphit.h>
Class Description
- See also:
- Class IOsnapManager, Class Osnap, Class HitMesh, Class Point3, Class IPoint3, The Advanced Topics section on
Snapping.
- Description:
- This class encapsulates the data required to record a snapped
point. Typically a plug-in creates instances of this class and
records them with the OsnapManager. The manager is
responsible for freeing the memory associated with recorded hits.
All the methods of this class are implemented by the system. If a
snap plugin needs to record additional data for its hits, it should
derive from this class and provide a clone method which copies this
additional data and calls the base classes clone method.
Public Member Functions
|
CoreExport |
OsnapHit
(Point3 p3, Osnap *s, int sub, HitMesh *m) |
CoreExport |
OsnapHit
(Point3 pt) |
CoreExport |
OsnapHit
(const OsnapHit
&h) |
virtual
CoreExport OsnapHit
& |
operator=
(const OsnapHit
&h) |
virtual
CoreExport |
~OsnapHit
() |
virtual
CoreExport OsnapHit
* |
clone
() |
void |
setscreendata
(IPoint3 screen3, int
len) |
virtual
CoreExport boolean |
display
(ViewExp *vpt,
TimeValue
t, Point3 color, int
markersize, boolean markers=TRUE, boolean hilite=TRUE) |
CoreExport
void |
erase
(ViewExp *vpt,
TimeValue
t) const |
CoreExport
void |
GetViewportRect
(TimeValue
t, ViewExp *vpt,
Rect *rect, int marksize)
const |
CoreExport
Point3 |
GetHitpoint
() |
CoreExport
Point3 |
GetWorldHitpoint
() |
CoreExport
IPoint3 |
GetHitscreen
() |
CoreExport
int |
GetSubsnap
() |
CoreExport
POINT |
GetCursor
() |
INode * |
GetNode
() |
void |
Dump
() const |
CoreExport
BOOL |
operator<
(OsnapHit
&hit) |
CoreExport
BOOL |
operator>
(OsnapHit
&hit) |
void |
Update
(TimeValue
t) |
CoreExport
Point3 |
ReEvaluate
(TimeValue
t) |
virtual
bool |
IsWorldSpaceHit
() |
Friends
|
class |
OsnapManager |
class |
Osnap |
class |
TypedHit |
Constructor & Destructor Documentation
- Parameters:
- Point3
p3
The point that was hit in object space.
Osnap* s
Points to the Osnap
instance which made this hit.
int sub
The sub-snap index which made this hit.
HitMesh
*m
Points to the mesh used to hilite the topology that was hit.
virtual CoreExport ~OsnapHit |
( |
|
) |
[virtual] |
Member Function Documentation
virtual CoreExport OsnapHit* clone |
( |
|
) |
[virtual] |
void setscreendata |
( |
IPoint3 |
screen3, |
|
|
int |
len |
|
) |
|
|
- Parameters:
- IPoint3
screen3
The hit location in screen space.
int len
The distance from the cursor.
virtual CoreExport boolean display |
( |
ViewExp * |
vpt, |
|
|
TimeValue |
t, |
|
|
Point3 |
color, |
|
|
int |
markersize, |
|
|
boolean |
markers = TRUE , |
|
|
boolean |
hilite =
TRUE |
|
) |
|
[virtual] |
- Parameters:
- ViewExp
*vpt
The viewport to display in.
TimeValue t
The current time.
Point3
color
The color to draw it in.
int markersize
The relative size of the icon.
boolean markers = TRUE
Controls whether or not the hit icon is drawn.
boolean hilite = TRUE
Controls whether or not the mesh part of the hit is drawn.
Reimplemented in TypedHit.
- Parameters:
- TimeValue t
The time at which to compute the rectangle.
ViewExp
*vpt
The viewport in which to compute the rectangle.
Rect *rect
Points to storage for the computed result.
int marksize
The size of the icon.
CoreExport Point3 GetHitpoint |
( |
|
) |
[inline] |
CoreExport Point3 GetWorldHitpoint |
( |
|
) |
[inline] |
CoreExport IPoint3 GetHitscreen |
( |
|
) |
[inline] |
CoreExport int GetSubsnap |
( |
|
) |
[inline] |
CoreExport POINT GetCursor |
( |
|
) |
[inline] |
INode* GetNode |
( |
|
) |
[inline] |
CoreExport BOOL operator< |
( |
OsnapHit & |
hit |
) |
|
- Parameters:
- OsnapHit&
hit
The OsnapHit
to compare.
- Returns:
- TRUE if the distance from the cursor is less than hit;
otherwise checks if the depth in Z space is less than hit:
If so TRUE; otherwise FALSE.
CoreExport BOOL operator> |
( |
OsnapHit & |
hit |
) |
|
- Parameters:
- OsnapHit&
hit
The OsnapHit
to compare.
- Returns:
- TRUE if the distance from the cursor is less than hit;
otherwise checks if the depth in Z space is less than hit:
If so TRUE; otherwise FALSE.
- Parameters:
- TimeValue t
The time at which to reevaluate it.
- Returns:
- The updated point in world space.
virtual bool IsWorldSpaceHit |
( |
|
) |
[inline, virtual] |
Friends And Related Function Documentation
friend class OsnapManager
[friend] |
friend class Osnap [friend] |