IPFViewport.h

Go to the documentation of this file.
00001 
00007 /**********************************************************************
00008  *<
00009     CREATED BY: Oleg Bayborodin
00010 
00011     HISTORY: created 11-07-01
00012 
00013  *> Copyright (c) 2001, All Rights Reserved.
00014  **********************************************************************/
00015 
00016 #pragma once
00017 
00018 #include "PFExport.h"
00019 #include "..\object.h"
00020 
00021 
00025 #define IPFVIEWPORT_EXTENTION_INTERFACE_ID Interface_ID (0x18983f5a, 0x4fd2515e)
00026 
00031 class IPFViewportExtention : public BaseInterface
00032 {
00033 public:
00034     IPFViewportExtention() {}
00035     virtual ~IPFViewportExtention() {}
00036 
00037 public:
00049     virtual bool UpdateDisplay(
00050         unsigned long renderItemCategories, 
00051         const MaxSDK::Graphics::MaterialRequiredStreams& materialRequiredStreams, 
00052         TimeValue t, 
00053         IObject* pCont, 
00054         Object* pSystem, 
00055         MaxSDK::Graphics::RenderItemHandleArray &renderItemHandleArray, 
00056         Tab<Matrix3> &matrices) 
00057     {
00058         return false;
00059     }
00060 };
00061 
00062 
00063 PFExport Object* GetPFObject(Object* obj);
00064 // interface ID
00065 #define PFVIEWPORT_INTERFACE Interface_ID(0x1a340cb9, 0x26d12e01) 
00066 #define GetPFViewportInterface(obj) ((IPFViewport*)((GetPFObject(obj))->GetInterface(PFVIEWPORT_INTERFACE))) 
00067 
00068 class IPFViewport : public FPMixinInterface
00069 {
00070 
00071 public:
00087     virtual int Display(IObject* pCont, TimeValue time, Object* pSystem, INode* psNode, INode* pgNode, ViewExp *vpt, int flags) = 0;
00088 
00092     virtual int HitTest(IObject* pCont, TimeValue time, Object* pSystem, INode* psNode, INode* pgNode, int type, int crossing, int flags, IPoint2 *p, ViewExp *vpt) = 0;
00093 
00097     virtual void GetWorldBoundBox(IObject* pCont, TimeValue time, Object* pSystem, INode* pgNode, ViewExp* vp, Box3& box ) = 0;
00098 
00102     virtual void GetLocalBoundBox(IObject* pCont, TimeValue time, Object* pSystem, INode* pgNode, ViewExp* vp, Box3& box ) = 0;
00103 
00107     virtual DWORD GetWireColor() const = 0;
00108 
00112     virtual void SetWireColor(DWORD color) = 0;
00113 #pragma warning(push)
00114 #pragma warning(disable:4100)
00115 
00118     virtual void MaybeEnlargeViewportRect(IObject* pCont, TimeValue time, GraphicsWindow *gw, Rect &rect) { ; }
00119 #pragma warning(pop)
00120 
00123     FPInterfaceDesc* GetDesc() { return GetDescByID(PFVIEWPORT_INTERFACE); }
00124 };
00125 
00126 inline IPFViewport* PFViewportInterface(Object* obj) {
00127     return ((obj == NULL) ? NULL : GetPFViewportInterface(obj));
00128 };
00129 
00130 inline IPFViewport* PFViewportInterface(INode* node) {
00131     return ((node == NULL) ? NULL : PFViewportInterface(node->GetObjectRef()));
00132 };
00133