Version: 9.16.0
GEOM_Object.hxx
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5//
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.
10//
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.
15//
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
19//
20// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21//
22
23#ifndef _GEOM_Object_HeaderFile
24#define _GEOM_Object_HeaderFile
25
26#include "GEOM_BaseObject.hxx"
27
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>
33
34#include <list>
35
36class GEOM_Object;
38class GEOM_Engine;
39
41
42class GEOM_Object : public GEOM_BaseObject
43{
44 friend class GEOM_Engine;
45
46 public:
47 struct Color {
49 double R;
51 double G;
53 double B;
54 };
55
56 private:
57 GEOM_Object(TDF_Label& theLabel);
58
59 public:
60 Standard_EXPORT GEOM_Object(TDF_Label& theEntry, int theType);
61 Standard_EXPORT ~GEOM_Object();
62
63 //Finds a GEOM_Object on the label theLabel
64 Standard_EXPORT static Handle(GEOM_Object) GetObject(const TDF_Label& theLabel);
65
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);
68
69 //###########################################################
70 //Access to properties
71 //###########################################################
72
73 //Returns a value (as TopoDS_Shape) of this GEOM_Object
74 Standard_EXPORT TopoDS_Shape GetValue();
75
76 //Sets a color of this GEOM_Object
77 Standard_EXPORT void SetColor(const Color& theColor);
78
79 //Returns a color of this GEOM_Object
80 Standard_EXPORT Color GetColor();
81
82 //Toggles an auto color mode on this GEOM_Object
83 Standard_EXPORT void SetAutoColor(bool theAutoColor);
84
85 //Returns a flag of auto color mode of this GEOM_Object
86 Standard_EXPORT bool GetAutoColor();
87
88 //Sets predefined point marker texture
89 Standard_EXPORT void SetMarkerStd(const Aspect_TypeOfMarker theType, double theSize);
90
91 //Sets custom point marker texture
92 Standard_EXPORT void SetMarkerTexture(int theTextureId);
93
94 //Gets point marker type
95 Standard_EXPORT Aspect_TypeOfMarker GetMarkerType();
96
97 //Gets point marker scale factor / size
98 Standard_EXPORT double GetMarkerSize();
99
100 //Gets custom marker texture ID
101 Standard_EXPORT int GetMarkerTexture();
102
103 //Unsets point marker
104 Standard_EXPORT void UnsetMarker();
105
106 //###########################################################
107 // Sub-shape methods
108 //###########################################################
109
110 //Returns false if the object is a sub-shape of another object
111 Standard_EXPORT bool IsMainShape();
112
113 //Comfort method
114 Standard_EXPORT static Handle(TColStd_HSequenceOfTransient)
115 GetLastFunctions( const std::list< Handle(GEOM_Object) >& theObjects );
116
117protected:
118 // Toggles an auto color mode for sub-shapes of GEOM_Object
119 Standard_EXPORT void SetAutoColorSubShapes(bool theAutoColor);
120
121public:
122 DEFINE_STANDARD_RTTIEXT(GEOM_Object,GEOM_BaseObject)
123};
124
125#endif
Handle(TColStd_HSequenceOfTransient) AdvancedEngine_IOperations
Create a T-shape object with specified caracteristics for the main and the incident pipes (radius,...
Definition: AdvancedEngine_IOperations.cxx:1907
DEFINE_STANDARD_HANDLE(GEOM_Field, GEOM_BaseObject) DEFINE_STANDARD_HANDLE(GEOM_FieldStep
Definition: GEOM_Engine.hxx:91
@ Color
Definition: GEOM_Constants.h:40