C# 클래스 HelixToolkit.Wpf.MeshBuilder

Builds MeshGeometry3D objects.
Performance tips for MeshGeometry3D (See MSDN)

High impact: Mesh animation—changing the individual vertices of a mesh on a per-frame basis—is not always efficient in Windows Presentation Foundation (WPF). To minimize the performance impact of change notifications when each vertex is modified, detach the mesh from the visual tree before performing per-vertex modification. Once the mesh has been modified, reattach it to the visual tree. Also, try to minimize the size of meshes that will be animated in this way.

Medium impact: When a mesh is defined as abutting triangles with shared vertices and those vertices have the same position, normal, and texture coordinates, define each shared vertex only once and then define your triangles by index with TriangleIndices.

Low impact: To minimize the construction time of large collections in Windows Presentation Foundation (WPF), such as a MeshGeometry3D’s Positions, Normal vectors, TextureCoordinates, and TriangleIndices, pre-size the collections before value population. If possible, pass the collections’ constructors prepopulated data structures such as arrays or Lists.

파일 보기 프로젝트 열기: litdev1/LitDev 1 사용 예제들

공개 메소드들

메소드 설명
AddArrow ( System.Windows.Media.Media3D.Point3D point1, System.Windows.Media.Media3D.Point3D point2, double diameter, double headLength = 3, double headDiameter = 2, int thetaDiv = 18 ) : void

Adds an arrow to the mesh.

AddBoundingBox ( System.Windows.Media.Media3D.Rect3D boundingBox, double diameter ) : void

Adds the edges of a bounding box as cylinders.

AddBox ( System.Windows.Media.Media3D.Point3D center, double xlength, double ylength, double zlength ) : void

Adds a box aligned with the X, Y and Z axes.

AddBox ( System.Windows.Media.Media3D.Point3D center, double xlength, double ylength, double zlength, BoxFaces faces ) : void

Adds a box with the specified faces, aligned with the X, Y and Z axes.

AddBox ( System.Windows.Media.Media3D.Rect3D rectangle ) : void

Adds a box aligned with the X, Y and Z axes.

AddCone ( System.Windows.Media.Media3D.Point3D origin, System.Windows.Media.Media3D.Point3D apex, double baseRadius, bool baseCap, int thetaDiv ) : void

Adds a cone.

AddCone ( System.Windows.Media.Media3D.Point3D origin, System.Windows.Media.Media3D.Vector3D direction, double baseRadius, double topRadius, double height, bool baseCap, bool topCap, int thetaDiv ) : void

Adds a (possibly truncated) cone.

See http://en.wikipedia.org/wiki/Cone_(geometry).

AddCubeFace ( System.Windows.Media.Media3D.Point3D center, System.Windows.Media.Media3D.Vector3D normal, System.Windows.Media.Media3D.Vector3D up, double dist, double width, double height ) : void

Adds a cube face.

AddCylinder ( System.Windows.Media.Media3D.Point3D p1, System.Windows.Media.Media3D.Point3D p2, double diameter, int thetaDiv ) : void

Adds a cylinder to the mesh.

See http://en.wikipedia.org/wiki/Cylinder_(geometry).

AddEdges ( IList points, IList edges, double diameter, int thetaDiv ) : void

Adds a collection of edges as cylinders.

AddExtrudedGeometry ( IList points, System.Windows.Media.Media3D.Vector3D xaxis, System.Windows.Media.Media3D.Point3D p0, System.Windows.Media.Media3D.Point3D p1 ) : void

Adds an extruded surface of the specified curve.

The y-axis is determined by the cross product between the specified x-axis and the p1-p0 vector.

AddLoftedGeometry ( IList positionsList, IList normalList, IList textureCoordinateList ) : void

Adds a lofted surface.

See http://en.wikipedia.org/wiki/Loft_(3D).

AddNode ( System.Windows.Media.Media3D.Point3D position, System.Windows.Media.Media3D.Vector3D normal, Point textureCoordinate ) : void

Adds a single node.

AddPipe ( System.Windows.Media.Media3D.Point3D point1, System.Windows.Media.Media3D.Point3D point2, double innerDiameter, double diameter, int thetaDiv ) : void

Adds a (possibly hollow) pipe.

AddPolygon ( IList points ) : void

Adds a polygon.

If the number of points is greater than 4, a triangle fan is used.

AddPolygon ( IList vertexIndices ) : void

Adds a polygon specified by vertex index (uses a triangle fan).

AddPolygonByCuttingEars ( IList vertexIndices ) : void

Adds a polygon defined by vertex indices (uses the cutting ears algorithm).

AddPyramid ( System.Windows.Media.Media3D.Point3D center, double sideLength, double height ) : void

Adds a pyramid.

See http://en.wikipedia.org/wiki/Pyramid_(geometry).

AddQuad ( System.Windows.Media.Media3D.Point3D p0, System.Windows.Media.Media3D.Point3D p1, System.Windows.Media.Media3D.Point3D p2, System.Windows.Media.Media3D.Point3D p3 ) : void

Adds a quadrilateral polygon.

See http://en.wikipedia.org/wiki/Quadrilateral.

AddQuad ( System.Windows.Media.Media3D.Point3D p0, System.Windows.Media.Media3D.Point3D p1, System.Windows.Media.Media3D.Point3D p2, System.Windows.Media.Media3D.Point3D p3, Point uv0, Point uv1, Point uv2, Point uv3 ) : void

Adds a quadrilateral polygon.

See http://en.wikipedia.org/wiki/Quadrilateral.

AddQuads ( IList quadPositions, IList quadNormals, IList quadTextureCoordinates ) : void

Adds a list of quadrilateral polygons.

AddRectangularMesh ( IList points, int columns ) : void

Adds a rectangular mesh (m x n points).

AddRectangularMesh ( System.Windows.Media.Media3D.Point3D points, Point texCoords = null, bool closed0 = false, bool closed1 = false ) : void

Adds a rectangular mesh defined by a two-dimensional array of points.

AddRegularIcosahedron ( System.Windows.Media.Media3D.Point3D center, double radius, bool shareVertices ) : void

Adds a regular icosahedron.

See Wikipedia and link.

AddRevolvedGeometry ( IList points, System.Windows.Media.Media3D.Point3D origin, System.Windows.Media.Media3D.Vector3D direction, int thetaDiv ) : void

Adds a surface of revolution.

See http://en.wikipedia.org/wiki/Surface_of_revolution.

AddSphere ( System.Windows.Media.Media3D.Point3D center, double radius, int thetaDiv = 20, int phiDiv = 10 ) : void

Adds a sphere.

AddSubdivisionSphere ( System.Windows.Media.Media3D.Point3D center, double radius, int subdivisions ) : void

Adds a sphere (by subdividing a regular icosahedron).

See link.

AddTriangle ( System.Windows.Media.Media3D.Point3D p0, System.Windows.Media.Media3D.Point3D p1, System.Windows.Media.Media3D.Point3D p2 ) : void

Adds a triangle.

AddTriangle ( System.Windows.Media.Media3D.Point3D p0, System.Windows.Media.Media3D.Point3D p1, System.Windows.Media.Media3D.Point3D p2, Point uv0, Point uv1, Point uv2 ) : void

Adds a triangle.

AddTriangleFan ( IList fanPositions, IList fanNormals = null, IList fanTextureCoordinates = null ) : void

Adds a triangle fan to the mesh

AddTriangleFan ( IList vertices ) : void

Adds a triangle fan.

AddTriangleStrip ( IList stripPositions, IList stripNormals = null, IList stripTextureCoordinates = null ) : void

Adds a triangle strip to the mesh.

See http://en.wikipedia.org/wiki/Triangle_strip.

AddTriangles ( IList trianglePositions, IList triangleNormals = null, IList triangleTextureCoordinates = null ) : void

Adds a list of triangles.

AddTube ( IList path, IList values, IList diameters, IList section, bool isTubeClosed, bool isSectionClosed ) : void

Adds a tube with a custom section.

AddTube ( IList path, double values, double diameters, int thetaDiv, bool isTubeClosed ) : void

Adds a tube.

AddTube ( IList path, double diameter, int thetaDiv, bool isTubeClosed ) : void

Adds a tube.

Append ( IList positionsToAppend, IList triangleIndicesToAppend, IList normalsToAppend = null, IList textureCoordinatesToAppend = null ) : void

Appends the specified points and triangles.

Append ( MeshBuilder mesh ) : void

Appends the specified mesh.

Append ( System.Windows.Media.Media3D.MeshGeometry3D mesh ) : void

Appends the specified mesh.

ChamferCorner ( System.Windows.Media.Media3D.Point3D p, double d, double eps = 1e-6, IList chamferPoints = null ) : void

Chamfers the specified corner (experimental code).

CheckPerformanceLimits ( ) : void

Checks the performance limits.

See MSDN. Try to keep mesh sizes under these limits: Positions : 20,001 point instances TriangleIndices : 60,003 integer instances

GetCircle ( int thetaDiv ) : IList

Gets a circle section (cached).

MeshBuilder ( ) : System

Initializes a new instance of the MeshBuilder class.

Normal and texture coordinate generation are included.

MeshBuilder ( bool generateNormals, bool generateTextureCoordinates ) : System

Initializes a new instance of the MeshBuilder class.

Scale ( double scaleX, double scaleY, double scaleZ ) : void

Scales the positions (and normal vectors).

SubdivideLinear ( bool barycentric = false ) : void

Performs a linear subdivision of the mesh.

ToMesh ( bool freeze = false ) : System.Windows.Media.Media3D.MeshGeometry3D

Converts the geometry to a MeshGeometry3D .

비공개 메소드들

메소드 설명
AddRectangularMeshNormals ( int index0, int rows, int columns ) : void

Adds normal vectors for a rectangular mesh.

AddRectangularMeshTextureCoordinates ( int rows, int columns ) : void

Adds texture coordinates for a rectangular mesh.

AddRectangularMeshTriangleIndices ( int index0, int rows, int columns, bool isSpherical = false ) : void

Add triangle indices for a rectangular mesh.

AddRectangularMeshTriangleIndices ( int index0, int rows, int columns, bool rowsClosed, bool columnsClosed ) : void

Adds triangular indices for a rectangular mesh.

FindCornerNormal ( System.Windows.Media.Media3D.Point3D p, double eps ) : System.Windows.Media.Media3D.Vector3D

Finds the average normal to the specified corner (experimental code).

GetUnitSphere ( int subdivisions ) : System.Windows.Media.Media3D.MeshGeometry3D

Gets a unit sphere from the cache.

NoSharedVertices ( ) : void

Makes sure no triangles share the same vertex.

Subdivide4 ( ) : void

Subdivides each triangle into four sub-triangles.

SubdivideBarycentric ( ) : void

Subdivides each triangle into six triangles. Adds a vertex at the midpoint of each triangle.

See http://en.wikipedia.org/wiki/Barycentric_subdivision

메소드 상세

AddArrow() 공개 메소드

Adds an arrow to the mesh.
public AddArrow ( System.Windows.Media.Media3D.Point3D point1, System.Windows.Media.Media3D.Point3D point2, double diameter, double headLength = 3, double headDiameter = 2, int thetaDiv = 18 ) : void
point1 System.Windows.Media.Media3D.Point3D /// The start point. ///
point2 System.Windows.Media.Media3D.Point3D /// The end point. ///
diameter double /// The diameter of the arrow cylinder. ///
headLength double /// Length of the head (relative to diameter). ///
headDiameter double
thetaDiv int /// The number of divisions around the arrow. ///
리턴 void

AddBoundingBox() 공개 메소드

Adds the edges of a bounding box as cylinders.
public AddBoundingBox ( System.Windows.Media.Media3D.Rect3D boundingBox, double diameter ) : void
boundingBox System.Windows.Media.Media3D.Rect3D /// The bounding box. ///
diameter double /// The diameter of the cylinders. ///
리턴 void

AddBox() 공개 메소드

Adds a box aligned with the X, Y and Z axes.
public AddBox ( System.Windows.Media.Media3D.Point3D center, double xlength, double ylength, double zlength ) : void
center System.Windows.Media.Media3D.Point3D /// The center point of the box. ///
xlength double /// The length of the box along the X axis. ///
ylength double /// The length of the box along the Y axis. ///
zlength double /// The length of the box along the Z axis. ///
리턴 void

AddBox() 공개 메소드

Adds a box with the specified faces, aligned with the X, Y and Z axes.
public AddBox ( System.Windows.Media.Media3D.Point3D center, double xlength, double ylength, double zlength, BoxFaces faces ) : void
center System.Windows.Media.Media3D.Point3D /// The center point of the box. ///
xlength double /// The length of the box along the X axis. ///
ylength double /// The length of the box along the Y axis. ///
zlength double /// The length of the box along the Z axis. ///
faces BoxFaces /// The faces to include. ///
리턴 void

AddBox() 공개 메소드

Adds a box aligned with the X, Y and Z axes.
public AddBox ( System.Windows.Media.Media3D.Rect3D rectangle ) : void
rectangle System.Windows.Media.Media3D.Rect3D /// The 3-D "rectangle". ///
리턴 void

AddCone() 공개 메소드

Adds a cone.
public AddCone ( System.Windows.Media.Media3D.Point3D origin, System.Windows.Media.Media3D.Point3D apex, double baseRadius, bool baseCap, int thetaDiv ) : void
origin System.Windows.Media.Media3D.Point3D The origin point.
apex System.Windows.Media.Media3D.Point3D The apex point.
baseRadius double The base radius.
baseCap bool /// Include a base cap if set to true . ///
thetaDiv int The theta div.
리턴 void

AddCone() 공개 메소드

Adds a (possibly truncated) cone.
See http://en.wikipedia.org/wiki/Cone_(geometry).
public AddCone ( System.Windows.Media.Media3D.Point3D origin, System.Windows.Media.Media3D.Vector3D direction, double baseRadius, double topRadius, double height, bool baseCap, bool topCap, int thetaDiv ) : void
origin System.Windows.Media.Media3D.Point3D /// The origin. ///
direction System.Windows.Media.Media3D.Vector3D /// The direction (normalization not required). ///
baseRadius double /// The base radius. ///
topRadius double /// The top radius. ///
height double /// The height. ///
baseCap bool /// Include a base cap if set to true . ///
topCap bool /// Include the top cap if set to true . ///
thetaDiv int /// The number of divisions around the cone. ///
리턴 void

AddCubeFace() 공개 메소드

Adds a cube face.
public AddCubeFace ( System.Windows.Media.Media3D.Point3D center, System.Windows.Media.Media3D.Vector3D normal, System.Windows.Media.Media3D.Vector3D up, double dist, double width, double height ) : void
center System.Windows.Media.Media3D.Point3D /// The center of the cube. ///
normal System.Windows.Media.Media3D.Vector3D /// The normal vector for the face. ///
up System.Windows.Media.Media3D.Vector3D /// The up vector for the face. ///
dist double /// The distance from the center of the cube to the face. ///
width double /// The width of the face. ///
height double /// The height of the face. ///
리턴 void

AddCylinder() 공개 메소드

Adds a cylinder to the mesh.
See http://en.wikipedia.org/wiki/Cylinder_(geometry).
public AddCylinder ( System.Windows.Media.Media3D.Point3D p1, System.Windows.Media.Media3D.Point3D p2, double diameter, int thetaDiv ) : void
p1 System.Windows.Media.Media3D.Point3D /// The first point. ///
p2 System.Windows.Media.Media3D.Point3D /// The second point. ///
diameter double /// The diameters. ///
thetaDiv int /// The number of divisions around the cylinder. ///
리턴 void

AddEdges() 공개 메소드

Adds a collection of edges as cylinders.
public AddEdges ( IList points, IList edges, double diameter, int thetaDiv ) : void
points IList /// The points. ///
edges IList /// The edge indices. ///
diameter double /// The diameter of the cylinders. ///
thetaDiv int /// The number of divisions around the cylinders. ///
리턴 void

AddExtrudedGeometry() 공개 메소드

Adds an extruded surface of the specified curve.
The y-axis is determined by the cross product between the specified x-axis and the p1-p0 vector.
public AddExtrudedGeometry ( IList points, System.Windows.Media.Media3D.Vector3D xaxis, System.Windows.Media.Media3D.Point3D p0, System.Windows.Media.Media3D.Point3D p1 ) : void
points IList /// The 2D points describing the curve to extrude. ///
xaxis System.Windows.Media.Media3D.Vector3D /// The x-axis. ///
p0 System.Windows.Media.Media3D.Point3D /// The start origin of the extruded surface. ///
p1 System.Windows.Media.Media3D.Point3D /// The end origin of the extruded surface. ///
리턴 void

AddLoftedGeometry() 공개 메소드

Adds a lofted surface.
See http://en.wikipedia.org/wiki/Loft_(3D).
public AddLoftedGeometry ( IList positionsList, IList normalList, IList textureCoordinateList ) : void
positionsList IList /// List of lofting sections. ///
normalList IList /// The normal list. ///
textureCoordinateList IList /// The texture coordinate list. ///
리턴 void

AddNode() 공개 메소드

Adds a single node.
public AddNode ( System.Windows.Media.Media3D.Point3D position, System.Windows.Media.Media3D.Vector3D normal, Point textureCoordinate ) : void
position System.Windows.Media.Media3D.Point3D /// The position. ///
normal System.Windows.Media.Media3D.Vector3D /// The normal. ///
textureCoordinate Point /// The texture coordinate. ///
리턴 void

AddPipe() 공개 메소드

Adds a (possibly hollow) pipe.
public AddPipe ( System.Windows.Media.Media3D.Point3D point1, System.Windows.Media.Media3D.Point3D point2, double innerDiameter, double diameter, int thetaDiv ) : void
point1 System.Windows.Media.Media3D.Point3D /// The start point. ///
point2 System.Windows.Media.Media3D.Point3D /// The end point. ///
innerDiameter double /// The inner diameter. ///
diameter double /// The outer diameter. ///
thetaDiv int /// The number of divisions around the pipe. ///
리턴 void

AddPolygon() 공개 메소드

Adds a polygon.
If the number of points is greater than 4, a triangle fan is used.
public AddPolygon ( IList points ) : void
points IList /// The points of the polygon. ///
리턴 void

AddPolygon() 공개 메소드

Adds a polygon specified by vertex index (uses a triangle fan).
public AddPolygon ( IList vertexIndices ) : void
vertexIndices IList The vertex indices.
리턴 void

AddPolygonByCuttingEars() 공개 메소드

Adds a polygon defined by vertex indices (uses the cutting ears algorithm).
public AddPolygonByCuttingEars ( IList vertexIndices ) : void
vertexIndices IList The vertex indices.
리턴 void

AddPyramid() 공개 메소드

Adds a pyramid.
See http://en.wikipedia.org/wiki/Pyramid_(geometry).
public AddPyramid ( System.Windows.Media.Media3D.Point3D center, double sideLength, double height ) : void
center System.Windows.Media.Media3D.Point3D /// The center. ///
sideLength double /// Length of the sides of the pyramid. ///
height double /// The height of the pyramid. ///
리턴 void

AddQuad() 공개 메소드

Adds a quadrilateral polygon.
See http://en.wikipedia.org/wiki/Quadrilateral.
public AddQuad ( System.Windows.Media.Media3D.Point3D p0, System.Windows.Media.Media3D.Point3D p1, System.Windows.Media.Media3D.Point3D p2, System.Windows.Media.Media3D.Point3D p3 ) : void
p0 System.Windows.Media.Media3D.Point3D /// The first point. ///
p1 System.Windows.Media.Media3D.Point3D /// The second point. ///
p2 System.Windows.Media.Media3D.Point3D /// The third point. ///
p3 System.Windows.Media.Media3D.Point3D /// The fourth point. ///
리턴 void

AddQuad() 공개 메소드

Adds a quadrilateral polygon.
See http://en.wikipedia.org/wiki/Quadrilateral.
public AddQuad ( System.Windows.Media.Media3D.Point3D p0, System.Windows.Media.Media3D.Point3D p1, System.Windows.Media.Media3D.Point3D p2, System.Windows.Media.Media3D.Point3D p3, Point uv0, Point uv1, Point uv2, Point uv3 ) : void
p0 System.Windows.Media.Media3D.Point3D /// The first point. ///
p1 System.Windows.Media.Media3D.Point3D /// The second point. ///
p2 System.Windows.Media.Media3D.Point3D /// The third point. ///
p3 System.Windows.Media.Media3D.Point3D /// The fourth point. ///
uv0 Point /// The first texture coordinate. ///
uv1 Point /// The second texture coordinate. ///
uv2 Point /// The third texture coordinate. ///
uv3 Point /// The fourth texture coordinate. ///
리턴 void

AddQuads() 공개 메소드

Adds a list of quadrilateral polygons.
public AddQuads ( IList quadPositions, IList quadNormals, IList quadTextureCoordinates ) : void
quadPositions IList /// The points. ///
quadNormals IList /// The normal vectors. ///
quadTextureCoordinates IList /// The texture coordinates. ///
리턴 void

AddRectangularMesh() 공개 메소드

Adds a rectangular mesh (m x n points).
public AddRectangularMesh ( IList points, int columns ) : void
points IList /// The one-dimensional array of points. The points are stored row-by-row. ///
columns int /// The number of columns in the rectangular mesh. ///
리턴 void

AddRectangularMesh() 공개 메소드

Adds a rectangular mesh defined by a two-dimensional array of points.
public AddRectangularMesh ( System.Windows.Media.Media3D.Point3D points, Point texCoords = null, bool closed0 = false, bool closed1 = false ) : void
points System.Windows.Media.Media3D.Point3D /// The points. ///
texCoords Point /// The texture coordinates (optional). ///
closed0 bool /// set to true if the mesh is closed in the first dimension. ///
closed1 bool /// set to true if the mesh is closed in the second dimension. ///
리턴 void

AddRegularIcosahedron() 공개 메소드

Adds a regular icosahedron.
See Wikipedia and link.
public AddRegularIcosahedron ( System.Windows.Media.Media3D.Point3D center, double radius, bool shareVertices ) : void
center System.Windows.Media.Media3D.Point3D /// The center. ///
radius double /// The radius. ///
shareVertices bool /// Share vertices if set to true . ///
리턴 void

AddRevolvedGeometry() 공개 메소드

Adds a surface of revolution.
See http://en.wikipedia.org/wiki/Surface_of_revolution.
public AddRevolvedGeometry ( IList points, System.Windows.Media.Media3D.Point3D origin, System.Windows.Media.Media3D.Vector3D direction, int thetaDiv ) : void
points IList /// The points (x coordinates are radius, y coordinates are distance from the origin along the axis of revolution) ///
origin System.Windows.Media.Media3D.Point3D /// The origin of the revolution axis. ///
direction System.Windows.Media.Media3D.Vector3D /// The direction of the revolution axis. ///
thetaDiv int /// The number of divisions around the mesh. ///
리턴 void

AddSphere() 공개 메소드

Adds a sphere.
public AddSphere ( System.Windows.Media.Media3D.Point3D center, double radius, int thetaDiv = 20, int phiDiv = 10 ) : void
center System.Windows.Media.Media3D.Point3D /// The center of the sphere. ///
radius double /// The radius of the sphere. ///
thetaDiv int /// The number of divisions around the sphere. ///
phiDiv int /// The number of divisions from top to bottom of the sphere. ///
리턴 void

AddSubdivisionSphere() 공개 메소드

Adds a sphere (by subdividing a regular icosahedron).
See link.
public AddSubdivisionSphere ( System.Windows.Media.Media3D.Point3D center, double radius, int subdivisions ) : void
center System.Windows.Media.Media3D.Point3D /// The center of the sphere. ///
radius double /// The radius of the sphere. ///
subdivisions int /// The number of triangular subdivisions of the original icosahedron. ///
리턴 void

AddTriangle() 공개 메소드

Adds a triangle.
public AddTriangle ( System.Windows.Media.Media3D.Point3D p0, System.Windows.Media.Media3D.Point3D p1, System.Windows.Media.Media3D.Point3D p2 ) : void
p0 System.Windows.Media.Media3D.Point3D /// The first point. ///
p1 System.Windows.Media.Media3D.Point3D /// The second point. ///
p2 System.Windows.Media.Media3D.Point3D /// The third point. ///
리턴 void

AddTriangle() 공개 메소드

Adds a triangle.
public AddTriangle ( System.Windows.Media.Media3D.Point3D p0, System.Windows.Media.Media3D.Point3D p1, System.Windows.Media.Media3D.Point3D p2, Point uv0, Point uv1, Point uv2 ) : void
p0 System.Windows.Media.Media3D.Point3D /// The first point. ///
p1 System.Windows.Media.Media3D.Point3D /// The second point. ///
p2 System.Windows.Media.Media3D.Point3D /// The third point. ///
uv0 Point /// The first texture coordinate. ///
uv1 Point /// The second texture coordinate. ///
uv2 Point /// The third texture coordinate. ///
리턴 void

AddTriangleFan() 공개 메소드

Adds a triangle fan to the mesh
public AddTriangleFan ( IList fanPositions, IList fanNormals = null, IList fanTextureCoordinates = null ) : void
fanPositions IList /// The points of the triangle fan. ///
fanNormals IList /// The normal vectors of the triangle fan. ///
fanTextureCoordinates IList /// The texture coordinates of the triangle fan. ///
리턴 void

AddTriangleFan() 공개 메소드

Adds a triangle fan.
public AddTriangleFan ( IList vertices ) : void
vertices IList /// The vertex indices of the triangle fan. ///
리턴 void

AddTriangleStrip() 공개 메소드

Adds a triangle strip to the mesh.
See http://en.wikipedia.org/wiki/Triangle_strip.
public AddTriangleStrip ( IList stripPositions, IList stripNormals = null, IList stripTextureCoordinates = null ) : void
stripPositions IList /// The points of the triangle strip. ///
stripNormals IList /// The normal vectors of the triangle strip. ///
stripTextureCoordinates IList /// The texture coordinates of the triangle strip. ///
리턴 void

AddTriangles() 공개 메소드

Adds a list of triangles.
public AddTriangles ( IList trianglePositions, IList triangleNormals = null, IList triangleTextureCoordinates = null ) : void
trianglePositions IList /// The points (the number of points must be a multiple of 3). ///
triangleNormals IList /// The normal vectors (corresponding to the points). ///
triangleTextureCoordinates IList /// The texture coordinates (corresponding to the points). ///
리턴 void

AddTube() 공개 메소드

Adds a tube with a custom section.
public AddTube ( IList path, IList values, IList diameters, IList section, bool isTubeClosed, bool isSectionClosed ) : void
path IList /// A list of points defining the centers of the tube. ///
values IList /// The texture coordinate X values (optional). ///
diameters IList /// The diameters (optional). ///
section IList /// The section to extrude along the tube path. ///
isTubeClosed bool /// If the tube is closed set to true . ///
isSectionClosed bool /// if set to true [is section closed]. ///
리턴 void

AddTube() 공개 메소드

Adds a tube.
public AddTube ( IList path, double values, double diameters, int thetaDiv, bool isTubeClosed ) : void
path IList /// A list of points defining the centers of the tube. ///
values double /// The texture coordinate X-values (optional). ///
diameters double /// The diameters (optional). ///
thetaDiv int /// The number of divisions around the tube. ///
isTubeClosed bool /// Set to true if the tube path is closed. ///
리턴 void

AddTube() 공개 메소드

Adds a tube.
public AddTube ( IList path, double diameter, int thetaDiv, bool isTubeClosed ) : void
path IList /// A list of points defining the centers of the tube. ///
diameter double /// The diameter of the tube. ///
thetaDiv int /// The number of divisions around the tube. ///
isTubeClosed bool /// Set to true if the tube path is closed. ///
리턴 void

Append() 공개 메소드

Appends the specified points and triangles.
public Append ( IList positionsToAppend, IList triangleIndicesToAppend, IList normalsToAppend = null, IList textureCoordinatesToAppend = null ) : void
positionsToAppend IList /// The points to append. ///
triangleIndicesToAppend IList /// The triangle indices to append. ///
normalsToAppend IList /// The normal vectors to append. ///
textureCoordinatesToAppend IList /// The texture coordinates to append. ///
리턴 void

Append() 공개 메소드

Appends the specified mesh.
public Append ( MeshBuilder mesh ) : void
mesh MeshBuilder /// The mesh. ///
리턴 void

Append() 공개 메소드

Appends the specified mesh.
public Append ( System.Windows.Media.Media3D.MeshGeometry3D mesh ) : void
mesh System.Windows.Media.Media3D.MeshGeometry3D /// The mesh. ///
리턴 void

ChamferCorner() 공개 메소드

Chamfers the specified corner (experimental code).
public ChamferCorner ( System.Windows.Media.Media3D.Point3D p, double d, double eps = 1e-6, IList chamferPoints = null ) : void
p System.Windows.Media.Media3D.Point3D /// The corner point. ///
d double /// The chamfer distance. ///
eps double /// The corner search limit distance. ///
chamferPoints IList /// If this parameter is provided, the collection will be filled with the generated chamfer points. ///
리턴 void

CheckPerformanceLimits() 공개 메소드

Checks the performance limits.
See MSDN. Try to keep mesh sizes under these limits: Positions : 20,001 point instances TriangleIndices : 60,003 integer instances
public CheckPerformanceLimits ( ) : void
리턴 void

GetCircle() 공개 정적인 메소드

Gets a circle section (cached).
public static GetCircle ( int thetaDiv ) : IList
thetaDiv int /// The number of division. ///
리턴 IList

MeshBuilder() 공개 메소드

Initializes a new instance of the MeshBuilder class.
Normal and texture coordinate generation are included.
public MeshBuilder ( ) : System
리턴 System

MeshBuilder() 공개 메소드

Initializes a new instance of the MeshBuilder class.
public MeshBuilder ( bool generateNormals, bool generateTextureCoordinates ) : System
generateNormals bool /// Generate normal vectors. ///
generateTextureCoordinates bool /// Generate texture coordinates. ///
리턴 System

Scale() 공개 메소드

Scales the positions (and normal vectors).
public Scale ( double scaleX, double scaleY, double scaleZ ) : void
scaleX double /// The X scale factor. ///
scaleY double /// The Y scale factor. ///
scaleZ double /// The Z scale factor. ///
리턴 void

SubdivideLinear() 공개 메소드

Performs a linear subdivision of the mesh.
public SubdivideLinear ( bool barycentric = false ) : void
barycentric bool /// Barycentric(?) if set to true . ///
리턴 void

ToMesh() 공개 메소드

Converts the geometry to a MeshGeometry3D .
public ToMesh ( bool freeze = false ) : System.Windows.Media.Media3D.MeshGeometry3D
freeze bool /// freeze the mesh if set to true . ///
리턴 System.Windows.Media.Media3D.MeshGeometry3D