Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:32

0001 // Created on: 1997-02-21
0002 // Created by: Alexander BRIVIN
0003 // Copyright (c) 1997-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _VrmlConverter_Drawer_HeaderFile
0018 #define _VrmlConverter_Drawer_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <Aspect_TypeOfDeflection.hxx>
0025 #include <Standard_Transient.hxx>
0026 class VrmlConverter_IsoAspect;
0027 class VrmlConverter_LineAspect;
0028 class VrmlConverter_ShadingAspect;
0029 class VrmlConverter_PointAspect;
0030 
0031 
0032 class VrmlConverter_Drawer;
0033 DEFINE_STANDARD_HANDLE(VrmlConverter_Drawer, Standard_Transient)
0034 
0035 //! qualifies the aspect properties for
0036 //! the VRML conversation of a specific kind of object.
0037 //! This includes for example color, maximal chordial deviation, etc...
0038 class VrmlConverter_Drawer : public Standard_Transient
0039 {
0040 
0041 public:
0042 
0043   
0044   Standard_EXPORT VrmlConverter_Drawer();
0045   
0046   //! by default: TOD_Relative; however, except for the shapes,
0047   //! the drawing  will be made using the absolute deviation.
0048   Standard_EXPORT void SetTypeOfDeflection (const Aspect_TypeOfDeflection aTypeOfDeflection);
0049   
0050   Standard_EXPORT Aspect_TypeOfDeflection TypeOfDeflection() const;
0051   
0052   //! Defines the maximal chordial deviation when drawing any curve;
0053   //! If this  value is  one  of  the  obvious  parameters  of  methods,
0054   //! current  value  from  Drawer won't be used.
0055   //! This value is used by:
0056   //!
0057   //! VrmlConverter_DeflectionCurve
0058   //! VrmlConverter_WFDeflectionRestrictedFace
0059   //! VrmlConverter_WFDeflectionShape
0060   Standard_EXPORT void SetMaximalChordialDeviation (const Standard_Real aChordialDeviation);
0061   
0062   //! returns the maximal chordial deviation.
0063   //! Default value: 0.1
0064   Standard_EXPORT Standard_Real MaximalChordialDeviation() const;
0065   
0066   //! default 0.001
0067   Standard_EXPORT void SetDeviationCoefficient (const Standard_Real aCoefficient);
0068   
0069   Standard_EXPORT Standard_Real DeviationCoefficient() const;
0070   
0071   //! default: 17 points.
0072   //! Defines the Discretisation  (myNbPoints) when drawing any curve;
0073   //! If this  value is  one  of  the  obvious  parameters  of  methods,
0074   //! current  value  from  Drawer won't be used.
0075   //! This value is used by:
0076   //!
0077   //! VrmlConverter_Curve
0078   //! VrmlConverter_WFRestrictedFace
0079   //! VrmlConverter_WFShape
0080   Standard_EXPORT void SetDiscretisation (const Standard_Integer d);
0081   
0082   Standard_EXPORT Standard_Integer Discretisation() const;
0083   
0084   //! defines the maximum value allowed  for the first and last
0085   //! parameters of an infinite curve.
0086   //! Default value: 500.
0087   //! VrmlConverter_Curve
0088   //! VrmlConverter_WFRestrictedFace
0089   //! VrmlConverter_WFShape
0090   Standard_EXPORT void SetMaximalParameterValue (const Standard_Real Value);
0091   
0092   Standard_EXPORT Standard_Real MaximalParameterValue() const;
0093   
0094   //! enables the drawing of isos on planes.
0095   //! By default there are no isos on planes.
0096   Standard_EXPORT void SetIsoOnPlane (const Standard_Boolean OnOff);
0097   
0098   //! returns True if the drawing of isos on planes is enabled.
0099   Standard_EXPORT Standard_Boolean IsoOnPlane() const;
0100   
0101   //! Defines the attributes which are used when drawing an
0102   //! U isoparametric curve of a face. Defines the number
0103   //! of U isoparametric curves to be drawn for a single face.
0104   //! The default values are the same default values from Vrml package.
0105   //!
0106   //! These attributes are used by the following algorithms:
0107   //! VrmlConverter_WFRestrictedFace
0108   //! VrmlConverter_WFDeflectionRestrictedFace
0109   Standard_EXPORT Handle(VrmlConverter_IsoAspect) UIsoAspect();
0110   
0111   Standard_EXPORT void SetUIsoAspect (const Handle(VrmlConverter_IsoAspect)& anAspect);
0112   
0113   //! Defines the attributes which are used when drawing an
0114   //! V isoparametric curve of a face. Defines the number
0115   //! of V isoparametric curves to be drawn for a single face.
0116   //! The default values are the same default values from Vrml package.
0117   //!
0118   //! These attributes are used by the following algorithms:
0119   //! VrmlConverter_WFRestrictedFace
0120   //! VrmlConverter_WFDeflectionRestrictedFace
0121   Standard_EXPORT Handle(VrmlConverter_IsoAspect) VIsoAspect();
0122   
0123   Standard_EXPORT void SetVIsoAspect (const Handle(VrmlConverter_IsoAspect)& anAspect);
0124   
0125 
0126   //! The default values are the same default values from Vrml package.
0127   //! These attributes are used by the following algorithms:
0128   //! VrmlConverter_WFShape
0129   //! VrmlConverter_WFDeflectionShape
0130   Standard_EXPORT Handle(VrmlConverter_LineAspect) FreeBoundaryAspect();
0131   
0132   Standard_EXPORT void SetFreeBoundaryAspect (const Handle(VrmlConverter_LineAspect)& anAspect);
0133   
0134   //! enables the drawing the free boundaries
0135   //! By default the free boundaries  are drawn.
0136   Standard_EXPORT void SetFreeBoundaryDraw (const Standard_Boolean OnOff);
0137   
0138   //! returns True if the drawing of the free boundaries is enabled.
0139   Standard_EXPORT Standard_Boolean FreeBoundaryDraw() const;
0140   
0141 
0142   //! The default values are the same default values from Vrml package.
0143   //! These attributes are used by the following algorithms:
0144   //! VrmlConverter_WFShape
0145   //! VrmlConverter_WFDeflectionShape
0146   Standard_EXPORT Handle(VrmlConverter_LineAspect) WireAspect();
0147   
0148   Standard_EXPORT void SetWireAspect (const Handle(VrmlConverter_LineAspect)& anAspect);
0149   
0150   //! enables the drawing the wire
0151   //! By default the wire  are drawn.
0152   Standard_EXPORT void SetWireDraw (const Standard_Boolean OnOff);
0153   
0154   //! returns True if the drawing of the wire is enabled.
0155   Standard_EXPORT Standard_Boolean WireDraw() const;
0156   
0157 
0158   //! The default values are the same default values from Vrml package.
0159   //! These attributes are used by the following algorithms:
0160   //! VrmlConverter_WFShape
0161   //! VrmlConverter_WFDeflectionShape
0162   Standard_EXPORT Handle(VrmlConverter_LineAspect) UnFreeBoundaryAspect();
0163   
0164   Standard_EXPORT void SetUnFreeBoundaryAspect (const Handle(VrmlConverter_LineAspect)& anAspect);
0165   
0166   //! enables the drawing the unfree boundaries
0167   //! By default the unfree boundaries  are drawn.
0168   Standard_EXPORT void SetUnFreeBoundaryDraw (const Standard_Boolean OnOff);
0169   
0170   //! returns True if the drawing of the unfree boundaries is enabled.
0171   Standard_EXPORT Standard_Boolean UnFreeBoundaryDraw() const;
0172   
0173 
0174   //! The default values are the same default values from Vrml package.
0175   Standard_EXPORT Handle(VrmlConverter_LineAspect) LineAspect();
0176   
0177   Standard_EXPORT void SetLineAspect (const Handle(VrmlConverter_LineAspect)& anAspect);
0178   
0179   Standard_EXPORT Handle(VrmlConverter_PointAspect) PointAspect();
0180   
0181   Standard_EXPORT void SetPointAspect (const Handle(VrmlConverter_PointAspect)& anAspect);
0182   
0183 
0184   //! The default values are the same default values from Vrml package.
0185   Standard_EXPORT Handle(VrmlConverter_ShadingAspect) ShadingAspect();
0186   
0187   Standard_EXPORT void SetShadingAspect (const Handle(VrmlConverter_ShadingAspect)& anAspect);
0188   
0189   //! returns Standard_True if the hidden lines are to be drawn.
0190   //! By default the hidden lines are not drawn.
0191   Standard_EXPORT Standard_Boolean DrawHiddenLine() const;
0192   
0193   //! sets DrawHiddenLine  =  Standard_True  -  the hidden lines are drawn.
0194   Standard_EXPORT void EnableDrawHiddenLine();
0195   
0196   //! sets DrawHiddenLine  =  Standard_False  -  the hidden lines are not drawn.
0197   Standard_EXPORT void DisableDrawHiddenLine();
0198   
0199   //! returns LineAspect  for  the hidden lines.
0200   //! The default values are the same default values from Vrml package.
0201   Standard_EXPORT Handle(VrmlConverter_LineAspect) HiddenLineAspect();
0202   
0203   //! sets LineAspect  for  the hidden lines.
0204   Standard_EXPORT void SetHiddenLineAspect (const Handle(VrmlConverter_LineAspect)& anAspect);
0205   
0206   //! returns LineAspect  for  the seen lines.
0207   //! The default values are the same default values from Vrml package.
0208   Standard_EXPORT Handle(VrmlConverter_LineAspect) SeenLineAspect();
0209   
0210   //! sets LineAspect  for  the seen lines.
0211   Standard_EXPORT void SetSeenLineAspect (const Handle(VrmlConverter_LineAspect)& anAspect);
0212 
0213   DEFINE_STANDARD_RTTIEXT(VrmlConverter_Drawer,Standard_Transient)
0214 
0215 private:
0216 
0217   Handle(VrmlConverter_IsoAspect) myUIsoAspect;
0218   Handle(VrmlConverter_IsoAspect) myVIsoAspect;
0219   Standard_Integer myNbPoints;
0220   Standard_Boolean myIsoOnPlane;
0221   Handle(VrmlConverter_LineAspect) myFreeBoundaryAspect;
0222   Standard_Boolean myFreeBoundaryDraw;
0223   Handle(VrmlConverter_LineAspect) myUnFreeBoundaryAspect;
0224   Standard_Boolean myUnFreeBoundaryDraw;
0225   Handle(VrmlConverter_LineAspect) myWireAspect;
0226   Standard_Boolean myWireDraw;
0227   Handle(VrmlConverter_LineAspect) myLineAspect;
0228   Handle(VrmlConverter_ShadingAspect) myShadingAspect;
0229   Standard_Real myChordialDeviation;
0230   Aspect_TypeOfDeflection myTypeOfDeflection;
0231   Standard_Real myMaximalParameterValue;
0232   Standard_Real myDeviationCoefficient;
0233   Handle(VrmlConverter_PointAspect) myPointAspect;
0234   Standard_Boolean myDrawHiddenLine;
0235   Handle(VrmlConverter_LineAspect) myHiddenLineAspect;
0236   Handle(VrmlConverter_LineAspect) mySeenLineAspect;
0237 
0238 };
0239 
0240 #endif // _VrmlConverter_Drawer_HeaderFile