0031431: Visualization, PrsMgr_PresentableObject - simplify HLR computing interface
[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 // Handle definition
12 //
13 class User_Cylinder;
14 DEFINE_STANDARD_HANDLE(User_Cylinder,AIS_InteractiveObject)
15
16 class User_Cylinder: public AIS_InteractiveObject {
17 public:
18         Standard_EXPORT User_Cylinder(const Standard_Real R, const Standard_Real H);
19         Standard_EXPORT User_Cylinder(const gp_Ax2 CylAx2, const Standard_Real R, const Standard_Real H);
20
21         ~User_Cylinder(){};
22         
23         Standard_Boolean AcceptShapeDecomposition() const;
24         Standard_Integer NbPossibleSelection() const;
25         void SetColor(const Quantity_Color &aColor);
26
27 private:
28         void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
29                                  const Handle(Prs3d_Presentation)& aPresentation,
30                                  const Standard_Integer aMode = 0) ;
31         void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
32                                                   const Standard_Integer aMode) ;
33         void computeHLR (const Handle(Graphic3d_Camera)& aProjector, const Handle(Geom_Transformation)& theTrsf, const Handle(Prs3d_Presentation)& aPresentation);
34         Standard_Boolean TriangleIsValid(const gp_Pnt& P1,const gp_Pnt& P2,const gp_Pnt& P3) const;
35         Quantity_Color Color(gp_Pnt& thePoint,Standard_Real AltMin,Standard_Real AltMax, const Standard_Integer ColorizationMode) ;
36                                                 
37 // some methods like DynamicType() or IsKind()
38 //
39 DEFINE_STANDARD_RTTIEXT(User_Cylinder,AIS_InteractiveObject)
40 private:
41         Quantity_Color myColor;
42         TopoDS_Shape myShape;
43
44         Handle(Graphic3d_AspectFillArea3d) myAspect;
45         Standard_Real myDeflection;
46
47         Standard_Boolean myX1OnOff;
48         Standard_Boolean myXBlueOnOff;
49         Standard_Boolean myXGreenOnOff;
50         Standard_Boolean myXRedOnOff;
51         Standard_Boolean myY1OnOff;
52         Standard_Boolean myYBlueOnOff;
53         Standard_Boolean myYGreenOnOff;
54         Standard_Boolean myYRedOnOff;
55         Standard_Boolean myZ1OnOff;
56         Standard_Boolean myZBlueOnOff;
57         Standard_Boolean myZGreenOnOff;
58         Standard_Boolean myZRedOnOff;
59
60         gp_Pnt BAR;
61
62         Standard_Real Umin;
63         Standard_Real Umax;
64         Standard_Real Vmin;
65         Standard_Real Vmax;
66         Standard_Real dUmax;
67         Standard_Real dVmax;
68
69         Standard_Real red;
70         Standard_Real green;
71         Standard_Real blue;
72
73
74
75 //Handle(Graphic3d_Texture2Dmanual) mytexture;
76
77 };
78 #endif