0028105: HLR rendering crash in MFC sample
[occt.git] / samples / mfc / standard / Common / User_Cylinder.hxx
index 232498a..9021d7d 100755 (executable)
@@ -8,9 +8,10 @@
 #include <Standard_DefineHandle.hxx>
 #include <Standard_Macro.hxx>
 #include <Graphic3d_AspectFillArea3d.hxx>
-
+#include <Prs3d_Projector.hxx>
 // Handle definition
 //
+class User_Cylinder;
 DEFINE_STANDARD_HANDLE(User_Cylinder,AIS_InteractiveObject)
 
 class User_Cylinder: public AIS_InteractiveObject {
@@ -21,32 +22,27 @@ public:
        ~User_Cylinder(){};
        
        Standard_Boolean AcceptShapeDecomposition() const;
-       void Standard_EXPORT SetCylindricalFaceColor(const Quantity_Color acolor);
-       void Standard_EXPORT SetPlanarFaceColor(const Quantity_Color);
        Standard_Integer NbPossibleSelection() const;
        void SetColor(const Quantity_Color &aColor);
 
 private:
-       void Compute(const Handle_PrsMgr_PresentationManager3d& aPresentationManager,
-                                const Handle_Prs3d_Presentation& aPresentation,
+       void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
+                                const Handle(Prs3d_Presentation)& aPresentation,
                                 const Standard_Integer aMode = 0) ;
-       void ComputeSelection(const Handle_SelectMgr_Selection& aSelection,
+       void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
                                                  const Standard_Integer aMode) ;
-       void Compute(const Handle_Prs3d_Projector& aProjector,const Handle_Prs3d_Presentation& aPresentation);
+       void Compute(const Handle(Prs3d_Projector)& aProjector,const Handle(Prs3d_Presentation)& aPresentation);
        Standard_Boolean TriangleIsValid(const gp_Pnt& P1,const gp_Pnt& P2,const gp_Pnt& P3) const;
        Quantity_Color Color(gp_Pnt& thePoint,Standard_Real AltMin,Standard_Real AltMax, const Standard_Integer ColorizationMode) ;
                                                
 // some methods like DynamicType() or IsKind()
 //
-DEFINE_STANDARD_RTTI(User_Cylinder)
+DEFINE_STANDARD_RTTIEXT(User_Cylinder,AIS_InteractiveObject)
 private:
-//     Quantity_NameOfColor myCylindricalFaceColor;
-//     Quantity_NameOfColor myPlanarFaceColor;
-       Quantity_Color myCylindricalFaceColor;
-       Quantity_Color myPlanarFaceColor;
+       Quantity_Color myColor;
        TopoDS_Shape myShape;
 
-       Handle_Graphic3d_AspectFillArea3d myAspect;
+       Handle(Graphic3d_AspectFillArea3d) myAspect;
        Standard_Real myDeflection;
 
        Standard_Boolean myX1OnOff;
@@ -77,7 +73,7 @@ private:
 
 
 
-//Handle_Graphic3d_Texture2Dmanual mytexture;
+//Handle(Graphic3d_Texture2Dmanual) mytexture;
 
 };
 #endif