Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #pragma once
00014
00015 #include "mouseman.h"
00016 #include "point3.h"
00017 #include "matrix3.h"
00018 #include "maxapi.h"
00019
00020
00021 class Object;
00022 class ViewExp;
00023
00106 class DataEntryMouseProc : public MouseCallBack {
00107 public:
00116 CoreExport DataEntryMouseProc(Object* pObj, int cursor, HINSTANCE hInst);
00117
00127 CoreExport DataEntryMouseProc();
00128
00129
00146 CoreExport virtual BOOL OnPointSelected() {return TRUE; }
00147
00154 CoreExport virtual void OnMouseMove(Point3& p) { UNUSED_PARAM(p); }
00155
00161 CoreExport virtual BOOL AllowAnyViewport() { return TRUE; }
00162
00167 CoreExport virtual void RemoveLastPoint() {}
00168
00181 CoreExport virtual int OnMouseAbort() { return CREATE_ABORT; }
00182
00183
00189 CoreExport virtual BOOL PerformRedraw() { return TRUE; }
00190
00191
00192
00193
00207 CoreExport virtual void SetUseConstructionLine(BOOL useLine) = 0;
00208
00218 CoreExport virtual void SetConstructionLine(int i, Point3 p) = 0;
00219
00220
00247 CoreExport int proc(HWND hwnd, int msg, int point, int flags, IPoint2 m );
00248
00249 friend class DataEntryBackspaceUser;
00250
00259 CoreExport void ClearCreationParams();
00260
00266 CoreExport void SetParams(HINSTANCE hInst, Object* pObj, int cursor);
00267
00268 private:
00269 Point3 GetPoint(IPoint2 m, HWND hWnd, ViewExp* pVpt);
00270 void SetOffsetBase(IPoint2 m, HWND hWnd, ViewExp* pVpt);
00271 BOOL GetNodeTM(Matrix3& tm);
00272 IPoint2 ProjectPointToViewport(ViewExp *pVpt, Point3 fp);
00273 IPoint2 AngleSnapPoint(Point3 in3, ViewExp* pVpt);
00274
00275
00276
00277 Matrix3 mTM;
00278
00279
00280 BOOL mDoNotDouble;
00281
00282 int mCursor;
00283
00284 HINSTANCE mInstance;
00285
00286
00287 Point3 mSnappedPoint;
00288 Matrix3 mOriginalViewTM;
00289
00290 int mPreviousFlags;
00291
00292 protected:
00293
00294 Object* mpObject;
00295
00296
00297 int mMouseClick;
00298
00299 Tab<Point3> mPoints;
00300
00301 Tab<IPoint2> mClickPoints;
00302
00303 BOOL mLiftOffCP;
00304
00305 HWND mHwnd;
00306 IPoint2 mLastMovePoint;
00307 };