Class NTMesh3
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public class NTMesh3 : IDeformableMesh, IMesh, IPointSet
Constructors
NTMesh3(DMesh3)
Declaration
public NTMesh3(DMesh3 copy)
Parameters
Type |
Name |
Description |
DMesh3 |
copy |
|
NTMesh3(MeshComponents)
Declaration
public NTMesh3(MeshComponents flags)
Parameters
NTMesh3(NTMesh3)
Declaration
public NTMesh3(NTMesh3 copy)
Parameters
NTMesh3(Boolean, Boolean, Boolean)
Declaration
public NTMesh3(bool bWantNormals = true, bool bWantColors = false, bool bWantTriGroups = false)
Parameters
Fields
InvalidEdge
Declaration
public static readonly Index2i InvalidEdge
Field Value
InvalidID
Declaration
public const int InvalidID = -1
Field Value
InvalidTriangle
Declaration
public static readonly Index3i InvalidTriangle
Field Value
InvalidVertex
Declaration
public static readonly Vector3d InvalidVertex
Field Value
NonManifoldID
Declaration
public const int NonManifoldID = -2
Field Value
Properties
CachedBounds
Declaration
public AxisAlignedBox3d CachedBounds { get; }
Property Value
CachedIsClosed
Declaration
public bool CachedIsClosed { get; }
Property Value
Components
Declaration
public MeshComponents Components { get; }
Property Value
EdgeCount
Declaration
public int EdgeCount { get; }
Property Value
HasTriangleGroups
Declaration
public bool HasTriangleGroups { get; }
Property Value
HasVertexColors
Declaration
public bool HasVertexColors { get; }
Property Value
HasVertexNormals
Declaration
public bool HasVertexNormals { get; }
Property Value
HasVertexUVs
Declaration
public bool HasVertexUVs { get; }
Property Value
IsCompact
Declaration
public bool IsCompact { get; }
Property Value
IsCompactV
Declaration
public bool IsCompactV { get; }
Property Value
MaxEdgeID
Declaration
public int MaxEdgeID { get; }
Property Value
MaxGroupID
Declaration
public int MaxGroupID { get; }
Property Value
MaxTriangleID
Declaration
public int MaxTriangleID { get; }
Property Value
MaxVertexID
Declaration
public int MaxVertexID { get; }
Property Value
ShapeTimestamp
Declaration
public int ShapeTimestamp { get; }
Property Value
Timestamp
Declaration
public int Timestamp { get; }
Property Value
TriangleCount
Declaration
public int TriangleCount { get; }
Property Value
VertexCount
Declaration
public int VertexCount { get; }
Property Value
Methods
AllocateTriangleGroup()
Declaration
public int AllocateTriangleGroup()
Returns
AppendTriangle(Index3i, Int32)
Declaration
public int AppendTriangle(Index3i tv, int gid = -1)
Parameters
Returns
AppendTriangle(Int32, Int32, Int32, Int32)
Declaration
public int AppendTriangle(int v0, int v1, int v2, int gid = -1)
Parameters
Returns
AppendVertex(NewVertexInfo)
Declaration
public int AppendVertex(NewVertexInfo info)
Parameters
Returns
AppendVertex(Vector3d)
Declaration
public int AppendVertex(Vector3d v)
Parameters
Returns
BoundaryEdgeIndices()
Declaration
public IEnumerable<int> BoundaryEdgeIndices()
Returns
CheckValidity(FailMode)
Declaration
public bool CheckValidity(FailMode eFailMode = FailMode.Throw)
Parameters
Type |
Name |
Description |
FailMode |
eFailMode |
|
Returns
Copy(NTMesh3, Boolean, Boolean)
Declaration
public void Copy(NTMesh3 copy, bool bNormals = true, bool bColors = true)
Parameters
debug_check_is_edge(Int32)
Declaration
public void debug_check_is_edge(int e)
Parameters
Type |
Name |
Description |
Int32 |
e |
|
debug_check_is_triangle(Int32)
Declaration
public void debug_check_is_triangle(int t)
Parameters
Type |
Name |
Description |
Int32 |
t |
|
debug_check_is_vertex(Int32)
Declaration
public void debug_check_is_vertex(int v)
Parameters
Type |
Name |
Description |
Int32 |
v |
|
Deconstruct()
Declaration
public DMesh3 Deconstruct()
Returns
DiscardTriangleGroups()
Declaration
public void DiscardTriangleGroups()
DiscardVertexColors()
Declaration
public void DiscardVertexColors()
DiscardVertexNormals()
Declaration
public void DiscardVertexNormals()
edge_has_t(Int32, Int32)
Declaration
protected bool edge_has_t(int eid, int tid)
Parameters
Returns
edge_has_v(Int32, Int32)
Declaration
protected bool edge_has_v(int eid, int vid)
Parameters
Returns
edge_is_boundary(Int32)
Declaration
protected bool edge_is_boundary(int eid)
Parameters
Type |
Name |
Description |
Int32 |
eid |
|
Returns
edge_other_v(Int32, Int32)
Declaration
protected int edge_other_v(int eID, int vID)
Parameters
Returns
EdgeIndices()
Declaration
public IEnumerable<int> EdgeIndices()
Returns
EdgeTrianglesCount(Int32)
Declaration
public int EdgeTrianglesCount(int eID)
Parameters
Type |
Name |
Description |
Int32 |
eID |
|
Returns
EdgeTrianglesItr(Int32)
Declaration
public IEnumerable<int> EdgeTrianglesItr(int eID)
Parameters
Type |
Name |
Description |
Int32 |
eID |
|
Returns
EnableTriangleGroups(Int32)
Declaration
public void EnableTriangleGroups(int initial_group = 0)
Parameters
Type |
Name |
Description |
Int32 |
initial_group |
|
EnableVertexColors(Vector3f)
Declaration
public void EnableVertexColors(Vector3f initial_color)
Parameters
Type |
Name |
Description |
Vector3f |
initial_color |
|
EnableVertexNormals(Vector3f)
Declaration
public void EnableVertexNormals(Vector3f initial_normal)
Parameters
Type |
Name |
Description |
Vector3f |
initial_normal |
|
find_tri_neighbour_edge(Int32, Int32, Int32)
Declaration
protected int find_tri_neighbour_edge(int tID, int vA, int vB)
Parameters
Returns
find_tri_neighbour_index(Int32, Int32, Int32)
Declaration
protected int find_tri_neighbour_index(int tID, int vA, int vB)
Parameters
Returns
FindEdge(Int32, Int32)
Declaration
public int FindEdge(int vA, int vB)
Parameters
Returns
FindEdgeFromTri(Int32, Int32, Int32)
Declaration
public int FindEdgeFromTri(int vA, int vB, int t)
Parameters
Returns
GetBounds()
Declaration
public AxisAlignedBox3d GetBounds()
Returns
GetEdgeV(Int32)
Declaration
public Index2i GetEdgeV(int eID)
Parameters
Type |
Name |
Description |
Int32 |
eID |
|
Returns
GetEdgeV(Int32, ref Vector3d, ref Vector3d)
Declaration
public bool GetEdgeV(int eID, ref Vector3d a, ref Vector3d b)
Parameters
Returns
GetMaxVtxEdgeCount()
Declaration
public int GetMaxVtxEdgeCount()
Returns
GetOrientedBoundaryEdgeV(Int32)
Declaration
public Index2i GetOrientedBoundaryEdgeV(int eID)
Parameters
Type |
Name |
Description |
Int32 |
eID |
|
Returns
GetTriangle(Int32)
Declaration
public Index3i GetTriangle(int tID)
Parameters
Type |
Name |
Description |
Int32 |
tID |
|
Returns
GetTriangleGroup(Int32)
Declaration
public int GetTriangleGroup(int tID)
Parameters
Type |
Name |
Description |
Int32 |
tID |
|
Returns
GetTriArea(Int32)
Declaration
public double GetTriArea(int tID)
Parameters
Type |
Name |
Description |
Int32 |
tID |
|
Returns
GetTriBounds(Int32)
Declaration
public AxisAlignedBox3d GetTriBounds(int tID)
Parameters
Type |
Name |
Description |
Int32 |
tID |
|
Returns
GetTriEdge(Int32, Int32)
Declaration
public int GetTriEdge(int tid, int j)
Parameters
Returns
GetTriEdges(Int32)
Declaration
public Index3i GetTriEdges(int tID)
Parameters
Type |
Name |
Description |
Int32 |
tID |
|
Returns
GetTriFrame(Int32, Int32)
Declaration
public Frame3f GetTriFrame(int tID, int nEdge = 0)
Parameters
Returns
GetTriInfo(Int32, out Vector3d, out Double, out Vector3d)
Declaration
public void GetTriInfo(int tID, out Vector3d normal, out double fArea, out Vector3d vCentroid)
Parameters
GetTriNormal(Int32)
Declaration
public Vector3d GetTriNormal(int tID)
Parameters
Type |
Name |
Description |
Int32 |
tID |
|
Returns
GetTriVertex(Int32, Int32)
Declaration
public Vector3d GetTriVertex(int tid, int j)
Parameters
Returns
GetTriVertices(Int32, ref Vector3d, ref Vector3d, ref Vector3d)
Declaration
public void GetTriVertices(int tID, ref Vector3d v0, ref Vector3d v1, ref Vector3d v2)
Parameters
GetVertex(Int32)
Declaration
public Vector3d GetVertex(int vID)
Parameters
Type |
Name |
Description |
Int32 |
vID |
|
Returns
GetVertex(Int32, ref NewVertexInfo, Boolean, Boolean, Boolean)
Declaration
public bool GetVertex(int vID, ref NewVertexInfo vinfo, bool bWantNormals, bool bWantColors, bool bWantUVs)
Parameters
Returns
GetVertexAll(Int32)
Declaration
public NewVertexInfo GetVertexAll(int i)
Parameters
Type |
Name |
Description |
Int32 |
i |
|
Returns
GetVertexColor(Int32)
Declaration
public Vector3f GetVertexColor(int vID)
Parameters
Type |
Name |
Description |
Int32 |
vID |
|
Returns
GetVertexf(Int32)
Declaration
public Vector3f GetVertexf(int vID)
Parameters
Type |
Name |
Description |
Int32 |
vID |
|
Returns
GetVertexNormal(Int32)
Declaration
public Vector3f GetVertexNormal(int vID)
Parameters
Type |
Name |
Description |
Int32 |
vID |
|
Returns
GetVertexUV(Int32)
Declaration
public Vector2f GetVertexUV(int i)
Parameters
Type |
Name |
Description |
Int32 |
i |
|
Returns
GetVtxEdgeCount(Int32)
Declaration
public int GetVtxEdgeCount(int vID)
Parameters
Type |
Name |
Description |
Int32 |
vID |
|
Returns
GetVtxTriangleCount(Int32, Boolean)
return # of triangles attached to vID, or -1 if invalid vertex
Declaration
public int GetVtxTriangleCount(int vID, bool bBruteForce = false)
Parameters
Returns
GetVtxTriangles(Int32, List<Int32>)
Declaration
public MeshResult GetVtxTriangles(int vID, List<int> vTriangles)
Parameters
Returns
IsBoundaryEdge(Int32)
Declaration
public bool IsBoundaryEdge(int eid)
Parameters
Type |
Name |
Description |
Int32 |
eid |
|
Returns
IsBoundaryTriangle(Int32)
Declaration
public bool IsBoundaryTriangle(int tID)
Parameters
Type |
Name |
Description |
Int32 |
tID |
|
Returns
IsBoundaryVertex(Int32)
Declaration
public bool IsBoundaryVertex(int vID)
Parameters
Type |
Name |
Description |
Int32 |
vID |
|
Returns
IsBowtieVertex(Int32)
returns true if vID is a "bowtie" vertex, ie multiple disjoint triangle sets in one-ring
Declaration
public bool IsBowtieVertex(int vID)
Parameters
Type |
Name |
Description |
Int32 |
vID |
|
Returns
IsClosed()
Declaration
Returns
IsEdge(Int32)
Declaration
public bool IsEdge(int eID)
Parameters
Type |
Name |
Description |
Int32 |
eID |
|
Returns
IsNonManifoldEdge(Int32)
Declaration
public bool IsNonManifoldEdge(int eid)
Parameters
Type |
Name |
Description |
Int32 |
eid |
|
Returns
IsTriangle(Int32)
Declaration
public bool IsTriangle(int tID)
Parameters
Type |
Name |
Description |
Int32 |
tID |
|
Returns
IsVertex(Int32)
Declaration
public bool IsVertex(int vID)
Parameters
Type |
Name |
Description |
Int32 |
vID |
|
Returns
PokeTriangle(Int32, out NTMesh3.PokeTriangleInfo)
Declaration
public virtual MeshResult PokeTriangle(int tid, out NTMesh3.PokeTriangleInfo result)
Parameters
Returns
PokeTriangle(Int32, Vector3d, out NTMesh3.PokeTriangleInfo)
Declaration
public virtual MeshResult PokeTriangle(int tid, Vector3d baryCoordinates, out NTMesh3.PokeTriangleInfo result)
Parameters
Returns
RemoveTriangle(Int32, Boolean)
Remove a tID from the mesh. Also removes any unreferenced edges after tri is removed.
If bRemoveIsolatedVertices is false, then if you remove all tris from a vert, that vert is also removed.
If bPreserveManifold, we check that you will not create a bowtie vertex (and return false).
If this check is not done, you have to make sure you don't create a bowtie, because other
code assumes we don't have bowties, and will not handle it properly
Declaration
public MeshResult RemoveTriangle(int tID, bool bRemoveIsolatedVertices = true)
Parameters
Type |
Name |
Description |
Int32 |
tID |
|
Boolean |
bRemoveIsolatedVertices |
|
Returns
SetTriangleGroup(Int32, Int32)
Declaration
public void SetTriangleGroup(int tid, int group_id)
Parameters
SetVertex(Int32, Vector3d)
Declaration
public void SetVertex(int vID, Vector3d vNewPos)
Parameters
SetVertexColor(Int32, Vector3f)
Declaration
public void SetVertexColor(int vID, Vector3f vNewColor)
Parameters
SetVertexNormal(Int32, Vector3f)
Declaration
public void SetVertexNormal(int vID, Vector3f vNewNormal)
Parameters
SetVertexUV(Int32, Vector2f)
Declaration
public void SetVertexUV(int vID, Vector2f UV)
Parameters
SplitEdge(Int32, out NTMesh3.EdgeSplitInfo)
Declaration
public MeshResult SplitEdge(int eab, out NTMesh3.EdgeSplitInfo split)
Parameters
Returns
SplitEdge(Int32, Int32, out NTMesh3.EdgeSplitInfo)
Declaration
public MeshResult SplitEdge(int vA, int vB, out NTMesh3.EdgeSplitInfo split)
Parameters
Returns
tri_has_neighbour_t(Int32, Int32)
Declaration
protected bool tri_has_neighbour_t(int tCheck, int tNbr)
Parameters
Returns
tri_has_sequential_v(Int32, Int32, Int32)
Declaration
protected bool tri_has_sequential_v(int tID, int vA, int vB)
Parameters
Returns
tri_has_v(Int32, Int32)
Declaration
protected bool tri_has_v(int tID, int vID)
Parameters
Returns
tri_is_boundary(Int32)
Declaration
protected bool tri_is_boundary(int tID)
Parameters
Type |
Name |
Description |
Int32 |
tID |
|
Returns
TriangleIndices()
Declaration
public IEnumerable<int> TriangleIndices()
Returns
Triangles()
Declaration
public IEnumerable<Index3i> Triangles()
Returns
TriTrianglesItr(Int32)
Declaration
public IEnumerable<int> TriTrianglesItr(int tID)
Parameters
Type |
Name |
Description |
Int32 |
tID |
|
Returns
vertex_is_boundary(Int32)
Declaration
public bool vertex_is_boundary(int vID)
Parameters
Type |
Name |
Description |
Int32 |
vID |
|
Returns
VertexIndices()
Declaration
public IEnumerable<int> VertexIndices()
Returns
Vertices()
Declaration
public IEnumerable<Vector3d> Vertices()
Returns
VtxAllBoundaryEdges(Int32, Int32[])
e needs to be large enough (ie call VtxBoundaryEdges, or as large as max one-ring)
returns count, ie number of elements of e that were filled
Declaration
public int VtxAllBoundaryEdges(int vID, int[] e)
Parameters
Returns
VtxBoundaryEdges(Int32)
Returns count of boundary edges at vertex
Declaration
public int VtxBoundaryEdges(int vID)
Parameters
Type |
Name |
Description |
Int32 |
vID |
|
Returns
VtxEdgesItr(Int32)
Declaration
public IEnumerable<int> VtxEdgesItr(int vID)
Parameters
Type |
Name |
Description |
Int32 |
vID |
|
Returns
VtxTrianglesItr(Int32)
Declaration
public IEnumerable<int> VtxTrianglesItr(int vID)
Parameters
Type |
Name |
Description |
Int32 |
vID |
|
Returns
VtxVerticesItr(Int32)
Declaration
public IEnumerable<int> VtxVerticesItr(int vID)
Parameters
Type |
Name |
Description |
Int32 |
vID |
|
Returns
Implements