File indexing completed on 2025-01-18 10:02:55
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _AIS_Triangulation_HeaderFile
0017 #define _AIS_Triangulation_HeaderFile
0018
0019 #include <TColStd_HArray1OfInteger.hxx>
0020 #include <AIS_InteractiveObject.hxx>
0021
0022 class Poly_Triangulation;
0023
0024 DEFINE_STANDARD_HANDLE(AIS_Triangulation, AIS_InteractiveObject)
0025
0026
0027
0028
0029
0030 class AIS_Triangulation : public AIS_InteractiveObject
0031 {
0032 DEFINE_STANDARD_RTTIEXT(AIS_Triangulation, AIS_InteractiveObject)
0033 public:
0034
0035
0036 Standard_EXPORT AIS_Triangulation(const Handle(Poly_Triangulation)& aTriangulation);
0037
0038
0039
0040
0041
0042 Standard_EXPORT void SetColors (const Handle(TColStd_HArray1OfInteger)& aColor);
0043
0044
0045
0046
0047 Standard_EXPORT Handle(TColStd_HArray1OfInteger) GetColors() const;
0048
0049
0050 Standard_Boolean HasVertexColors() const
0051 {
0052 return (myFlagColor == 1);
0053 }
0054
0055 Standard_EXPORT void SetTriangulation (const Handle(Poly_Triangulation)& aTriangulation);
0056
0057
0058 Standard_EXPORT Handle(Poly_Triangulation) GetTriangulation() const;
0059
0060
0061 Standard_EXPORT virtual void SetTransparency (const Standard_Real aValue = 0.6) Standard_OVERRIDE;
0062
0063
0064 Standard_EXPORT virtual void UnsetTransparency() Standard_OVERRIDE;
0065
0066 protected:
0067
0068 Standard_EXPORT void updatePresentation();
0069
0070 private:
0071
0072 Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
0073 const Handle(Prs3d_Presentation)& thePrs,
0074 const Standard_Integer theMode) Standard_OVERRIDE;
0075
0076 Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
0077 const Standard_Integer theMode) Standard_OVERRIDE;
0078
0079
0080
0081
0082
0083
0084 Standard_EXPORT Graphic3d_Vec4ub attenuateColor (const Standard_Integer theColor, const Standard_Real theComponent);
0085
0086 Handle(Poly_Triangulation) myTriangulation;
0087 Handle(TColStd_HArray1OfInteger) myColor;
0088 Standard_Integer myFlagColor;
0089 Standard_Integer myNbNodes;
0090 Standard_Integer myNbTriangles;
0091
0092 };
0093
0094 #endif