snap.h

Go to the documentation of this file.
00001 //
00002 // Copyright 2010 Autodesk, Inc.  All rights reserved.
00003 //
00004 // Use of this software is subject to the terms of the Autodesk license
00005 // agreement provided at the time of installation or download, or which
00006 // otherwise accompanies this software in either electronic or hard copy form.  
00007 //
00008 //
00009 
00010 #pragma once
00011 
00012 #include "maxheap.h"
00013 #include <WTypes.h>
00014 #include "matrix3.h"
00015 #include "point2.h"
00016 
00017 
00019 
00020 #define SNAP_2D 1       //!< 2 dimensional Snap
00021 #define SNAP_25D    2   //!< 2.5 dimensional Snap
00022 #define SNAP_3D 3       //!< 3 dimensional Snap
00023 
00024 
00026 
00028 #define SNAPMODE_RELATIVE   0   //!< Relative snap mode.
00029 #define SNAPMODE_ABSOLUTE   1   //!< Absolute snap mode.
00030 
00031 
00033 
00034 #define SNAP_IN_3D                              (0)         //!< Snap to all points.
00035 #define SNAP_IN_PLANE                           (1<<0)      //!< Snap only to points on the construction (or optionally specified) plane.
00036 #define SNAP_UNSEL_OBJS_ONLY            (1<<1)              //!< Ignore selected nodes when considering snap points.
00037 #define SNAP_SEL_OBJS_ONLY              (1<<2)              //!< Ignore unselected nodes when considering snap points.
00038 #define SNAP_UNSEL_SUBOBJ_ONLY      (1<<3)                  //!< Ignore selected sub-object geometry when considering snap points.
00039 #define SNAP_SEL_SUBOBJ_ONLY            (1<<4)              //!< Ignore unselected sub-object geometry when considering snap points.
00040 #define SNAP_FORCE_3D_RESULT            (1<<5)              //!< Override user settings to force snap in 3D
00041 
00049 #define SNAP_OFF_PLANE                      (1<<6)          
00050 
00054 #define SNAP_TRANSPARENTLY              (1<<7)              
00055 #define SNAP_APPLY_CONSTRAINTS      (1<<8)                  //!< \internal Used internally to suppresses any display in the viewports.
00056 #define SNAP_PROJ_XAXIS                     (1<<9)          //!< \internal Used internally to suppresses any display in the viewports.
00057 #define SNAP_PROJ_YAXIS                     (1<<10)         //!< \internal Used internally to suppresses any display in the viewports.
00058 #define SNAP_PROJ_ZAXIS                     (1<<11)         //!< \internal Used internally to suppresses any display in the viewports.
00059 #define SNAP_XFORM_AXIS                     (1<<12)         //!< Informs the osnapmanager to invalidate the com axis
00060 #define SNAP_BEGIN_SEQ                      (1<<13) 
00061 #define SNAP_END_SEQ                        (1<<14) 
00062 
00067 #define SNAP_USE_XFORM_AXIS_AS_START_SNAP_POINT (1<<16) 
00068 
00069 
00073 struct SnapInfo: public MaxHeapOperators 
00074 {
00075     int snapType;           
00076     int strength;           
00077     int vertPriority;       
00078     int edgePriority;       
00079     int gIntPriority;       
00080     int gLinePriority;      
00081     DWORD flags;            
00082     Matrix3 plane;          
00083     Point3 bestWorld;       
00084     Point2 bestScreen;      
00085     int bestDist;           
00086     int priority;           
00087 };
00088