IGeometryChecker.h

Go to the documentation of this file.
00001 
00002 /*==============================================================================
00003 Copyright 2008 Autodesk, Inc.  All rights reserved.
00004 Use of this software is subject to the terms of the Autodesk license agreement provided at the time of installation or download,
00005 or which otherwise accompanies this software in either electronic or hard copy form.   
00006 *****************************/
00007 // DESCRIPTION: Interface to the Geometry Checker
00008 // AUTHOR: Michael Zyracki created 2008
00009 //***************************************************************************/
00010 
00011 #pragma once
00012 #include "stdio.h"
00013 #include "Maxapi.h"
00014 #include "maxheap.h"
00015 #include "ifnpub.h"
00016 #include "iparamb2.h"
00017 
00019 
00024 class IGeometryChecker : virtual public BaseInterface
00025 {
00026 public:
00027 
00029     virtual ~IGeometryChecker(){};
00030 
00033     enum ReturnVal{eFail = 0x0, eVertices = 0x1, eEdges = 0x2, eFaces = 0x3};
00034 
00037     struct OutputVal
00038     {
00039         Tab<int> mIndex;
00040     };
00041 
00045     virtual bool IsSupported(INode* node) =0;
00046 
00050     virtual ReturnVal TypeReturned() =0;
00051 
00058     virtual ReturnVal GeometryCheck(TimeValue t,INode *node, OutputVal &val) =0;
00059 
00061     virtual MSTR GetName() =0;
00062 
00064     virtual DWORD GetCheckerID() =0;
00065 
00067     virtual bool HasPropertyDlg() =0;
00069     virtual void ShowPropertyDlg() =0;
00070 
00071 
00073 
00074 
00075 
00076     virtual bool HasTextOverride()=0;
00078     virtual MSTR TextOverride()=0;
00079 
00082     virtual bool HasDisplayOverride()=0;
00088     virtual void DisplayOverride(TimeValue t, INode* node, HWND hwnd,Tab<int> &results)=0;
00090 };
00091 
00092 
00095 #define IGEOMETRYCHECKER_MANAGER_INTERFACE Interface_ID(0x3643717a, 0x596f106f)
00096 
00098 #define GetIGeometryCheckerManager()    static_cast<IGeometryCheckerManager*>(GetCOREInterface(IGEOMETRYCHECKER_MANAGER_INTERFACE))
00099 
00100 
00102 
00105 class IGeometryCheckerManager : public FPStaticInterface
00106 {
00107 public:
00108 
00110 
00111 
00112 
00113 
00114     virtual int RegisterGeometryChecker(IGeometryChecker * geomChecker) =0;
00117     virtual void UnRegisterGeometryChecker(IGeometryChecker *geomChecker) =0;
00119     virtual int GetNumRegisteredGeometryCheckers()const =0;
00121 
00123 
00124 
00127     virtual void SetGeometryCheckerOn(bool on)=0;
00129     virtual bool GetGeometryCheckerOn()const=0;
00133     virtual void SetSeeThrough(bool val) =0;
00136     virtual bool GetSeeThrough()const =0;
00140     virtual void SetAutoUpdate(bool val) =0;
00142     virtual bool GetAutoUpdate()const =0;
00145     virtual void SetDisplayTextUpTop(bool val) =0;
00147     virtual bool GetDisplayTextUpTop()const =0;
00149 
00153     virtual IGeometryChecker * GetNthGeometryChecker(int index)const =0;
00157     virtual MSTR GetNthGeometryCheckerName(int index)const =0;
00158 
00162     virtual bool ActivateGeometryChecker( int index) =0;
00164     virtual int GetActivatedGeometryCheckerIndex()const =0;
00165 
00169     virtual bool DoesGeometryCheckerHavePropDlg(int index)const=0;
00172     virtual void ShowGeometryCheckerPropDlg(int index)=0;
00173 
00176     virtual void RunGeometryCheck(TimeValue t) = 0;
00177 
00184     virtual  IGeometryChecker::ReturnVal GeometryCheck(TimeValue t,INode *node, IGeometryChecker::OutputVal &val) = 0;
00185 
00188     virtual void PopupMenuSelect() = 0;
00189 
00191 
00192 
00193     virtual IGeometryChecker::ReturnVal GetCurrentReturnVal()=0;
00195     virtual int GetCurrentOutputCount()=0;
00197     virtual MSTR GetCurrentString() = 0;
00199 
00203     virtual void SelectResults(TimeValue t) = 0;
00204 
00205 
00213     virtual void DisplayResults(Color *overrideColor, TimeValue t,INode *node, HWND hwnd, IGeometryChecker::ReturnVal type,Tab<int> &indices)=0;
00214 
00218     virtual DWORD GetNextValidGeometryCheckerID() =0;
00219 };
00220 
00221 
00222 
00223 
00224 
00225 
00226 
00227