/***************************************************************************
 *                          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 IPrimitive
 *   Interface of primitive. Each primitive can be rendered in wireframe(default) OR
 *   solid using a color OR material. Primitive is inherited from scene::ITransformable.
 *   If primitive is used in a node (INodePrimitive), then it's transform is added to
 *   node's transformation.
 *--------------------------------------------------------------------------
 * @created: Tuesday, June 24, 2003 16:28:00
 */

#if !defined(IPrimitive_h_included)
#define IPrimitive_h_included
//forward declaration of this class might require
namespace scene
{ class IPrimitive; };
#include <zmodeler.h>
#include <scene/zmSceneTypes.h>
#include <scene/ITransformable.h>
#include <scene/IMesh.h>


namespace scene
{
  // some common parameters:
  #define PRIMITIVE_PARAMETER_COLOR     _T("Color\ncolorBox")
  #define PRIMITIVE_PARAMETER_SOLID     _T("Solid\ncheckBox")
  #define PRIMITIVE_PARAMETER_MATERIAL  _T("Material\nnumericBox")
  
  class IPrimitive : public scene::ITransformable
  {
  public:
    /* Provides primitive's parameters set. Refer implementation-specific docs for
     * description of parameters content. */
    virtual ZRESULT getParameters(ZStringSeq& seqList)=0;
    /* Sets primitives parameters. Refer implementation-specific docs for details. */
    virtual ZRESULT setParameters(ZStringSeq& seqList)=0;
    /* By passing NULL in pszValue you deletes supplied parameter,
     * but most primitives doesn't allow deleteing paramters. */
    virtual ZRESULT setParameterValue(LPCTSTR pszName, LPCTSTR pszValue=NULL)=0;
    virtual ZRESULT queryParameter(LPCTSTR pszName, ZString& strValue)=0;
    virtual ZRESULT setColor(ZColor col)=0;
    virtual ZRESULT getColor(ZColor& col)=0;
    virtual ZRESULT setMaterial(long nMat)=0;
    virtual ZRESULT getMaterial(long& nMat)=0;
    virtual ZRESULT setRenderOptions(DWORD dwAddFlags, DWORD dwRemoveFlags)=0;
    virtual ZRESULT getRenderOptions(DWORD& dwRenderFlags)=0;
    virtual ZRESULT getMesh(scene::IMesh** ppMesh)=0;
  
  };//class IPrimitive
};//scene

#endif
