Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <PolygonMesh3D name="SimpleMesh">
- <ArrayOfPolygon3D>
- <Polygon3D>
- <A>
- <X>10</X>
- <Y>10</Y>
- <Z>0</Z>
- </A>
- <B>
- <X>17</X>
- <Y>12</Y>
- <Z>0</Z>
- </B>
- <C>
- <X>10</X>
- <Y>12</Y>
- <Z>0</Z>
- </C>
- </Polygon3D>
- <Polygon3D>
- <A>
- <X>10</X>
- <Y>10</Y>
- <Z>0</Z>
- </A>
- <B>
- <X>17</X>
- <Y>12</Y>
- <Z>0</Z>
- </B>
- <C>
- <X>15</X>
- <Y>8</Y>
- <Z>0</Z>
- </C>
- </Polygon3D>
- <Polygon3D>
- <A>
- <X>10</X>
- <Y>10</Y>
- <Z>0</Z>
- </A>
- <B>
- <X>15</X>
- <Y>8</Y>
- <Z>0</Z>
- </B>
- <C>
- <X>11</X>
- <Y>6</Y>
- <Z>0</Z>
- </C>
- </Polygon3D>
- </ArrayOfPolygon3D>
- </PolygonMesh3D>
- <?xml version="1.0" encoding="utf-8"?>
- <xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
- <xsd:element name="PolygonMesh3D">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="Polygons">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element maxOccurs="unbounded" name="Polygon3D">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="A">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="X" type="xsd:byte" />
- <xsd:element name="Y" type="xsd:byte" />
- <xsd:element name="Z" type="xsd:byte" />
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="B">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="X" type="xsd:byte" />
- <xsd:element name="Y" type="xsd:byte" />
- <xsd:element name="Z" type="xsd:byte" />
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="C">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="X" type="xsd:byte" />
- <xsd:element name="Y" type="xsd:byte" />
- <xsd:element name="Z" type="xsd:byte" />
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- </xs:schema>
- public class Point3D
- {
- public Point3D() { }
- public Point3D(int x,int y,int z) { X = x; Y = y; Z = z; }
- public int X { get; set; }
- public int Y { get; set; }
- public int Z { get; set; }
- }
- public class Line3D
- {
- public Line3D() { }
- public Line3D(Point3D origin,Point3D endpoint) { Origin=origin; EndPoint=endpoint; }
- public Point3D Origin { get; set; }
- public Point3D EndPoint { get; set; }
- }
- public class Polygon3D
- {
- public Polygon3D() { }
- public Polygon3D(Point3D a,Point3D b,Point3D c) { A=a; B=b; C=c; }
- public Point3D A { get; set; }
- public Point3D B { get; set; }
- public Point3D C { get; set; }
- public Line3D LineAB { get { return new Line3D(A,B); } }
- public Line3D LineBC { get { return new Line3D(B,C); } }
- public Line3D LineCA { get { return new Line3D(C,A); } }
- }
- public class PolygonMesh3D
- { public PolygonMesh3D() { }
- public PolygonMesh3D(List<Polygon3D> polygons) { Polygons=polygons; }
- public List<Polygon3D> Polygons = new List<Polygon3D>();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement