dummy.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /**********************************************************************
  2. *<
  3. FILE: dummy.h
  4. DESCRIPTION:
  5. CREATED BY: Dan Silva
  6. HISTORY:
  7. *> Copyright (c) 1994, All Rights Reserved.
  8. **********************************************************************/
  9. #ifndef __DUMMY__H
  10. #define __DUMMY__H
  11. extern CoreExport Class_ID dummyClassID;
  12. class DummyObject: public HelperObject {
  13. friend class DummyObjectCreateCallBack;
  14. friend BOOL CALLBACK DummyParamDialogProc( HWND hDlg, UINT message,
  15. WPARAM wParam, LPARAM lParam );
  16. // Mesh cache
  17. Mesh mesh;
  18. long dumFlags;
  19. Point3 color;
  20. Box3 box;
  21. void BuildMesh();
  22. void UpdateMesh();
  23. // inherited virtual methods for Reference-management
  24. RefResult NotifyRefChanged( Interval changeInt, RefTargetHandle hTarget,
  25. PartID& partID, RefMessage message );
  26. public:
  27. CoreExport DummyObject();
  28. CoreExport Box3 GetBox() const;
  29. CoreExport void SetBox(Box3& b);
  30. CoreExport void SetColor(Point3 color);
  31. CoreExport void EnableDisplay();
  32. CoreExport void DisableDisplay();
  33. // inherited virtual methods:
  34. // From BaseObject
  35. CoreExport int HitTest(TimeValue t, INode* inode, int type, int crossing, int flags, IPoint2 *p, ViewExp *vpt);
  36. CoreExport void Snap(TimeValue t, INode* inode, SnapInfo *snap, IPoint2 *p, ViewExp *vpt);
  37. CoreExport int Display(TimeValue t, INode* inode, ViewExp *vpt, int flags);
  38. CoreExport CreateMouseCallBack* GetCreateMouseCallBack();
  39. CoreExport RefTargetHandle Clone(RemapDir& remap = NoRemap());
  40. // From Object
  41. CoreExport ObjectState Eval(TimeValue time);
  42. void InitNodeName(TSTR& s);
  43. int DoOwnSelectHilite() {return 1; }
  44. int IsRenderable(){ return 0; }
  45. TCHAR *GetObjectName();
  46. // From Object
  47. CoreExport void GetWorldBoundBox(TimeValue t, INode *mat, ViewExp *vpt, Box3& box );
  48. CoreExport void GetLocalBoundBox(TimeValue t, INode *mat, ViewExp *vpt, Box3& box );
  49. CoreExport void GetDeformBBox(TimeValue t, Box3& box, Matrix3 *tm, BOOL useSel=FALSE );
  50. // IO
  51. CoreExport IOResult Save(ISave *isave);
  52. CoreExport IOResult Load(ILoad *iload);
  53. // Animatable methods
  54. void DeleteThis() { delete this; }
  55. Class_ID ClassID() { return dummyClassID; }
  56. void GetClassName(TSTR& s);
  57. int IsKeyable(){ return 1;}
  58. LRESULT CALLBACK TrackViewWinProc( HWND hwnd, UINT message,
  59. WPARAM wParam, LPARAM lParam ){return(0);}
  60. };
  61. CoreExport ClassDesc* GetDummyObjDescriptor();
  62. #endif // __DUMMY__H