Class MeshFace
Graphical representation of a Face.
Namespace: ABB.Robotics.RobotStudio.Stations
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
public sealed class MeshFace : MeshBase
Constructors
MeshFace()
Creates an empty MeshFace.
Declaration
public MeshFace()
Properties
BodyId
ABB internal use.
Declaration
public int BodyId { get; }
Property Value
Type | Description |
---|---|
Int32 |
BoundingBox
Gets the BoundingBox of this MeshFace.
Declaration
public BoundingBox BoundingBox { get; set; }
Property Value
Type | Description |
---|---|
BoundingBox |
CenterPoints
Gets a list of Vector3 that correspond to the center points of a geometric primitive.
Declaration
public List<Vector3> CenterPoints { get; }
Property Value
Type | Description |
---|---|
List<Vector3> |
EndPoints
Gets a list of Vector3 that correspond to the end points of a geometric primitive.
Declaration
public List<Vector3> EndPoints { get; }
Property Value
Type | Description |
---|---|
List<Vector3> |
Face
Declaration
public Face Face { get; }
Property Value
Type | Description |
---|---|
Face |
FaceId
ABB internal use.
Declaration
public int FaceId { get; }
Property Value
Type | Description |
---|---|
Int32 |
Flags
Declaration
public MeshFlags Flags { get; set; }
Property Value
Type | Description |
---|---|
MeshFlags |
Material
Declaration
public Material Material { get; set; }
Property Value
Type | Description |
---|---|
Material |
MidPoints
Gets a list of Vector3 that correspond to the mid points of a geometric primitive.
Declaration
public List<Vector3> MidPoints { get; }
Property Value
Type | Description |
---|---|
List<Vector3> |
Normals
Gets the list of normals in this MeshFace.
Declaration
public List<Vector3> Normals { get; }
Property Value
Type | Description |
---|---|
List<Vector3> |
Remarks
For triangular faces, the number of normals must equal the number of vertices.
TextureCoordinates
Gets the list of texture coordinates in this MeshFace.
Declaration
public List<Vector2> TextureCoordinates { get; }
Property Value
Type | Description |
---|---|
List<Vector2> |
Remarks
For triangular faces, the number of texture coordinates must be either zero or equal to the number of vertices.
TriangleIndices
Gets the list of indices for the surface representation of this mesh.
Declaration
public List<int> TriangleIndices { get; }
Property Value
Type | Description |
---|---|
List<Int32> |
Remarks
Each triangle is defined by three indices into the vertex list.
VertexWeightIndices
ABB Internal use.
Declaration
public List<int> VertexWeightIndices { get; }
Property Value
Type | Description |
---|---|
List<Int32> |
VertexWeights
ABB Internal use.
Declaration
public List<float> VertexWeights { get; }
Property Value
Type | Description |
---|---|
List<Single> |
Vertices
Gets the list of vertices in this MeshFace.
Declaration
public List<Vector3> Vertices { get; }
Property Value
Type | Description |
---|---|
List<Vector3> |
WireIndices
Gets the list of indices for the wire representation of this mesh.
Declaration
public List<int> WireIndices { get; }
Property Value
Type | Description |
---|---|
List<Int32> |
Remarks
Wire indices can be defined in two ways:
- Either as continuous segments ending with -1, e.g [0, 1, 2, -1, 3, 4, 5, -1]
- or as individual wires, e.g. [0, 1, 1, 2, 3, 4, 4, 5] When retrieveing values from an existing mesh, the second reprentation is always used.
Methods
Clone()
Returns a deep clone of this MeshFace.
Declaration
public MeshFace Clone()
Returns
Type | Description |
---|---|
MeshFace | The cloned face. |
GenerateNormals(Double)
Generate new normals for this MeshFace.
Declaration
public void GenerateNormals(double splitAngle)
Parameters
Type | Name | Description |
---|---|---|
Double | splitAngle | The maximum angle for sharing normal between triangles. |
SubdivideTriangles(Double)
Subdivides large triangles by splitting the longest edge in the middle.
Declaration
public void SubdivideTriangles(double maxEdgeLength)
Parameters
Type | Name | Description |
---|---|---|
Double | maxEdgeLength | Maximum length of triangle edges |
Transform(Matrix4)
Transforms all vertices and normals in the MeshFace.
Declaration
public void Transform(Matrix4 matrix)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | matrix |
UpdateMaterial()
Updates the rendered Material for an existing mesh without having to rebuild it
Declaration
public void UpdateMaterial()