1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #ifndef _GEOM_Object_HeaderFile
24 #define _GEOM_Object_HeaderFile
26 #include "GEOM_BaseObject.hxx"
28 #include <Aspect_TypeOfMarker.hxx>
29 #include <Standard_GUID.hxx>
30 #include <TColStd_HSequenceOfTransient.hxx>
31 #include <TDF_Label.hxx>
32 #include <TopoDS_Shape.hxx>
37 class TFunction_Driver;
40 DEFINE_STANDARD_HANDLE( GEOM_Object, GEOM_BaseObject );
42 class GEOM_Object : public GEOM_BaseObject
44 friend class GEOM_Engine;
48 //! Red component of the color
50 //! Green component of the color
52 //! Blue component of the color
57 GEOM_Object(TDF_Label& theLabel);
60 Standard_EXPORT GEOM_Object(TDF_Label& theEntry, int theType);
61 Standard_EXPORT ~GEOM_Object();
63 //Finds a GEOM_Object on the label theLabel
64 Standard_EXPORT static Handle(GEOM_Object) GetObject(const TDF_Label& theLabel);
66 //Finds a GEOM_Object by a reference, stored on the label theLabel
67 Standard_EXPORT static Handle(GEOM_Object) GetReferencedObject(const TDF_Label& theLabel);
69 //###########################################################
70 //Access to properties
71 //###########################################################
73 //Returns a value (as TopoDS_Shape) of this GEOM_Object
74 Standard_EXPORT TopoDS_Shape GetValue();
76 //Sets a color of this GEOM_Object
77 Standard_EXPORT void SetColor(const Color& theColor);
79 //Returns a color of this GEOM_Object
80 Standard_EXPORT Color GetColor();
82 //Toggles an auto color mode on this GEOM_Object
83 Standard_EXPORT void SetAutoColor(bool theAutoColor);
85 //Returns a flag of auto color mode of this GEOM_Object
86 Standard_EXPORT bool GetAutoColor();
88 //Sets predefined point marker texture
89 Standard_EXPORT void SetMarkerStd(const Aspect_TypeOfMarker theType, double theSize);
91 //Sets custom point marker texture
92 Standard_EXPORT void SetMarkerTexture(int theTextureId);
94 //Gets point marker type
95 Standard_EXPORT Aspect_TypeOfMarker GetMarkerType();
97 //Gets point marker scale factor / size
98 Standard_EXPORT double GetMarkerSize();
100 //Gets custom marker texture ID
101 Standard_EXPORT int GetMarkerTexture();
103 //Unsets point marker
104 Standard_EXPORT void UnsetMarker();
106 //###########################################################
108 //###########################################################
110 //Returns false if the object is a sub-shape of another object
111 Standard_EXPORT bool IsMainShape();
114 Standard_EXPORT static Handle(TColStd_HSequenceOfTransient)
115 GetLastFunctions( const std::list< Handle(GEOM_Object) >& theObjects );
118 DEFINE_STANDARD_RTTIEXT(GEOM_Object,GEOM_BaseObject)