0028127: Visualization - transparent object breaks Z-Layer depth buffer clear
[occt.git] / samples / mfc / standard / Common / User_Cylinder.hxx
1 #ifndef _User_Cylinder_HeaderFile
2         #define _User_Cylinder_HeaderFile
3         #ifndef _Standard_Macro_HeaderFile
4         #include <Standard_Macro.hxx>
5 #endif
6
7 #include <AIS_InteractiveObject.hxx>
8 #include <Standard_DefineHandle.hxx>
9 #include <Standard_Macro.hxx>
10 #include <Graphic3d_AspectFillArea3d.hxx>
11 #include <Prs3d_Projector.hxx>
12 // Handle definition
13 //
14 class User_Cylinder;
15 DEFINE_STANDARD_HANDLE(User_Cylinder,AIS_InteractiveObject)
16
17 class User_Cylinder: public AIS_InteractiveObject {
18 public:
19         Standard_EXPORT User_Cylinder(const Standard_Real R, const Standard_Real H);
20         Standard_EXPORT User_Cylinder(const gp_Ax2 CylAx2, const Standard_Real R, const Standard_Real H);
21
22         ~User_Cylinder(){};
23         
24         Standard_Boolean AcceptShapeDecomposition() const;
25         void Standard_EXPORT SetCylindricalFaceColor(const Quantity_Color acolor);
26         void Standard_EXPORT SetPlanarFaceColor(const Quantity_Color);
27         Standard_Integer NbPossibleSelection() const;
28         void SetColor(const Quantity_Color &aColor);
29
30 private:
31         void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
32                                  const Handle(Prs3d_Presentation)& aPresentation,
33                                  const Standard_Integer aMode = 0) ;
34         void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
35                                                   const Standard_Integer aMode) ;
36         void Compute(const Handle(Prs3d_Projector)& aProjector,const Handle(Prs3d_Presentation)& aPresentation);
37         Standard_Boolean TriangleIsValid(const gp_Pnt& P1,const gp_Pnt& P2,const gp_Pnt& P3) const;
38         Quantity_Color Color(gp_Pnt& thePoint,Standard_Real AltMin,Standard_Real AltMax, const Standard_Integer ColorizationMode) ;
39                                                 
40 // some methods like DynamicType() or IsKind()
41 //
42 DEFINE_STANDARD_RTTIEXT(User_Cylinder,AIS_InteractiveObject)
43 private:
44 //      Quantity_NameOfColor myCylindricalFaceColor;
45 //      Quantity_NameOfColor myPlanarFaceColor;
46         Quantity_Color myCylindricalFaceColor;
47         Quantity_Color myPlanarFaceColor;
48         TopoDS_Shape myShape;
49
50         Handle(Graphic3d_AspectFillArea3d) myAspect;
51         Standard_Real myDeflection;
52
53         Standard_Boolean myX1OnOff;
54         Standard_Boolean myXBlueOnOff;
55         Standard_Boolean myXGreenOnOff;
56         Standard_Boolean myXRedOnOff;
57         Standard_Boolean myY1OnOff;
58         Standard_Boolean myYBlueOnOff;
59         Standard_Boolean myYGreenOnOff;
60         Standard_Boolean myYRedOnOff;
61         Standard_Boolean myZ1OnOff;
62         Standard_Boolean myZBlueOnOff;
63         Standard_Boolean myZGreenOnOff;
64         Standard_Boolean myZRedOnOff;
65
66         gp_Pnt BAR;
67
68         Standard_Real Umin;
69         Standard_Real Umax;
70         Standard_Real Vmin;
71         Standard_Real Vmax;
72         Standard_Real dUmax;
73         Standard_Real dVmax;
74
75         Standard_Real red;
76         Standard_Real green;
77         Standard_Real blue;
78
79
80
81 //Handle(Graphic3d_Texture2Dmanual) mytexture;
82
83 };
84 #endif