// File generated by CPPExt (Transient)
//
//
//                     Copyright (C) 1991 - 2000 by  
//                      Matra Datavision SA.  All rights reserved.
//  
//                     Copyright (C) 2001 - 2004 by
//                     Open CASCADE SA.  All rights reserved.
// 
// This file is part of the Open CASCADE Technology software.
//
// This software may be distributed and/or modified under the terms and
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
// and appearing in the file LICENSE included in the packaging of this file.
//  
// This software is distributed on an "AS IS" basis, without warranty of any
// kind, and Open CASCADE SA hereby disclaims all such warranties,
// including without limitation, any warranties of merchantability, fitness
// for a particular purpose or non-infringement. Please see the License for
// the specific terms and conditions governing rights and limitations under the
// License.

#ifndef _Voxel_Prs_HeaderFile
#define _Voxel_Prs_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Handle_Voxel_Prs_HeaderFile
#include <Handle_Voxel_Prs.hxx>
#endif

#ifndef _Standard_Address_HeaderFile
#include <Standard_Address.hxx>
#endif
#ifndef _AIS_InteractiveObject_HeaderFile
#include <AIS_InteractiveObject.hxx>
#endif
#ifndef _Handle_Poly_Triangulation_HeaderFile
#include <Handle_Poly_Triangulation.hxx>
#endif
#ifndef _Voxel_VoxelDisplayMode_HeaderFile
#include <Voxel_VoxelDisplayMode.hxx>
#endif
#ifndef _Handle_Quantity_HArray1OfColor_HeaderFile
#include <Handle_Quantity_HArray1OfColor.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Handle_PrsMgr_PresentationManager3d_HeaderFile
#include <Handle_PrsMgr_PresentationManager3d.hxx>
#endif
#ifndef _Handle_Prs3d_Presentation_HeaderFile
#include <Handle_Prs3d_Presentation.hxx>
#endif
#ifndef _Handle_SelectMgr_Selection_HeaderFile
#include <Handle_SelectMgr_Selection.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Byte_HeaderFile
#include <Standard_Byte.hxx>
#endif
class Poly_Triangulation;
class Quantity_Color;
class Quantity_HArray1OfColor;
class PrsMgr_PresentationManager3d;
class Prs3d_Presentation;
class SelectMgr_Selection;


//! Interactive object for voxels. <br>
class Voxel_Prs : public AIS_InteractiveObject {

public:
 // Methods PUBLIC
 // 

//! An empty constructor. <br>
Standard_EXPORT Voxel_Prs();

//! <theVoxels> is a Voxel_BoolDS* object. <br>
Standard_EXPORT   void SetBoolVoxels(const Standard_Address theVoxels) ;

//! <theVoxels> is a Voxel_ColorDS* object. <br>
Standard_EXPORT   void SetColorVoxels(const Standard_Address theVoxels) ;

//! Sets a triangulation for visualization. <br>
Standard_EXPORT   void SetTriangulation(const Handle(Poly_Triangulation)& theTriangulation) ;

//! Sets a display mode for voxels. <br>
Standard_EXPORT   void SetDisplayMode(const Voxel_VoxelDisplayMode theMode) ;

//! Defines the color of points, quadrangles ... for BoolDS. <br>
Standard_EXPORT virtual  void SetColor(const Quantity_Color& theColor) ;

//! Defines the color of points, quadrangles... for ColorDS. <br>
//!          For ColorDS the size of array is 0 .. 15. <br>
//!          0 - means no color, this voxel is not drawn. <br>
Standard_EXPORT   void SetColors(const Handle(Quantity_HArray1OfColor)& theColors) ;

//! Defines the size of points for all types of voxels. <br>
Standard_EXPORT   void SetPointSize(const Standard_Real theSize) ;

//! Defines the size of quadrangles in per cents (0 .. 100). <br>
Standard_EXPORT   void SetQuadrangleSize(const Standard_Integer theSize) ;

//! Defines the transparency value [0 .. 1] for quadrangular visualization. <br>
Standard_EXPORT virtual  void SetTransparency(const Standard_Real theTransparency) ;

//! Highlights a voxel. <br>
//!          It doesn't re-computes the whole interactive object, <br>
//!          but only marks a voxels as "highlighted". <br>
//!          The voxel becomes highlighted on next swapping of buffers. <br>
//!          In order to unhighlight a voxel, set ix = iy = iz = -1. <br>
Standard_EXPORT   void Highlight(const Standard_Integer ix,const Standard_Integer iy,const Standard_Integer iz) ;

//! A destructor of presentation data. <br>
Standard_EXPORT   void Destroy() ;
~Voxel_Prs()
{
  Destroy();
}


//! Simplifies visualization of voxels in case of view rotation, panning and zooming. <br>
Standard_EXPORT   void SetDegenerateMode(const Standard_Boolean theDegenerate) ;

//! GL lists accelerate view rotation, panning and zooming operations, but <br>
//!          it takes additional memory... <br>
//!          It is up to the user of this interactive object to decide whether <br>
//!          he has enough memory and may use GL lists or <br>
//!          he is lack of memory and usage of GL lists is not recommended. <br>
//!          By default, usage of GL lists is on. <br>
//!          Also, as I noticed, the view without GL lists looks more precisely. <br>
Standard_EXPORT   void SetUsageOfGLlists(const Standard_Boolean theUsage) ;

//! Switches visualization of points from smooth to rough. <br>
Standard_EXPORT   void SetSmoothPoints(const Standard_Boolean theSmooth) ;

//! Defines min-max values for visualization of voxels of ColorDS structure. <br>
//!          By default, min value = 1, max value = 15 (all non-zero values). <br>
Standard_EXPORT   void SetColorRange(const Standard_Byte theMinValue,const Standard_Byte theMaxValue) ;

//! Defines the displayed area of voxels. <br>
//!          By default, the range is equal to the box of voxels (all voxels are displayed). <br>
Standard_EXPORT   void SetSizeRange(const Standard_Real theDisplayedXMin,const Standard_Real theDisplayedXMax,const Standard_Real theDisplayedYMin,const Standard_Real theDisplayedYMax,const Standard_Real theDisplayedZMin,const Standard_Real theDisplayedZMax) ;




 // Type management
 //
 Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
 //Standard_EXPORT Standard_Boolean	       IsKind(const Handle(Standard_Type)&) const;

protected:

 // Methods PROTECTED
 // 


Standard_EXPORT virtual  void Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,const Handle(Prs3d_Presentation)& thePresentation,const Standard_Integer theMode = 0) ;


 // Fields PROTECTED
 //


private: 

 // Methods PRIVATE
 // 


Standard_EXPORT   void ComputeSelection(const Handle(SelectMgr_Selection)& theSelection,const Standard_Integer theMode) ;

//! Allocates the data structure of visualization. <br>
Standard_EXPORT   void Allocate() ;


 // Fields PRIVATE
 //
Standard_Address myVisData;


};





// other Inline functions and methods (like "C++: function call" methods)
//


#endif
