ProGAL.geom3d.complex
Class CTetrahedron

java.lang.Object
  extended by ProGAL.geom3d.volumes.Tetrahedron
      extended by ProGAL.geom3d.complex.CTetrahedron
All Implemented Interfaces:
Shape, Simplex, Volume

public class CTetrahedron
extends Tetrahedron

An extension of the normal Tetrahedron that is used in complexes. In addition to the four corner-points, pointers to the triangular faces (of the type CTriangle) and the four neighboring tetrahedra are maintained.

Author:
R.Fonseca

Constructor Summary
CTetrahedron(CVertex p0, CVertex p1, CVertex p2, CVertex p3)
           
 
Method Summary
 int apexid(int index)
           
 boolean containsBigPoint()
          For computational convenience, the representation of a complex is based on a big tetrahedron that encloses all vertices.
 boolean containsPoint(CVertex p)
           
 boolean containsTriangle(CTriangle t)
           
 CTetrahedron findNeighbour(CVertex v)
          returns neighbouring tetrahedron containing v as the oppposite vertex
 int findpoint(CVertex p)
           
 CVertex findVertex(CTetrahedron tetr)
           
 CVertex[] getCommonVertices(CTetrahedron tetr)
          returns the vertices shared by two tetrahedra.
 int getID(CVertex v)
           
 CTetrahedron getNeighbour(CVertex v)
          returns neighbour tetrahedron containing specified vertex
 CTetrahedron getNeighbour(int index)
           
 int getNumberBigPoints()
           
 Plane getPlane(CTetrahedron tetr)
          returns plane through common triangle of this and another tetrahedron.
 CVertex getPoint(int i)
          Return the specified corner-point.
 CTriangle getTriangle(int index)
           
 boolean isFlat()
           
 boolean isModified()
           
 CTriangle oppositeTriangle(CVertex v)
           
 CVertex oppositeVertex(CTriangle base)
          TODO: Copy to Tetrahedron
 void setFlat(boolean flat)
           
 void setModified(boolean modified)
           
 void setNeighbour(int index, CTetrahedron t)
           
 void setPoint(CVertex p, int i)
           
 void setTriangle(int index, CTriangle t)
           
 void toScene(J3DScene scene, double rad, java.awt.Color clr)
           
 void updateNeighbour(CTetrahedron lookfor, CTetrahedron replacement)
           
 
Methods inherited from class ProGAL.geom3d.volumes.Tetrahedron
blowUp, circumCenter, circumRadius, circumSphere, clone, getCenter, getCommonTriangle, getCorner, getCorners, getDimension, getInradius, getVolume, incenter, isAcute, isInside, main, overlaps, regularTetrahedron, setPoint, toConsole, toConsole, toScene, toString, toString, translate, translate, translate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CTetrahedron

public CTetrahedron(CVertex p0,
                    CVertex p1,
                    CVertex p2,
                    CVertex p3)
Method Detail

setFlat

public void setFlat(boolean flat)

setModified

public void setModified(boolean modified)

setPoint

public void setPoint(CVertex p,
                     int i)

setNeighbour

public void setNeighbour(int index,
                         CTetrahedron t)

setTriangle

public void setTriangle(int index,
                        CTriangle t)

getPoint

public CVertex getPoint(int i)
Description copied from class: Tetrahedron
Return the specified corner-point. Throws an error if c<0 || c>3.

Specified by:
getPoint in interface Simplex
Overrides:
getPoint in class Tetrahedron

getNeighbour

public CTetrahedron getNeighbour(int index)

getTriangle

public CTriangle getTriangle(int index)

isModified

public boolean isModified()

isFlat

public boolean isFlat()

containsBigPoint

public boolean containsBigPoint()
For computational convenience, the representation of a complex is based on a big tetrahedron that encloses all vertices. It has 4 so-called 'big points' as corners. This method indicates if this tetrahedron has one of these 'big points' as corners.

See Also:
RegularComplex

getNumberBigPoints

public int getNumberBigPoints()

getNeighbour

public CTetrahedron getNeighbour(CVertex v)
returns neighbour tetrahedron containing specified vertex


getID

public int getID(CVertex v)

getCommonVertices

public CVertex[] getCommonVertices(CTetrahedron tetr)
returns the vertices shared by two tetrahedra.


getPlane

public Plane getPlane(CTetrahedron tetr)
returns plane through common triangle of this and another tetrahedron. The apex of this tetrahedron is below the plane.


updateNeighbour

public void updateNeighbour(CTetrahedron lookfor,
                            CTetrahedron replacement)

findpoint

public int findpoint(CVertex p)

findNeighbour

public CTetrahedron findNeighbour(CVertex v)
returns neighbouring tetrahedron containing v as the oppposite vertex


findVertex

public CVertex findVertex(CTetrahedron tetr)

containsPoint

public boolean containsPoint(CVertex p)

containsTriangle

public boolean containsTriangle(CTriangle t)

oppositeVertex

public CVertex oppositeVertex(CTriangle base)
TODO: Copy to Tetrahedron


oppositeTriangle

public CTriangle oppositeTriangle(CVertex v)

apexid

public int apexid(int index)

toScene

public void toScene(J3DScene scene,
                    double rad,
                    java.awt.Color clr)