SolidKit3D.TriangleByRef struct

From Solid Graphics Wiki

Jump to: navigation, search
SolidKit3D.TriangleByRef struct
Namespace: SolidKit3D
Base type: (None)
Assembly: SolidKit.dll
Platform: .NET

The TriangleByRef struct specifies a triangle using three integer values. The values specify indexes into a point array which contain actual triangle points coordinates. Therefore using this type is always accompanied by using some kind of point array type, usually the SolidKit3D.PointList class.




Fields

Field name Type Description
point0 int index of the first triangle point
point1 int index of the second triangle point
point2 int index of the third triangle point

Methods

Method name Description
(indexer) Allows to access triangle point indexes by index. Use index 0 to retrieve point0, use index 1 to retrieve point1, use index 2 to retrieve point2.
Area Calculates the triangle area.
Center Calculates the triangle center point
NormalVector Calculates triangle's normal vector
IsSharingPoint Determines whether the triangle is sharing a point with anothr triangle
FindPointIndex Returns index (0, 1 or 2 ) into it's point field for given point id (point index). If the point id is not used by the triangle then it returns -1.
FindEdge Returns index of specified edge, or -1 if edge does is not a part of the triangle. Orientation of the specified edge is ignored during the search.
FindOrientedEdge Returns index of specified edge, or -1 if edge does is not a part of the triangle. Orientation of the specified edge is NOT ignored during the search.
FindNonCommonPointIndex Returns index (0, 1, or 2) of first non-common point index of two triangles, or -1 if both triangles use the same points.
AddOffset Increments all the point field indexes by given offset.
Reorient Reverses the triangle's orientation.
IsSmall Returns true if any of the two triangle points are closer to each other than the cMinDistance 'constant'. Otherwise it returns false.
IsValid Returns true if the triangle definition is invalid - if any two of it's point indexes reference the same point in the point array. Otherwise it returns false.
IsEqualTo Returns true if two triangles have all points common. Otherwise returns false. The function ignores triangles orientation.
LoadFromXML Loads the triangle definition from XmlReader.
SaveToXML Saves triangle definition into MemoryBuffer as XML.

See Also

   


SolidKit Library Documentation

Personal tools