#pragma once #include "MAXProxies.hpp" namespace MAXProxies { class MAXScene; class MAXPolygonMesh; // //######################################################################### //######################### MAXPolygon ############################### //######################################################################### // class MAXPolygon: public Proxies::PolygonProxy { public: static void InitializeClass(); static void TerminateClass(); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Constructors // public: static MAXPolygon* MakeProxy( MAXPolygonMesh *mesh, Face *polygon, int index ) {return new MAXPolygon(mesh, polygon, index);} void Destroy(); void* operator new(size_t) {return AllocatedMemory->New();} void operator delete(void *where) {AllocatedMemory->Delete(where);} protected: MAXPolygon( MAXPolygonMesh *mesh, Face *polygon, int index ); ~MAXPolygon(); static Stuff::MemoryBlock *AllocatedMemory; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class Data Support // public: static ClassData *DefaultData; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Testing // public: void TestInstance() const; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Polygon management functions // public: // // state functions // // Proxies::StateProxy* // UseStateProxy(); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // multi layer support // public: unsigned UseMultiState(Proxies::MultiState *states); void SetStatesToMatch( const Proxies::MultiState &states ){}; // // Traversal functions // MAXPolygonMesh* GetPolygonMeshProxy() { Check_Object(this); return Cast_Pointer(MAXPolygonMesh*,meshProxy); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Polygon vertex functions // public: // // Get the number of vertices in the polygon // unsigned UseIndexArray(Stuff::DynamicArrayOf *indices); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Polygon functions // public: // // group functions // void AddToCollection(const char *collection); void RemoveFromCollection(const char *collection); void GetCollections(Proxies::MStringChain *collection_list); bool IsMemberOf(const char *collection); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Local implementation details // public: Face* GetProxiedPolygon() {Check_Object(this); return proxiedPolygon;} static Face* AllocateRecord(); protected: Face *proxiedPolygon; int faceIndex; }; }