VectSharp 2.6.1
A light library for C# vector graphics
|
A static class containing methods to create complex 3D objects. More...
Static Public Member Functions | |
static List< Element3D > | CreateCube (Point3D center, double size, IEnumerable< IMaterial > fill, string tag=null, int zIndex=0) |
Creates a cube. More... | |
static List< Element3D > | CreateCuboid (Point3D center, double sizeX, double sizeY, double sizeZ, IEnumerable< IMaterial > fill, string tag=null, int zIndex=0) |
Creates a cuboid. More... | |
static List< Element3D > | CreateRectangle (Point3D point1, Point3D point2, Point3D point3, Point3D point4, IEnumerable< IMaterial > fill, string tag=null, int zIndex=0) |
Creates a quadrilater. All the vertices need not be coplanar. More... | |
static List< Element3D > | CreateRectangle (Point3D point1, Point3D point2, Point3D point3, Point3D point4, NormalizedVector3D point1Normal, NormalizedVector3D point2Normal, NormalizedVector3D point3Normal, NormalizedVector3D point4Normal, IEnumerable< IMaterial > fill, string tag=null, int zIndex=0) |
Creates a quadrilater, specifying the vertex normals at the four vertices. All the vertices need not be coplanar. More... | |
static List< Element3D > | CreateSphere (Point3D center, double radius, int steps, IEnumerable< IMaterial > fill, string tag=null, int zIndex=0) |
Creates a sphere. More... | |
static List< Element3D > | CreateTetrahedron (Point3D center, double radius, IEnumerable< IMaterial > fill, string tag=null, int zIndex=0) |
Creates a tetrahedron inscribed in a sphere. More... | |
static List< Element3D > | CreatePolygon (GraphicsPath polygon2D, double triangulationResolution, Point3D origin, NormalizedVector3D xAxis, NormalizedVector3D yAxis, bool reverseTriangles, IEnumerable< IMaterial > fill, string tag=null, int zIndex=0) |
Creates a flat polygon. More... | |
static List< Element3D > | CreatePrism (GraphicsPath polygonBase2D, double triangulationResolution, Point3D bottomOrigin, Point3D topOrigin, NormalizedVector3D baseXAxis, NormalizedVector3D baseYAxis, IEnumerable< IMaterial > fill, string tag=null, int zIndex=0) |
Creates a prism with the specified base. More... | |
static List< Element3D > | CreateWireframe (IEnumerable< Element3D > object3D, Colour colour, double thickness=1, LineCaps lineCap=LineCaps.Butt, LineDash? lineDash=null, string tag=null, int zIndex=0) |
Creates a wireframe from a collection of Element3Ds. More... | |
static List< Element3D > | CreatePoints (IEnumerable< Element3D > object3D, Colour colour, double diameter=1, string tag=null, int zIndex=0) |
Obtains a list of Point3DElement corresponding to the vertices of a list of Element3Ds. More... | |
A static class containing methods to create complex 3D objects.
Definition at line 28 of file ObjectFactory.cs.
|
static |
Creates a cube.
center | The centre of the cube. |
size | The length of each side of the cube. |
fill | A collection of materials that will be applied to the Triangle3DElements returned by this method. |
tag | A tag that will be applied to the Triangle3DElements returned by this method. |
zIndex | A z-index that will be applied to the Triangle3DElements returned by this method. |
Definition at line 39 of file ObjectFactory.cs.
|
static |
Creates a cuboid.
center | The centre of the cube. |
sizeX | The length of the sides of the cube parallel to the x axis. |
sizeY | The length of the sides of the cube parallel to the y axis. |
sizeZ | The length of the sides of the cube parallel to the z axis. |
fill | A collection of materials that will be applied to the Triangle3DElements returned by this method. |
tag | A tag that will be applied to the Triangle3DElements returned by this method. |
zIndex | A z-index that will be applied to the Triangle3DElements returned by this method. |
Definition at line 55 of file ObjectFactory.cs.
|
static |
Obtains a list of Point3DElement corresponding to the vertices of a list of Element3Ds.
object3D | The collection of Element3Ds. Point3DElements are ignored. |
colour | The colour of the Point3DElements returned by this method. |
diameter | The diameter of the Point3DElements returned by this method. |
tag | A tag that will be applied to the Point3DElements returned by this method. |
zIndex | A z-index that will be applied to the Point3DElements returned by this method. |
Definition at line 412 of file ObjectFactory.cs.
|
static |
Creates a flat polygon.
polygon2D | A 2D GraphicsPath representing the polygon. |
triangulationResolution | The resolution that will be used to linearise curve segments in the GraphicsPath. |
origin | A Point3D that will correspond to the origin of the 2D reference system. |
xAxis | A NormalizedVector3D that will correspond to the x axis of the 2D reference system. This will be orthonormalised to the yAxis . |
yAxis | A NormalizedVector3D that will correspond to the y axis of the 2D reference system. |
reverseTriangles | Indicates whether the order of the points (and thus the normals) of all the triangles returned by this method should be reversed. |
fill | A collection of materials that will be applied to the Triangle3DElements returned by this method. |
tag | A tag that will be applied to the Triangle3DElements returned by this method. |
zIndex | A z-index that will be applied to the Triangle3DElements returned by this method. |
Definition at line 273 of file ObjectFactory.cs.
|
static |
Creates a prism with the specified base.
polygonBase2D | A 2D GraphicsPath representing the base of the prism. |
triangulationResolution | The resolution that will be used to linearise curve segments in the GraphicsPath. |
bottomOrigin | A Point3D that will correspond to the origin of the 2D reference system of the bottom base. |
topOrigin | A Point3D that will correspond to the origin of the 2D reference system of the top base. |
baseXAxis | A NormalizedVector3D that will correspond to the x axis of the 2D reference system of the bases. This will be orthonormalised to the baseYAxis . |
baseYAxis | A NormalizedVector3D that will correspond to the y axis of the 2D reference system of the bases. |
fill | A collection of materials that will be applied to the Triangle3DElements returned by this method. |
tag | A tag that will be applied to the Triangle3DElements returned by this method. |
zIndex | A z-index that will be applied to the Triangle3DElements returned by this method. |
Definition at line 314 of file ObjectFactory.cs.
|
static |
Creates a quadrilater. All the vertices need not be coplanar.
point1 | The first vertex of the quadrilater. |
point2 | The second vertex of the quadrilater. |
point3 | The third vertex of the quadrilater. |
point4 | The fourth vertex of the quadrilater. |
fill | A collection of materials that will be applied to the Triangle3DElements returned by this method. |
tag | A tag that will be applied to the Triangle3DElements returned by this method. |
zIndex | A z-index that will be applied to the Triangle3DElements returned by this method. |
Definition at line 93 of file ObjectFactory.cs.
|
static |
Creates a quadrilater, specifying the vertex normals at the four vertices. All the vertices need not be coplanar.
point1 | The first vertex of the quadrilater. |
point2 | The second vertex of the quadrilater. |
point3 | The third vertex of the quadrilater. |
point4 | The fourth vertex of the quadrilater. |
point1Normal | The vertex normal at the first vertex of the quadrilater. |
point2Normal | The vertex normal at the second vertex of the quadrilater. |
point3Normal | The vertex normal at the third vertex of the quadrilater. |
point4Normal | The vertex normal at the fourth vertex of the quadrilater. |
fill | A collection of materials that will be applied to the Triangle3DElements returned by this method. |
tag | A tag that will be applied to the Triangle3DElements returned by this method. |
zIndex | A z-index that will be applied to the Triangle3DElements returned by this method. |
Definition at line 123 of file ObjectFactory.cs.
|
static |
Creates a sphere.
center | The centre of the sphere. |
radius | The radius of the sphere. |
steps | The number of meridians and parallels to use when generating the sphere. |
fill | A collection of materials that will be applied to the Triangle3DElements returned by this method. |
tag | A tag that will be applied to the Triangle3DElements returned by this method. |
zIndex | A z-index that will be applied to the Triangle3DElements returned by this method. |
Definition at line 148 of file ObjectFactory.cs.
|
static |
Creates a tetrahedron inscribed in a sphere.
center | The centre of the tetrahedron. |
radius | The radius of the sphere in which the tetrahedron is inscribed. |
fill | A collection of materials that will be applied to the Triangle3DElements returned by this method. |
tag | A tag that will be applied to the Triangle3DElements returned by this method. |
zIndex | A z-index that will be applied to the Triangle3DElements returned by this method. |
Definition at line 238 of file ObjectFactory.cs.
|
static |
Creates a wireframe from a collection of Element3Ds.
object3D | The collection of Element3Ds. Line3DElements and Point3DElements are ignored. |
colour | The colour of the Line3DElements returned by this method. |
thickness | The thickness of the Line3DElements returned by this method. |
lineCap | The line cap of the Line3DElements returned by this method. |
lineDash | The line dash of the Line3DElements returned by this method. |
tag | A tag that will be applied to the Line3DElements returned by this method. |
zIndex | A z-index that will be applied to the Line3DElements returned by this method. |
Definition at line 370 of file ObjectFactory.cs.