Topologic  0.8.9
Vertex.h
1 // This file is part of Topologic software library.
2 // Copyright(C) 2019, Cardiff University and University College London
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
13 //
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <https://www.gnu.org/licenses/>.
16 
17 #pragma once
18 
19 #include <Topology.h>
20 
21 #include <TopologicCore/include/Vertex.h>
22 
23 namespace Topologic
24 {
25  ref class Edge;
26 
30 
31  public ref class Vertex : Topology
32  {
33  public:
41 #ifdef TOPOLOGIC_DYNAMO
42  static Vertex^ ByCoordinates(
43  [DefaultArgument("0")] double x,
44  [DefaultArgument("0")] double y,
45  [DefaultArgument("0")] double z);
46 #else
47  static Vertex^ ByCoordinates(double x, double y, double z);
48 #endif
49 
54  property List<Edge^>^ Edges
55  {
56  List<Edge^>^ get();
57  }
58 
63  property double X
64  {
65  virtual double get();
66  }
67 
72  property double Y
73  {
74  virtual double get();
75  }
76 
81  property double Z
82  {
83  virtual double get();
84  }
85 
90  property List<double>^ Coordinates
91  {
92  virtual List<double>^ get();
93  }
94 
99  property Object^ BasicGeometry
100  {
101  virtual Object^ get() override;
102  }
103 
108  static int Type();
109 
110  public protected:
111  Vertex();
112  Vertex(const std::shared_ptr<TopologicCore::Vertex>& kpCoreVertex);
113 
119 #ifdef TOPOLOGIC_DYNAMO
120  static Vertex^ ByPoint(Autodesk::DesignScript::Geometry::Point^ point);
121 
122  Autodesk::DesignScript::Geometry::Point^ Point();
123 #endif
124 
125  virtual std::shared_ptr<TopologicCore::TopologicalQuery> GetCoreTopologicalQuery() override;
126 
127  protected:
128  virtual ~Vertex();
129 
133  std::shared_ptr<TopologicCore::Vertex>* m_pCoreVertex;
134  };
135 }
double Z
Returns the Z coordinate of the Vertex.
Definition: Vertex.h:81
A Vertex is a zero-dimensional entity equivalent to a geometry point.
Definition: Vertex.h:31
double Y
Returns the Y coordinate of the Vertex.
Definition: Vertex.h:72
A Topology is an abstract superclass that includes constructors, properties and methods used by other...
Definition: Topology.h:53
double X
Returns the X coordinate of the Vertex.
Definition: Vertex.h:63
List< double >^ Coordinates
Returns the coordinates of the Vertex.
Definition: Vertex.h:90
Object^ BasicGeometry
Creates a geometry from Vertex.
Definition: Vertex.h:99
static Vertex ^ ByCoordinates(double x, double y, double z)
Creates a Vertex by XYZ coordinates.
Definition: Vertex.cpp:41
std::shared_ptr< TopologicCore::Vertex > * m_pCoreVertex
Definition: Vertex.h:133
virtual std::shared_ptr< TopologicCore::TopologicalQuery > GetCoreTopologicalQuery() override
Creates a Vertex by a point.
Definition: Vertex.cpp:71
Topologic is an open-source software modelling library enabling hierarchical and topological represen...
Definition: About.h:23
static int Type()
Returns the type associated to Vertex.
Definition: Vertex.cpp:82
List< Edge^>^ Edges
Returns the Edges incident to the Vertex.
Definition: Vertex.h:54