/***************************************************************************
 *                          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 Zanoza Software.                   *
 *                                                                         *
 *                        All rights reserved.                             *
 ***************************************************************************
 *--------------------------------------------------------------------------
 * @author:   Oleg Melashenko
 *--------------------------------------------------------------------------
 * @purpose:
   *--------------------------------------------------------------------------
 * @created: Saturday, March 08, 2003 17:06:47
 */

#if !defined(zmSceneTypes_h_included)
#define zmSceneTypes_h_included

#include <zmodeler.h>

#define VERTEX_HAS_POSITION       0x00000001
#define VERTEX_HAS_NORMAL         0x00000002
#define VERTEX_HAS_1COLOR         0x00000004
#define VERTEX_HAS_2COLOR        (0x00000008 | VERTEX_HAS_1COLOR)
#define VERTEX_HAS_1UV            0x00000010
#define VERTEX_HAS_2UV           (0x00000020 | VERTEX_HAS_1UV)
#define VERTEX_HAS_3UV           (0x00000040 | VERTEX_HAS_1UV | VERTEX_HAS_2UV)
#define VERTEX_HAS_4UV           (0x00000080 | VERTEX_HAS_1UV | VERTEX_HAS_2UV | VERTEX_HAS_3UV)
#define VERTEX_HAS_1BONE          0x00001000
#define VERTEX_HAS_2BONE         (0x00002000 | VERTEX_HAS_1BONE)
#define VERTEX_HAS_3BONE         (0x00004000 | VERTEX_HAS_1BONE | VERTEX_HAS_2BONE)
#define VERTEX_HAS_4BONE         (0x00008000 | VERTEX_HAS_1BONE | VERTEX_HAS_2BONE | VERTEX_HAS_3BONE)
#define VERTEX_HAS_SNORMAL        0x00010000
#define VERTEX_HAS_TNORMAL        0x00020000

#define VERTEX_FORMAT_HAS(f,n) ((n) == ((f)&(n)))

//node's changes bits
#define NC_GEOMETRY               0x00000001
#define NC_VISUAL                 0x00000002
#define NC_CHILD                  0x00000004
#define NC_TRANSFORM              0x00000008

namespace scene
{
  class INode;
  typedef ZSequence< ZPtr<INode> >    tNodeSeq;

  //
  // Light type:
  //
  enum eLightType
  {
    LIGHT_AMBIENT,
    LIGHT_DIRECTIONAL,
    LIGHT_POINT,
    LIGHT_SPOT
  };

  //
  // operations on the node
  //
  enum eNodeOperation
  {
    NOP_ADD_CHILD,
    NOP_REMOVE_CHILD,
    NOP_MOVE_CHILD,   //inplace sorting
    NOP_CHANGE_PARENT
  };

  //
  // splines specific types
  //
  enum eControlPoint
  {
    SCP_BEZIER,
    SCP_BEZIERCORNER,
    SCP_CORNER
  };

  enum eControlVector
  {
    SCV_U0=0,// outgoing
    SCV_U1=1,// incoming
    SCV_V0=2,// outgoing : surface only
    SCV_V1=3 // incoming : surface only
  };

  //
  // Skeleton Positioning Mode
  //
  enum eSkeletonMode
  {
    SPM_SKINPOS = 0x01,  //this mode affects our local matrix.
    SPM_DEFAULT = 0x02,  //this mode affects relative matrix.
    SPM_IK      = 0x08,  //enables IK in transformations
  };
#define SPM_IK_ENABLED(mode) (((mode)&scene::SPM_IK) == scene::SPM_IK)
#define SPM_IS_SKINPOS(mode) (((mode)&scene::SPM_SKINPOS) == scene::SPM_SKINPOS)
#define SPM_SET_MODE(mode)   (scene::eSkeletonMode)(mode)

#define Z3D_SCENE_RESOLVATION   _T("ZModeler::Scene")

};//scene

#endif