/***************************************************************************
 *                          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 IManipulator
 *   A control point that user can affect with the mouse.
 *   IManipulator transparently inherits:
 *   - core::INamed
 *   - core::IStatus
 *   - scene::ITransformable
 *--------------------------------------------------------------------------
 * @created: Saturday, March 08, 2003 17:02:20
 */

#if !defined(IManipulator_h_included)
#define IManipulator_h_included
//forward declaration of this class might require
namespace scene
{ class IManipulator; class CManipulatorCol; };
#include <zmodeler.h>
#include <scene/zmSceneTypes.h>
#include <scene/ITransformable.h>
#include <scene/INode.h>
#include <core/ui/IViewport.h>


namespace scene
{
  
  class IManipulator : public scene::ITransformable, public ZEntityBase
  {
  public:
    virtual ZRESULT getParent(scene::INode** ppParent)=0;
    /* Performs hit-test on manipulator. Supplied line is in world-space coordinates.
     * manipulator can convert it to screen/local coords to perform hit-test */
    virtual ZRESULT hitTest(core::ui::IViewport* pV, ZLine3D line, float fPrecision, ZMatrix* pMatNode=NULL, ZMatrix* pMatView=NULL)=0;
    virtual ZRESULT getDisplayTransform(core::ui::IViewport* pV, ZMatrix& matDisplay, ZMatrix* pMatNode=NULL, ZMatrix* pMatView=NULL)=0;
  
  };//class IManipulator
  
  //
  // collection template
  //
  class CManipulatorCol : public ZUnknown,
      public ZIntrCollection<IManipulator>
  {
  public:
    INTERFACE_FUNCTIONS_DEFAULT(CManipulatorCol)
  };//class CManipulatorCol
};//scene

#endif
