b311480e |
1 | // Created on: 2006-05-25 |
2 | // Created by: Alexander GRIGORIEV |
973c2be1 |
3 | // Copyright (c) 2006-2014 OPEN CASCADE SAS |
b311480e |
4 | // |
973c2be1 |
5 | // This file is part of Open CASCADE Technology software library. |
b311480e |
6 | // |
d5f74e42 |
7 | // This library is free software; you can redistribute it and/or modify it under |
8 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
9 | // by the Free Software Foundation, with special exception defined in the file |
10 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
12 | // |
973c2be1 |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
7fd59977 |
15 | |
16 | #ifndef VrmlData_Geometry_HeaderFile |
17 | #define VrmlData_Geometry_HeaderFile |
18 | |
19 | #include <VrmlData_Node.hxx> |
cb389a77 |
20 | #include <TopoDS_TShape.hxx> |
7fd59977 |
21 | |
22 | /** |
23 | * Implementation of the Geometry node. |
24 | * Contains the topological representation (TopoDS_Shell) of the VRML geometry |
25 | */ |
26 | |
27 | class VrmlData_Geometry : public VrmlData_Node |
28 | { |
29 | public: |
30 | // ---------- PUBLIC METHODS ---------- |
31 | |
32 | /** |
33 | * Empty constructor |
34 | */ |
35 | inline VrmlData_Geometry () |
36 | : myIsModified (Standard_True) |
37 | {} |
38 | |
39 | /** |
40 | * Constructor |
41 | */ |
42 | inline VrmlData_Geometry (const VrmlData_Scene& theScene, |
43 | const char * theName) |
44 | : VrmlData_Node (theScene, theName), |
45 | myIsModified (Standard_True) |
46 | {} |
47 | |
48 | /** |
49 | * Query the shape. This method checks the flag myIsModified; if True it |
50 | * should rebuild the shape presentation. |
51 | */ |
52 | Standard_EXPORT virtual const Handle(TopoDS_TShape)& TShape () = 0; |
53 | |
54 | protected: |
55 | // ---------- PROTECTED METHODS ---------- |
56 | |
57 | /** |
58 | * Set the TShape. |
59 | */ |
60 | inline void SetTShape (const Handle(TopoDS_TShape)& theTShape) |
61 | { myTShape = theTShape; } |
62 | |
63 | /** |
64 | * Mark modification |
65 | */ |
66 | inline void SetModified () { myIsModified= Standard_True; } |
67 | |
68 | |
69 | protected: |
70 | // ---------- PROTECTED FIELDS ---------- |
71 | |
72 | Handle(TopoDS_TShape) myTShape; |
73 | Standard_Boolean myIsModified; |
74 | |
75 | public: |
76 | // Declaration of CASCADE RTTI |
77 | DEFINE_STANDARD_RTTI (VrmlData_Geometry) |
78 | }; |
79 | |
80 | // Definition of HANDLE object using Standard_DefineHandle.hxx |
81 | DEFINE_STANDARD_HANDLE (VrmlData_Geometry, VrmlData_Node) |
82 | |
83 | |
84 | #endif |