/***************************************************************************
 *                          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-2003 Zanoza Software.                 *
 *                                                                         *
 *                        All rights reserved.                             *
 ***************************************************************************
 *--------------------------------------------------------------------------
 * @author:   Oleg M.
 *--------------------------------------------------------------------------
 * @purpose:  ZModeler 2.x rend:: helpers
 *--------------------------------------------------------------------------
 * @histroy: 02.07.2003. Created
 */
#ifndef rendhelper_h_included
#define rendhelper_h_included

#include <zmodeler.h>
#include <rend/IRenderExtension.h>
#include <core/INamed.h>

namespace rend
{
  //---------------------------------------
  // The Base class for render extensions
  //---------------------------------------
  class DLL_LINKAGE CRenderExtension :  public rend::IRenderExtension,
                                        public core::INamed
  {
  public:
    INTERFACE_DECLAREMAP(CRenderExtension)
  public:
    CRenderExtension();
    virtual ~CRenderExtension();
  public:
  //-----------------------
  // rend::IRenderExtension
  //-----------------------
    virtual ZRESULT validate(IDevice* pDevice, scene::INode* pNode);
    virtual ZRESULT supportPolyLevel(void);
    virtual ZRESULT isVisual(void);
    virtual ZRESULT polyLevelPriority(core::ePriority& prior);
    virtual ZRESULT getBitValue(DWORD& nBit);
    virtual ZRESULT setBitValue(DWORD nBit);
    virtual ZRESULT beginRender(bool bTopLevel, core::ui::IViewport* vport, IDevice* device, scene::INode* pNode = NULL);
    virtual ZRESULT endRender(bool bTopLevel, core::ui::IViewport* vport, IDevice* device, scene::INode* pNode = NULL);
  public:
  //-----------------------
  // core::INamed
  //-----------------------
    virtual ZRESULT getName(ZString& str);
    virtual ZRESULT setName(ZString str);
    virtual ZRESULT getTitle(ZString& str);
    virtual ZRESULT setTitle(ZString str);
    virtual ZRESULT getDescription(ZStringSeq& seqDesc);
    virtual ZRESULT setDescription(ZStringSeq& seqDesc);

  protected:
    //
    // data members:
    //
    core::ePriority m_prior;
    ZString         m_strName, m_strTitle;
    ZStringSeq      m_seqDesc;
    bool            m_bPolyLevel;
    bool            m_bVisual;
    DWORD           m_dwBitValue;
  };//class
};//rend


#endif //rendhelper_h_included



