/// <summary> /// Constructor with the HalfEdgeMesh and three Vertex Indices. /// Since also the Positions are clear, the <see cref="Normal"/> and the <see cref="Area"/> are calculated. /// </summary> /// <param name="triangleMesh">The HalfEdgeMesh this Vertex belongs to.</param> /// <param name="vertex1">Index of the first Vertex.</param> /// <param name="vertex2">Index of the second Vertex.</param> /// <param name="vertex3">Index of the third Vertex.</param> public Triangle(HalfEdgeMesh triangleMesh, int vertex1, int vertex2, int vertex3) : this(vertex1, vertex2, vertex3) { TriangleMesh = triangleMesh; }
/// <summary> /// Constructor with the HalfEdgeMesh and Position Values. /// </summary> /// <param name="triangleMesh">The HalfEdgeMesh this Vertex belongs to.</param> /// <param name="position">The Position of the Vertex.</param> /// <param name="textureCoordinate">The TextureCoordinate of the Vertex.</param> /// <param name="normal">The Normal of the Vertex.</param> public Vertex(HalfEdgeMesh triangleMesh, Float3 position, Float3 textureCoordinate, Vector normal) : this(triangleMesh, position, textureCoordinate) { _normal = normal; }
/// <summary> /// Constructor that uses an existing HalfEdgeMesh to create a new HalfEdgeMesh. /// </summary> /// <param name="triangle">Existing HalfEdgeMesh.</param> public HalfEdgeMesh(HalfEdgeMesh mesh) { _vertices = new List <Vertex>(mesh.Vertices); _triangles = new List <Triangle>(mesh.Triangles); _halfEdges = new List <HalfEdge>(mesh.HalfEdges); }
/// <summary> /// Constructor with the HalfEdgeMesh and Position Values. /// </summary> /// <param name="triangleMesh">The HalfEdgeMesh this Vertex belongs to.</param> /// <param name="position">The Position of the Vertex.</param> public Vertex(HalfEdgeMesh triangleMesh, Float3 position) : this(position) { TriangleMesh = triangleMesh; }
/// <summary> /// Constructor with the HalfEdgeMesh and Position Values. /// </summary> /// <param name="triangleMesh">The HalfEdgeMesh this Vertex belongs to.</param> /// <param name="position">The Position of the Vertex.</param> /// <param name="textureCoordinate">The TextureCoordinate of the Vertex.</param> public Vertex(HalfEdgeMesh triangleMesh, Float3 position, Float3 textureCoordinate) : this(triangleMesh, position) { _textureCoordinate = textureCoordinate; }
/// <summary> /// Constructor with the HalfEdgeMesh and Position Values. /// </summary> /// <param name="triangleMesh">The HalfEdgeMesh this Vertex belongs to.</param> /// <param name="x">X Position of the Vertex.</param> /// <param name="y">Y Position of the Vertex.</param> /// <param name="z">Z Position of the Vertex.</param> /// <param name="u">U TextureCoordinate of the Vertex.</param> /// <param name="v">V TextureCoordinate of the Vertex.</param> /// <param name="w">W TextureCoordinate of the Vertex.</param> /// <param name="nx">X Direction of the Normal of the Vertex.</param> /// <param name="ny">Y Direction of the Normal of the Vertex.</param> /// <param name="nz">Z Direction of the Normal of the Vertex.</param> public Vertex(HalfEdgeMesh triangleMesh, float x, float y, float z, float u, float v, float w, float nx, float ny, float nz) : this(x, y, z, u, v, w, nx, ny, nz) { TriangleMesh = triangleMesh; }
/// <summary> /// Constructor with the HalfEdgeMesh and Position Values. /// </summary> /// <param name="triangleMesh">The HalfEdgeMesh this Vertex belongs to.</param> /// <param name="x">X Position of the Vertex.</param> /// <param name="y">Y Position of the Vertex.</param> /// <param name="z">Z Position of the Vertex.</param> /// <param name="u">U TextureCoordinate of the Vertex.</param> /// <param name="v">V TextureCoordinate of the Vertex.</param> /// <param name="w">W TextureCoordinate of the Vertex.</param> public Vertex(HalfEdgeMesh triangleMesh, float x, float y, float z, float u, float v, float w) : this(x, y, z, u, v, w) { TriangleMesh = triangleMesh; }
/// <summary> /// Constructor with the HalfEdgeMesh and Position Values. /// </summary> /// <param name="triangleMesh">The HalfEdgeMesh this Vertex belongs to.</param> /// <param name="x">X Position of the Vertex.</param> /// <param name="y">Y Position of the Vertex.</param> /// <param name="z">Z Position of the Vertex.</param> public Vertex(HalfEdgeMesh triangleMesh, float x, float y, float z) : this(x, y, z) { TriangleMesh = triangleMesh; }
/// <summary> /// Constructor with the HalfEdgeMesh and other Arguments. /// </summary> /// <param name="triangleMesh">The HalfEdgeMesh this HalfEdge belongs to.</param> /// <param name="index">The Index of this HalfEdge in the HalfEdgeMesh.</param> /// <param name="startIndex">Index of the <see cref="StartVertex"/>.</param> /// <param name="endIndex">Index of the <see cref="EndVertex"/>.</param> /// <param name="triangleIndex">The Index of the Triangle this HalfEdge belongs to.</param> public HalfEdge(HalfEdgeMesh triangleMesh, int index, int startIndex, int endIndex, int triangleIndex) : this(triangleMesh, startIndex, endIndex) { Index = index; _triangleIndex = triangleIndex; }
/// <summary> /// Constructor with the HalfEdgeMesh and the Index of the <see cref="StartVertex"/>. /// Since also the Positions are clear, the <see cref="Length"/> is calculated. /// </summary> /// <param name="triangleMesh">The HalfEdgeMesh this HalfEdge belongs to.</param> /// <param name="startIndex">Index of the <see cref="StartVertex"/>.</param> /// <param name="endIndex">Index of the <see cref="EndVertex"/>.</param> public HalfEdge(HalfEdgeMesh triangleMesh, int startIndex, int endIndex) : this(startIndex, endIndex) { TriangleMesh = triangleMesh; }