IMesh_DG Interface
- GetVertexList
- GetSimplexList
- GetVertexPosition
- GetVertexPosition1
- GetNormal
- GetNormal1
- GetSimplexVertices
- IsValid
- SetVertexPosition
- SetVertexPosition1
- SetNormal
- SetNormal1
- FixupNormals
- Offset
- Clear
- ClearList
- Begin
- End
- SwapSide
- ToLocal
- ToGlobal
- EnableShading
- IsShadingEnabled
- GetVertexColor
- SetVertexColor
- IsShaderInitOK
- DeleteShader
- GetVertex
- GetSimplex
- GetVertexListPosition
- GetSimplexListPosition
- Upgrade
- IsUpgraded
- Downgrade
- IsClosedSurface
- Extract
- Extract2
- Merge
- SplitLinkedComponents
- Refine
- SmoothLaplacian
- AddVertex
- RemoveVertex
- AddSimplex
- RemoveSimplex
IList_DG GetVertexList()
IList_DG GetSimplexList()
Point_DG GetVertexPosition(POSNT vertex)
void GetVertexPosition1(POSNT vertex, double x, double y, double z)
VectDg GetNormal(POSNT vertex)
void GetNormal1(POSNT vertex, double vx, double vy, double vz)
void GetSimplexVertices(POSNT simplex, POSNT vert0, POSNT vert1, POSNT vert2)
bool IsValid()
If this method returns false (invalid mesh), IError_DG interface can be used to retrieve the related error messages.
void SetVertexPosition(POSNT vertex, Point_DG pt)
void SetVertexPosition1(POSNT vertex, double x, double y, double z)
void SetNormal(POSNT vertex, VectDg normal)
void SetNormal1(POSNT vertex, double vx, double vy, double vz)
void FixupNormals(double creaseDegrees, double tolerDegrees)
The creaseDegrees is used to decide whether a segment (edge of a simplex) between two adjacent simplices (faces) belongs to a smooth part
of the surface being approximated by this mesh, or it is inside an edge of the surface between two smooth patches joined at a non-zero angle.
If angle between normals of two adjacent simplices is smaller than creaseDegrees, then the segment is considered a part of a smooth surface.
Depending on the application, creaseDegrees = 45 is a reasonable guess.
If angle between old normal and a newly calculated normal is smaller than tolerDegrees, the normal is not modified. Set tolerDegrees to sero to always update normals.
void Offset(double dist)
void Clear()
void ClearList(MeshElementType_DG dim)
void Begin()
void End(int action)
void SwapSide()
void ToLocal(IFrame_DG frame)
void ToGlobal(IFrame_DG frame)
void EnableShading(bool enable)
bool IsShadingEnabled()
Color GetVertexColor(POSNT vertex)
void SetVertexColor(POSNT vertex, Color color)
void IsShaderInitOK(bool ret)
void DeleteShader()
IVertex_DG GetVertex(POSN vertex)
ISimplex_DG GetSimplex(POSN simplex)
POSN GetVertexListPosition(IVertex_DG iVertex)
POSN GetSimplexListPosition(ISimplex_DG iSimplex)
void Upgrade()
bool IsUpgraded()
void Downgrade()
bool IsClosedSurface()
IMesh_DG Extract(IObject_DG proximity, int elements, bool move, bool clone)
Returns part of this mesh completely inside the 3D area defined by surface of proximity. See comments for the Merge() method below for meaning of the other parameters.
See also: Mesh Ops sample
IMesh_DG Extract2(IFrame_DG frameOfThis, IObject_DG proximity, int elements, bool move, bool clone)
Returns part of this mesh completely inside the 3D area defined by surface of proximity. See comments for the Merge() method below for meaning of the other parameters.
frameOfThis is normally location of the entity, where this mesh belongs (obtained via IEntity_DG.GetLocation()). It defines the frame, elements of this mesh have coordinates relative to.
See also: Mesh Ops sample
void Merge(IMesh_DG mesh, int elements, bool move, bool clone)
elements identifies which lists to merge. Bit 0 - vertices, bit 1 - segments (edges), bit 2 - simplicies. Set elements=4 if only simplicies are to be merged.
Add elements += 2 to merge segments as well. Add elements += 1 to merge vertices also.
The safer method is to merge simplices only (elements=4) and call ClearList(MeshElementType_DG.Segment) and ClearList(MeshElementType_DG.Vertex)
to make sure the lists remain in synch. The derived vertex and segment lists are updated as necessary when an operation requires it.
If the mesh is part of an entity, a call to IGeometry_DG.SetModified() is required to make sure the entity is notified about the low-level modification. Otherwise the surface may not be updated in the view.
If move is true, the identified lists are cleared in mesh.
If clone is true, elementes in the identified lists of mesh are cloned before being added to this mesh.
IArray_DG SplitLinkedComponents(IMapUint64_DG map)
void Refine(MeshRefineType_DG type)
void SmoothLaplacian(int steps)
POSN AddVertex()
void RemoveVertex(POSN vertex)
POSN AddSimplex(POSN vert0, POSN vert1, POSN vert2, double creaseAngle)
void RemoveSimplex(POSN simplex)
|