/***************************************************************************
 *                          Zanoza Modeler v2.x                            *
 *      This is unpublished propietary source code of Zanoza Software.     *
 *      The copyright notice does not evidence any actual or intended      *
 *                    publication of such source code.                     *
 *                                                                         *
 *                Copyright (c) 2002-2008 Zanoza Software.                 *
 *                                                                         *
 *                        All rights reserved.                             *
 ***************************************************************************
 *--------------------------------------------------------------------------
 * @author:   Oleg Melashenko
 *--------------------------------------------------------------------------
 * @purpose:  Declaration of the class IRenderTechnique
 *   Rendering technique is applied on object level and performs rendering of the
 *   object. Only one technique can be applied to an object, but it's behaviour can
 *   be customized and, optionally, extended with several IRenderExtentions.
 *   IRenderTechnique transparently inherits:
 *   - core::INamed
 *   [opt core::IConfiguration and core::IProfileable]
 *--------------------------------------------------------------------------
 * @created: Saturday, April 24, 2004 15:53:56
 */

#if !defined(IRenderTechnique_h_included)
#define IRenderTechnique_h_included
//forward declaration of this class might require
namespace rend
{ class IRenderTechnique; class CRenderTechniqueCol; };
#include <zmodeler.h>
#include <rend/renderTypes.h>
#include <scene/INode.h>
#include <core/ui/IViewport.h>
#include <rend/IRenderExtension.h>


namespace rend
{
  
  class IRenderTechnique : public ZUnknown
  {
  public:
    /* Verifies whether this technique is supported by device */
    virtual ZRESULT validate(IDevice* pDevice, scene::INode* pNode)=0;
    virtual ZRESULT nodeChange(scene::INode* pNode, DWORD dwBits)=0;
    /* Renders the node in supplied viewport */
    virtual ZRESULT renderNode(scene::INode* pNode, core::ui::IViewport* pViewport, IDevice* pDevice, ZMatrixSeq& matrixStack)=0;
    virtual ZRESULT addRenderExtension(rend::IRenderExtension* pExt)=0;
    /* Removes rendering extension. */
    virtual ZRESULT removeRenderExtension(rend::IRenderExtension* pExt)=0;
    virtual ZRESULT getRenderExtensions(rend::CRenderExtensionCol** ppCol)=0;
  
  };//class IRenderTechnique
  
  //
  // collection template
  //
  class CRenderTechniqueCol : public ZUnknown,
      public ZIntrCollection<IRenderTechnique>
  {
  public:
    INTERFACE_FUNCTIONS_DEFAULT(CRenderTechniqueCol)
  };//class CRenderTechniqueCol
};//rend

#endif
