Open Search
    Tetrahedron Struct Reference

    #include <tetrahedron.h>

    Public Member Functions

     Tetrahedron ()
     
     Tetrahedron (const Tetrahedron &)=default
     
     Tetrahedron (Int32 point1, Int32 point2, Int32 point3, Int32 point4, Int32 neighbor1, Int32 neighbor2, Int32 neighbor3, Int32 neighbor4)
     
     ~Tetrahedron ()
     
    void GetPointIndexOfTwoPoints (Int32 startPoint, Int32 endPoint, Int32 &startPointIndex, Int32 &endPointIndex) const
     
    Int32 GetPointIndexOfPoint (Int32 pointIn) const
     
    Int32 GetFaceWithPoints (Int32 point1, Int32 point2, Int32 point3) const
     
    Int32 GetPointOppositeNeighbour (Int32 neighbourIndex) const
     
    void GetFacePoints (Int32 face, IntVector32 &pointList) const
     
    void GetFacePoints (Int32 face, Int32 &point1, Int32 &point2, Int32 &point3) const
     
    Int32 GetFaceIndexSharingTwoPointsButNotInputFace (Int32 notFace, Int32 edgePoint1, Int32 edgePoint2) const
     
    Int32 GetPointOppositeFace (Int32 faceIndex) const
     
    Int32 GetFaceWithNeighbor (Int32 neighbor) const
     
    Int32 GetFaceOppositePoint (Int32 pointIndex) const
     
    void GetFacePointsWithNeighbor (Int32 neighbor, IntVector32 &pointList) const
     
    Bool ChangePointToOtherPoint (Int32 oldPoint, Int32 newPoint)
     
    Vector4d CalcBarycentricOfPoint (const BaseArray< Vector > &pointList, const Vector &testPoint) const
     
    Vector4d CalcBarycentricOfPoint2 (const BaseArray< Vector > &pointList, const Vector &testPoint) const
     

    Public Attributes

    IntVector4d32 points
     
    IntVector4d32 neighbors
     

    Constructor & Destructor Documentation

    ◆ Tetrahedron() [1/3]

    ◆ Tetrahedron() [2/3]

    Tetrahedron ( const Tetrahedron )
    default

    ◆ Tetrahedron() [3/3]

    Tetrahedron ( Int32  point1,
    Int32  point2,
    Int32  point3,
    Int32  point4,
    Int32  neighbor1,
    Int32  neighbor2,
    Int32  neighbor3,
    Int32  neighbor4 
    )

    ◆ ~Tetrahedron()

    Member Function Documentation

    ◆ GetPointIndexOfTwoPoints()

    void GetPointIndexOfTwoPoints ( Int32  startPoint,
    Int32  endPoint,
    Int32 startPointIndex,
    Int32 endPointIndex 
    ) const

    Gets the internal tetrahedron point indices between 0 and 3 of the two input points. This is meant to be a helper to get the indices of an edge. If the index cannot be found it will not be written.

    Parameters
    [in]startPointFirst point index to get the index of.
    [in]endPointSecond point index to get the index of.
    [out]startPointIndexTetrahedron index of the first point.
    [out]endPointIndexTetrahedron index of the second point.

    ◆ GetPointIndexOfPoint()

    Int32 GetPointIndexOfPoint ( Int32  pointIn) const

    Gets the point indices between 0 and 3 of one input point. If the index cannot be found it will not be written.

    Parameters
    [in]pointInPoint index to get the index of.
    Returns
    The points Tetrahedron index.

    ◆ GetFaceWithPoints()

    Int32 GetFaceWithPoints ( Int32  point1,
    Int32  point2,
    Int32  point3 
    ) const

    Gets the internal tetrahedron face index of the face with the 3 indices. only correct if the three points are part of this tetrahedron.

    Parameters
    [in]point1Point index one of the triangle.
    [in]point2Point index two of the triangle.
    [in]point3Point index three of the triangle.
    Returns
    The tetrahedron face index of the the point indices

    ◆ GetPointOppositeNeighbour()

    Int32 GetPointOppositeNeighbour ( Int32  neighbourIndex) const

    Gets the point in this tetrahedron that is opposite of the face with the input neighbor index.

    Parameters
    [in]neighbourIndexThe neighbor index of which the point should be opposite of.
    Returns
    The point index of the point opposite of the neighbor face.

    ◆ GetFacePoints() [1/2]

    void GetFacePoints ( Int32  face,
    IntVector32 pointList 
    ) const

    Gets the three point indices of a face.

    Parameters
    [in]faceThe internal tetrahedron face index.
    [out]pointListA list of the point indices that are building the face.

    ◆ GetFacePoints() [2/2]

    void GetFacePoints ( Int32  face,
    Int32 point1,
    Int32 point2,
    Int32 point3 
    ) const

    Gets the three point indices of a face.

    Parameters
    [in]faceThe internal tetrahedron face index.
    [out]point1Point index one of the face.
    [out]point2Point index two of the face.
    [out]point3Point index three of the face.

    ◆ GetFaceIndexSharingTwoPointsButNotInputFace()

    Int32 GetFaceIndexSharingTwoPointsButNotInputFace ( Int32  notFace,
    Int32  edgePoint1,
    Int32  edgePoint2 
    ) const

    Gets the face index of a face that shares the two edge points but is not the passed face index. Helper method to traverse to the neighbor face over an edge.

    Parameters
    [in]notFaceThe excluded face index that shares the edge.
    [in]edgePoint1Point index one of the edge between two faces.
    [in]edgePoint2Point index two of the edge between two faces.
    Returns
    The internal face index of the neighbor face.

    ◆ GetPointOppositeFace()

    Int32 GetPointOppositeFace ( Int32  faceIndex) const

    Gets the point index of a point opposite of the input face index.

    Parameters
    [in]faceIndexThe face index the returned point should be opposite of.
    Returns
    The point index opposite of the face index.

    ◆ GetFaceWithNeighbor()

    Int32 GetFaceWithNeighbor ( Int32  neighbor) const

    Gets the internal tetrahedron face index of the face with the input neighbor index

    Parameters
    [in]neighborThe neighbor index.
    Returns
    The face index of the face with the neighbor index as neighbor.

    ◆ GetFaceOppositePoint()

    Int32 GetFaceOppositePoint ( Int32  pointIndex) const

    Gets the face index of the face opposite the input point.

    Parameters
    [in]pointIndexThe input point.
    Returns
    The face index of the face opposite the input point.

    ◆ GetFacePointsWithNeighbor()

    void GetFacePointsWithNeighbor ( Int32  neighbor,
    IntVector32 pointList 
    ) const

    Gets a list of points that build up the face with the input neighbor.

    Parameters
    [in]neighborThe neighbor index of the face that the points should be returned.
    [in]pointListThe list of points building up the face.

    ◆ ChangePointToOtherPoint()

    Bool ChangePointToOtherPoint ( Int32  oldPoint,
    Int32  newPoint 
    )

    Changes the point index for one point.

    Parameters
    [in]oldPointThe old index of the point.
    [in]newPointThe new index of the point.
    Returns
    True if something was changed. False if oldPoint was not in this tetrahedron.

    ◆ CalcBarycentricOfPoint()

    Vector4d CalcBarycentricOfPoint ( const BaseArray< Vector > &  pointList,
    const Vector testPoint 
    ) const

    Calculates the barycentric coordinates for a point in relation to this tetrahedron.

    Parameters
    [in]pointListThe list of point positions the tetrahedron references with its point indices.
    [in]testPointThe point the barycentric coordinates should be calculated for.
    Returns
    The barycentric coordinates of testPoint in relation to this tetrahedron.

    ◆ CalcBarycentricOfPoint2()

    Vector4d CalcBarycentricOfPoint2 ( const BaseArray< Vector > &  pointList,
    const Vector testPoint 
    ) const

    Calculates the barycentric coordinates for a point in relation to this tetrahedron.

    Parameters
    [in]pointListThe list of point positions the tetrahedron references with its point indices.
    [in]testPointThe point the barycentric coordinates should be calculated for.
    Returns
    The barycentric coordinates of testPoint in relation to this tetrahedron.

    Member Data Documentation

    ◆ points

    IntVector4d32 points

    ◆ neighbors

    IntVector4d32 neighbors