istddualvs.h

Go to the documentation of this file.
00001 /**********************************************************************
00002  *<
00003     FILE: IStdDualVS.h
00004 
00005     DESCRIPTION: Standard Dual VertexShader helper class interface definition
00006 
00007     CREATED BY: Nikolai Sander, Discreet
00008 
00009     HISTORY: created 10/11/00
00010 
00011  *> Copyright (c) 2000, All Rights Reserved.
00012  **********************************************************************/
00013 
00014 #pragma once
00015 
00016 #include "maxheap.h"
00017 #include "IHardwareShader.h"
00018 #include "ref.h"
00019 #include "plugapi.h"
00020 
00021 #define STD_DUAL_VERTEX_SHADER Class_ID(0x40e6b1a0, 0x549cbf06)
00022 
00023 class VertexShaderCache: public MaxHeapOperators
00024 {
00025     bool valid;
00026     INode *node;
00027 public:
00028     VertexShaderCache(){ node = NULL; valid = false;}
00029     ~VertexShaderCache(){}
00030     INode *GetNode() { return node;}
00031     void SetNode(INode *node) { this->node = node;}
00032     bool GetValid() { return valid;}
00033     void SetValid(bool valid) { this->valid = valid;}   
00034 };
00035 
00036 
00037 class IStdDualVSCallback: public MaxHeapOperators
00038 {
00039 public:
00040     virtual ReferenceTarget *GetRefTarg()=0;
00041     virtual VertexShaderCache *CreateVertexShaderCache()=0;
00042     virtual HRESULT InitValid(Mesh* mesh, INode *node)=0;
00043     virtual HRESULT InitValid(MNMesh* mnmesh, INode *node)=0;
00044     virtual void DeleteRenderMeshCache(INode * node) { UNUSED_PARAM(node); };
00045 };
00046 
00047 class IStdDualVS : public IVertexShader, public ReferenceMaker
00048 {
00049 public:
00050     virtual ~IStdDualVS(){};    
00051     virtual void SetCallback(IStdDualVSCallback *callback)=0;
00052     virtual int FindNodeIndex(INode *node)=0;
00053     virtual Class_ID ClassID(){ return STD_DUAL_VERTEX_SHADER;}
00054     virtual SClass_ID SuperClassID() { return REF_MAKER_CLASS_ID;}
00055     virtual void DeleteThis()=0;
00056 };
00057