Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static class: RT.Modeling.Md

Summary

Contains a plethora of extension methods to use on Pt (3D coordinates), collections of points (assumed to be faces) and collections of faces (assumed to be models).

Static methods

double
arccos(double x)
Inverse cosine function, returning angles in degrees.
double
arcsin(double x)
Inverse sine function, returning angles in degrees.
IEnumerable<VertexInfo[]>
BevelFromCurve(IEnumerable<Pt> points, double radius, int revSteps, Normal normal = Normal.Average)
Generates a circular bevel from a 3D curve.
IEnumerable<VertexInfo[]>
BevelFromCurve(IEnumerable<Pt> points, double radiusOut, double radiusDown, int revSteps, Normal normal = Normal.Average)
Generates an elliptical bevel from a 3D curve.
IEnumerable<Pt>
Bézier(Pt start, Pt control1, Pt control2, Pt end, int steps)
Generates the points along a cubic Bézier curve. The points are equidistant in t-space, meaning they are not geometrically equidistant, nor does this ensure a uniform smoothness.
IEnumerable<PointD>
Bézier(PointD start, PointD control1, PointD control2, PointD end, int steps)
Pt[][]
BézierPatch(Pt[][] controlPoints, int steps)
Generates a mesh of points on a cubic Bézier patch. The points are equidistant in t-space, meaning they are not geometrically equidistant, nor does this ensure a uniform smoothness.
Pt[][]
BézierPatch(Pt p00, Pt p10, Pt p20, Pt p30, Pt p01, Pt p11, Pt p21, Pt p31, Pt p02, Pt p12, Pt p22, Pt p32, Pt p03, Pt p13, Pt p23, Pt p33, int steps)
double
cos(double x)
Cosine function of an angle in degrees.
IEnumerable<VertexInfo[]>
CreateMesh(bool closedX, bool closedY, MeshVertexInfo[][] pts)
Creates a mesh (3D object surface consisting of quadrilateral faces) based on a 2D array of 3D points.
IEnumerable<VertexInfo[]>
CreateMesh(bool closedX, bool closedY, Pt[][] pts, bool flatNormals = false)
IEnumerable<VertexInfo[]>
DoubleSidedFlatNormals(this Pt[] polygon)
Converts a polygon to a double-sided 3D shape with normal vectors perpendicular to the polygon (making the polygon appear flat).
IEnumerable<VertexInfo[]>
Extrude(this IEnumerable<PointD> polygon, double depth, bool includeBackFace = false, bool flatSideNormals = false)
Generates a 3D model by extruding a polygon from 2D space along the y-axis.
IEnumerable<VertexInfo[]>
Extrude(this IEnumerable<IEnumerable<PointD>> polygons, double depth, bool includeBackFace = false, bool flatSideNormals = false)
Generates a 3D model by extruding a set of polygons, potentially with holes, from 2D space along the y-axis.
IEnumerable<VertexInfo[]>
Extrude(this IEnumerable<DecodeSvgPath.PathPiece> pieces, double depth, double smoothness, bool includeBackFace = false)
Generates a 3D model by extruding an SVG path from 2D space along the y-axis.
VertexInfo[]
FlatNormals(this Pt[] polygon)
Annotates a polygon with normal vectors perpendicular to the polygon (making the polygon appear flat).
string
GenerateObjFile(IEnumerable<ValueTuple<IEnumerable<VertexInfo[]>, string>> models, AutoNormal autoNormal = AutoNormal.None, bool uniqueVertices = false)
Writes the specified models to an .obj file.
string
GenerateObjFile(IEnumerable<Pt[]> faces, string objectName = null, AutoNormal autoNormal = AutoNormal.None, bool uniqueVertices = false)
Writes the specified faces to an .obj file.
string
GenerateObjFile(IEnumerable<VertexInfo[]> faces, string objectName = null, AutoNormal autoNormal = AutoNormal.None, bool uniqueVertices = false)
Pt[]
Move(this Pt[] face, Pt by)
Moves a face by a specified amount in 3D space.
VertexInfo[]
Move(this VertexInfo[] face, Pt by)
IEnumerable<Pt>
Move(this IEnumerable<Pt> face, Pt by)
IEnumerable<VertexInfo>
Move(this IEnumerable<VertexInfo> face, Pt by)
Pt[][]
Move(this Pt[][] faces, Pt by)
Moves a collection of faces by a specified amount in 3D space.
VertexInfo[][]
Move(this VertexInfo[][] faces, Pt by)
IEnumerable<Pt[]>
Move(this IEnumerable<Pt[]> faces, Pt by)
IEnumerable<VertexInfo[]>
Move(this IEnumerable<VertexInfo[]> faces, Pt by)
VertexInfo
Move(this VertexInfo vi, double x = 0, double y = 0, double z = 0)
Moves a vertex by a specified amount along the x-, y- and z-axes.
Pt[]
MoveX(this Pt[] face, double x)
Moves a face by a specified amount along the x-axis.
VertexInfo[]
MoveX(this VertexInfo[] face, double x)
IEnumerable<Pt>
MoveX(this IEnumerable<Pt> face, double x)
IEnumerable<VertexInfo>
MoveX(this IEnumerable<VertexInfo> face, double x)
Pt[][]
MoveX(this Pt[][] faces, double x)
Moves a collection of faces by a specified amount along the x-axis.
VertexInfo[][]
MoveX(this VertexInfo[][] faces, double x)
IEnumerable<Pt[]>
MoveX(this IEnumerable<Pt[]> faces, double x)
IEnumerable<VertexInfo[]>
MoveX(this IEnumerable<VertexInfo[]> faces, double x)
Pt[]
MoveY(this Pt[] face, double y)
Moves a face by a specified amount along the y-axis.
VertexInfo[]
MoveY(this VertexInfo[] face, double y)
IEnumerable<Pt>
MoveY(this IEnumerable<Pt> face, double y)
IEnumerable<VertexInfo>
MoveY(this IEnumerable<VertexInfo> face, double y)
Pt[][]
MoveY(this Pt[][] faces, double y)
Moves a collection of faces by a specified amount along the y-axis.
VertexInfo[][]
MoveY(this VertexInfo[][] faces, double y)
IEnumerable<Pt[]>
MoveY(this IEnumerable<Pt[]> faces, double y)
IEnumerable<VertexInfo[]>
MoveY(this IEnumerable<VertexInfo[]> faces, double y)
Pt[]
MoveZ(this Pt[] face, double z)
Moves a face by a specified amount along the z-axis.
VertexInfo[]
MoveZ(this VertexInfo[] face, double z)
IEnumerable<Pt>
MoveZ(this IEnumerable<Pt> face, double z)
IEnumerable<VertexInfo>
MoveZ(this IEnumerable<VertexInfo> face, double z)
Pt[][]
MoveZ(this Pt[][] faces, double z)
Moves a collection of faces by a specified amount along the z-axis.
VertexInfo[][]
MoveZ(this VertexInfo[][] faces, double z)
IEnumerable<Pt[]>
MoveZ(this IEnumerable<Pt[]> faces, double z)
IEnumerable<VertexInfo[]>
MoveZ(this IEnumerable<VertexInfo[]> faces, double z)
PointD
p(double x, double y)
Instantiates a PointD (2D point).
ValueTuple<string, VertexInfo[][]>
ParseObjFile(string syntax)
Parses a 3D model from .obj file syntax.
double
pow(this double x, double y)
Exponentiation function.
Pt
pt(double x, double y, double z)
Instantiates a Pt (3D point).
MeshVertexInfo
pt(double x, double y, double z, Pt normalOverride)
Instantiates a MeshVertexInfo.
MeshVertexInfo
pt(double x, double y, double z, Normal befX, Normal afX, Normal befY, Normal afY)
Pt
ptp(double r, double θ, double y)
Instantiates a 3D point from polar coordinates on the x/z plane.
IEnumerable<T>
RemoveConsecutiveDuplicates<T>(this IEnumerable<T> source, bool closed)
Removes consecutive duplicates from a collection.
IEnumerable<VertexInfo>
Rotate(this IEnumerable<VertexInfo> face, Pt axisStart, Pt axisEnd, double angle)
Rotates a face counter-clockwise about the specified axis by the specified angle in degrees.
Pt[][]
Rotate(this Pt[][] faces, Pt axisStart, Pt axisEnd, double angle)
Rotates a collection of faces counter-clockwise about the specified axis by the specified angle in degrees.
IEnumerable<Pt[]>
Rotate(this IEnumerable<Pt[]> faces, Pt axisStart, Pt axisEnd, double angle)
VertexInfo[][]
Rotate(this VertexInfo[][] faces, Pt axisStart, Pt axisEnd, double angle)
IEnumerable<VertexInfo[]>
Rotate(this IEnumerable<VertexInfo[]> faces, Pt axisStart, Pt axisEnd, double angle)
VertexInfo
Rotate(this VertexInfo vi, Pt axisStart, Pt axisEnd, double angle)
Rotates a vertex counter-clockwise about the specified axis by the specified angle in degrees.
Pt[]
Rotate(this Pt[] face, Pt axisStart, Pt axisEnd, double angle)
Rotates a face counter-clockwise about the specified axis by the specified angle in degrees.
IEnumerable<Pt>
Rotate(this IEnumerable<Pt> face, Pt axisStart, Pt axisEnd, double angle)
VertexInfo[]
Rotate(this VertexInfo[] face, Pt axisStart, Pt axisEnd, double angle)
IEnumerable<VertexInfo>
RotateX(this IEnumerable<VertexInfo> face, double angle)
Rotates a face counter-clockwise about the x-axis by the specified angle in degrees.
Pt[][]
RotateX(this Pt[][] faces, double angle)
Rotates a collection of faces counter-clockwise about the x-axis by the specified angle in degrees.
IEnumerable<Pt[]>
RotateX(this IEnumerable<Pt[]> faces, double angle)
VertexInfo[][]
RotateX(this VertexInfo[][] faces, double angle)
IEnumerable<VertexInfo[]>
RotateX(this IEnumerable<VertexInfo[]> faces, double angle)
Pt
RotateX(this Pt p, double angle)
Rotates a point counter-clockwise about the x-axis by the specified angle in degrees.
VertexInfo
RotateX(this VertexInfo vi, double angle)
Rotates a vertex counter-clockwise about the x-axis by the specified angle in degrees.
Pt[]
RotateX(this Pt[] face, double angle)
Rotates a face counter-clockwise about the x-axis by the specified angle in degrees.
IEnumerable<Pt>
RotateX(this IEnumerable<Pt> face, double angle)
VertexInfo[]
RotateX(this VertexInfo[] face, double angle)
IEnumerable<VertexInfo>
RotateY(this IEnumerable<VertexInfo> face, double angle)
Rotates a face counter-clockwise about the y-axis by the specified angle in degrees.
Pt[][]
RotateY(this Pt[][] faces, double angle)
Rotates a collection of faces counter-clockwise about the y-axis by the specified angle in degrees.
IEnumerable<Pt[]>
RotateY(this IEnumerable<Pt[]> faces, double angle)
VertexInfo[][]
RotateY(this VertexInfo[][] faces, double angle)
IEnumerable<VertexInfo[]>
RotateY(this IEnumerable<VertexInfo[]> faces, double angle)
Pt
RotateY(this Pt p, double angle)
Rotates a point counter-clockwise about the y-axis by the specified angle in degrees.
VertexInfo
RotateY(this VertexInfo vi, double angle)
Rotates a vertex counter-clockwise about the y-axis by the specified angle in degrees.
Pt[]
RotateY(this Pt[] face, double angle)
Rotates a face counter-clockwise about the y-axis by the specified angle in degrees.
IEnumerable<Pt>
RotateY(this IEnumerable<Pt> face, double angle)
VertexInfo[]
RotateY(this VertexInfo[] face, double angle)
IEnumerable<VertexInfo>
RotateZ(this IEnumerable<VertexInfo> face, double angle)
Rotates a face counter-clockwise about the z-axis by the specified angle in degrees.
Pt[][]
RotateZ(this Pt[][] faces, double angle)
Rotates a collection of faces counter-clockwise about the z-axis by the specified angle in degrees.
IEnumerable<Pt[]>
RotateZ(this IEnumerable<Pt[]> faces, double angle)
VertexInfo[][]
RotateZ(this VertexInfo[][] faces, double angle)
IEnumerable<VertexInfo[]>
RotateZ(this IEnumerable<VertexInfo[]> faces, double angle)
Pt
RotateZ(this Pt p, double angle)
Rotates a point counter-clockwise about the z-axis by the specified angle in degrees.
VertexInfo
RotateZ(this VertexInfo vi, double angle)
Rotates a vertex counter-clockwise about the z-axis by the specified angle in degrees.
Pt[]
RotateZ(this Pt[] face, double angle)
Rotates a face counter-clockwise about the z-axis by the specified angle in degrees.
IEnumerable<Pt>
RotateZ(this IEnumerable<Pt> face, double angle)
VertexInfo[]
RotateZ(this VertexInfo[] face, double angle)
VertexInfo
Scale(this VertexInfo vi, double by)
Scales (stretches or shrinks) a vertex along every axis by the specified multiplicative factor.
Pt[]
Scale(this Pt[] face, double by)
Scales (stretches or shrinks) a face along every axis by the specified multiplicative factor.
VertexInfo[]
Scale(this VertexInfo[] face, double by)
IEnumerable<Pt>
Scale(this IEnumerable<Pt> face, double by)
IEnumerable<VertexInfo>
Scale(this IEnumerable<VertexInfo> face, double by)
Pt[][]
Scale(this Pt[][] faces, double by)
Scales (stretches or shrinks) a collection of faces along every axis by the specified multiplicative factor.
VertexInfo[][]
Scale(this VertexInfo[][] faces, double by)
IEnumerable<Pt[]>
Scale(this IEnumerable<Pt[]> faces, double by)
IEnumerable<VertexInfo[]>
Scale(this IEnumerable<VertexInfo[]> faces, double by)
VertexInfo
ScaleX(this VertexInfo vi, double x)
Scales (stretches or shrinks) a vertex along the x-axis by the specified multiplicative factor.
Pt[]
ScaleX(this Pt[] face, double x)
Scales (stretches or shrinks) a face along the x-axis by the specified multiplicative factor.
VertexInfo[]
ScaleX(this VertexInfo[] face, double x)
IEnumerable<Pt>
ScaleX(this IEnumerable<Pt> face, double x)
IEnumerable<VertexInfo>
ScaleX(this IEnumerable<VertexInfo> face, double x)
Pt[][]
ScaleX(this Pt[][] faces, double x)
Scales (stretches or shrinks) a collection of faces along the x-axis by the specified multiplicative factor.
VertexInfo[][]
ScaleX(this VertexInfo[][] faces, double x)
IEnumerable<Pt[]>
ScaleX(this IEnumerable<Pt[]> faces, double x)
IEnumerable<VertexInfo[]>
ScaleX(this IEnumerable<VertexInfo[]> faces, double x)
VertexInfo
ScaleY(this VertexInfo vi, double y)
Scales (stretches or shrinks) a vertex along the y-axis by the specified multiplicative factor.
Pt[]
ScaleY(this Pt[] face, double y)
Scales (stretches or shrinks) a face along the y-axis by the specified multiplicative factor.
VertexInfo[]
ScaleY(this VertexInfo[] face, double y)
IEnumerable<Pt>
ScaleY(this IEnumerable<Pt> face, double y)
IEnumerable<VertexInfo>
ScaleY(this IEnumerable<VertexInfo> face, double y)
Pt[][]
ScaleY(this Pt[][] faces, double y)
Scales (stretches or shrinks) a collection of faces along the y-axis by the specified multiplicative factor.
VertexInfo[][]
ScaleY(this VertexInfo[][] faces, double y)
IEnumerable<Pt[]>
ScaleY(this IEnumerable<Pt[]> faces, double y)
IEnumerable<VertexInfo[]>
ScaleY(this IEnumerable<VertexInfo[]> faces, double y)
VertexInfo
ScaleZ(this VertexInfo vi, double z)
Scales (stretches or shrinks) a vertex along the z-axis by the specified multiplicative factor.
Pt[]
ScaleZ(this Pt[] face, double z)
Scales (stretches or shrinks) a face along the z-axis by the specified multiplicative factor.
VertexInfo[]
ScaleZ(this VertexInfo[] face, double z)
IEnumerable<Pt>
ScaleZ(this IEnumerable<Pt> face, double z)
IEnumerable<VertexInfo>
ScaleZ(this IEnumerable<VertexInfo> face, double z)
Pt[][]
ScaleZ(this Pt[][] faces, double z)
Scales (stretches or shrinks) a collection of faces along the z-axis by the specified multiplicative factor.
VertexInfo[][]
ScaleZ(this VertexInfo[][] faces, double z)
IEnumerable<Pt[]>
ScaleZ(this IEnumerable<Pt[]> faces, double z)
IEnumerable<VertexInfo[]>
ScaleZ(this IEnumerable<VertexInfo[]> faces, double z)
IEnumerable<TResult>
Select<T, TResult>(this IEnumerable<T> source, Func<T, bool, bool, TResult> selector)
Projects each element of a sequence into a new form by incorporating the element's index.
IEnumerable<TResult>
Select<T, TResult>(this IEnumerable<T> source, Func<T, int, bool, bool, TResult> selector)
IEnumerable<TResult>
SelectManyConsecutivePairs<T, TResult>(this IEnumerable<T> source, bool closed, Func<T, T, IEnumerable<TResult>> selector)
Processes consecutive pairs of a collection into a new collection and concatenates all of the results.
double
sin(double x)
Sine function of an angle in degrees.
IEnumerable<PointD>
SmoothBézier(PointD start, PointD control1, PointD control2, PointD end, double smoothness)
Generates points along a cubic Bézier curve in a way that focuses on consistent smoothness.
double
tan(double x)
Tangent function of an angle in degrees.
VertexInfo[][]
Texturize(this VertexInfo[][] model, double baseY, double rMult)
Applies texture coordinates (UV mapping) to a model by determining the maximum extent along the x- and z-axis and then optionally stretching/shrinking the space according to the y-coordinate. (see also remarks)
IEnumerable<PointD[]>
Triangulate(this IEnumerable<PointD> polygon)
Triangulates a polygon in 2D space.
PointD[][]
Triangulate(this IEnumerable<IEnumerable<PointD>> polygons)
Triangulates a set of polygons in 2D space. Polygons going counter-clockwise are assumed to describe the outline of a face; polygons going clockwise are assumed to describe holes inside of them.
IEnumerable<VertexInfo[]>
TubeFromCurve(IEnumerable<Pt> points, double radius, int revSteps)
Generates a (solid, not hollow) tube from a set of 3D points defining a curve or a set of line segments. The tube is assumed to have a start and end point.
IEnumerable<VertexInfo[]>
TubeFromCurveClosed(IEnumerable<Pt> points, double radius, int revSteps)
Generates a (solid, not hollow) tube from a set of 3D points defining a curve or a set of line segments. The tube is assumed to be a closed curve; the last point is connected back to the first.

Static fields

doubleThe math constant π.