1 // Copyright (C) 2007-2014 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 <TDF_Label.hxx>
31 #include <TopoDS_Shape.hxx>
34 class Handle(TFunction_Driver);
37 DEFINE_STANDARD_HANDLE( GEOM_Object, GEOM_BaseObject );
39 class GEOM_Object : public GEOM_BaseObject
41 friend class GEOM_Engine;
45 //! Red component of the color
47 //! Green component of the color
49 //! Blue component of the color
54 GEOM_Object(TDF_Label& theLabel);
57 Standard_EXPORT GEOM_Object(TDF_Label& theEntry, int theType);
58 Standard_EXPORT ~GEOM_Object();
60 //Finds a GEOM_Object on the label theLabel
61 Standard_EXPORT static Handle(GEOM_Object) GetObject(TDF_Label& theLabel);
63 //Finds a GEOM_Object by a reference, stored on the label theLabel
64 Standard_EXPORT static Handle(GEOM_Object) GetReferencedObject(TDF_Label& theLabel);
66 //###########################################################
67 //Access to properties
68 //###########################################################
70 //Returns a value (as TopoDS_Shape) of this GEOM_Object
71 Standard_EXPORT TopoDS_Shape GetValue();
73 //Sets a color of this GEOM_Object
74 Standard_EXPORT void SetColor(const Color& theColor);
76 //Returns a color of this GEOM_Object
77 Standard_EXPORT Color GetColor();
79 //Toggles an auto color mode on this GEOM_Object
80 Standard_EXPORT void SetAutoColor(bool theAutoColor);
82 //Returns a flag of auto color mode of this GEOM_Object
83 Standard_EXPORT bool GetAutoColor();
85 //Sets predefined point marker texture
86 Standard_EXPORT void SetMarkerStd(const Aspect_TypeOfMarker theType, double theSize);
88 //Sets custom point marker texture
89 Standard_EXPORT void SetMarkerTexture(int theTextureId);
91 //Gets point marker type
92 Standard_EXPORT Aspect_TypeOfMarker GetMarkerType();
94 //Gets point marker scale factor / size
95 Standard_EXPORT double GetMarkerSize();
97 //Gets custom marker texture ID
98 Standard_EXPORT int GetMarkerTexture();
100 //Unsets point marker
101 Standard_EXPORT void UnsetMarker();
103 //###########################################################
105 //###########################################################
107 //Returns false if the object is a sub-shape of another object
108 Standard_EXPORT bool IsMainShape();
111 DEFINE_STANDARD_RTTI( GEOM_Object );