IPFRender.h

Go to the documentation of this file.
00001 
00007 /**********************************************************************
00008  *<
00009     CREATED BY: Oleg Bayborodin
00010 
00011     HISTORY: created 01-29-02
00012 
00013  *> Copyright (c) 2001, All Rights Reserved.
00014  **********************************************************************/
00015 
00016 #pragma once
00017 
00018 #include "PFExport.h"
00019 #include "..\ifnpub.h"
00020 #include "..\triobj.h"
00021 
00022 PFExport Object* GetPFObject(Object* obj);
00023 // interface ID
00024 #define PFRENDER_INTERFACE Interface_ID(0x75aa7a7f, 0x19c66a0a)
00025 #define GetPFRenderInterface(obj) ((IPFRender*)((GetPFObject(obj))->GetInterface(PFRENDER_INTERFACE))) 
00026 
00027 class IPFRender : public FPMixinInterface
00028 {
00029 
00030 public:
00046     virtual int HasRenderableGeometry() { return(1); }
00047 #pragma warning(push)
00048 #pragma warning(disable:4100)
00049 
00052     virtual int IsInstanceDependent(IObject* pCont, Object* pSystem) { return 0; }
00053 
00059     virtual Mesh* GetRenderMesh(IObject* pCont, TimeValue t, Object* pSystem, INode *inode, View& view, BOOL& needDelete) = 0;
00060 
00066     virtual int NumberOfRenderMeshes(IObject* pCont, TimeValue t, Object* pSystem) { return 0; } // 0 indicates multiple meshes not supported.
00067 
00073       virtual   Mesh* GetMultipleRenderMesh(IObject* pCont, TimeValue t, Object* pSystem, INode *inode, View& view, BOOL& needDelete, int meshNumber) { return NULL; }
00074 
00081     virtual void GetMultipleRenderMeshTM(IObject* pCont, TimeValue t, Object* pSystem, INode *inode, View& view, int meshNumber, 
00082                     Matrix3& meshTM, Interval& meshTMValid) { return;  }
00083 
00087     virtual PatchMesh* GetRenderPatchMesh(IObject* pCont, TimeValue t, Object* pSystem, INode *inode, View& view, BOOL& needDelete) { return NULL; }
00088 
00092     virtual Class_ID PreferredCollapseType(IObject* pCont, Object* pSystem) { return triObjectClassID; }
00093 
00097     virtual BOOL CanDoDisplacementMapping(IObject* pCont, Object* pSystem) { return 0; }
00098 #pragma warning(pop)
00099 
00103     FPInterfaceDesc* GetDesc() { return GetDescByID(PFRENDER_INTERFACE); }
00104 };
00105 
00106 inline IPFRender* PFRenderInterface(Object* obj) {
00107     return ((obj == NULL) ? NULL : GetPFRenderInterface(obj));
00108 };
00109 
00110 inline IPFRender* PFRenderInterface(INode* node) {
00111     return ((node == NULL) ? NULL : PFRenderInterface(node->GetObjectRef()));
00112 };
00113 
00114 
00115