org.jcae.mesh.amibe.ds
Class Triangle

java.lang.Object
  extended by org.jcae.mesh.amibe.ds.Triangle
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
TriangleHE, TriangleVH

public class Triangle
extends java.lang.Object
implements java.io.Serializable

A triangle containing adjacency relations.

See Also:
Serialized Form

Nested Class Summary
static class Triangle.List
          Singly linked list of triangles.
 
Field Summary
protected  boolean readable
           
protected  Traits traits
           
protected  TriangleTraitsBuilder traitsBuilder
           
 Vertex[] vertex
          Three vertices.
protected  boolean writable
           
 
Constructor Summary
Triangle(TriangleTraitsBuilder builder)
           
 
Method Summary
 void clearAttributes(int attr)
          Resets attributes for all edges of this triangle.
 void copy(Triangle src)
           
 AbstractHalfEdge getAbstractHalfEdge()
          Gets an AbstractHalfEdge instance bound to this triangle.
 AbstractHalfEdge getAbstractHalfEdge(AbstractHalfEdge that)
          Gets an AbstractHalfEdge instance bound to this triangle.
 int getGroupId()
          Return the group identifier of this triangle.
 boolean hasAttributes(int attr)
          Checks if some attributes of this triangle are set.
 boolean isReadable()
           
 boolean isWritable()
           
 void setAttributes(int attr)
          Sets attributes for all edges of this triangle.
 void setGroupId(int g)
          Set the group identifier of this triangle.
 void setReadable(boolean b)
           
 void setWritable(boolean b)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

traitsBuilder

protected final TriangleTraitsBuilder traitsBuilder

traits

protected final Traits traits

vertex

public Vertex[] vertex
Three vertices.


readable

protected boolean readable

writable

protected boolean writable
Constructor Detail

Triangle

public Triangle(TriangleTraitsBuilder builder)
Method Detail

copy

public void copy(Triangle src)

setAttributes

public void setAttributes(int attr)
Sets attributes for all edges of this triangle.

Parameters:
attr - attributes to set on edges

clearAttributes

public void clearAttributes(int attr)
Resets attributes for all edges of this triangle.

Parameters:
attr - attributes to reset on edges

hasAttributes

public boolean hasAttributes(int attr)
Checks if some attributes of this triangle are set.

Parameters:
attr - attributes to check
Returns:
true if any edge of this triangle has one of these attributes set, false otherwise

getAbstractHalfEdge

public AbstractHalfEdge getAbstractHalfEdge()
Gets an AbstractHalfEdge instance bound to this triangle.


getAbstractHalfEdge

public AbstractHalfEdge getAbstractHalfEdge(AbstractHalfEdge that)
Gets an AbstractHalfEdge instance bound to this triangle.


getGroupId

public int getGroupId()
Return the group identifier of this triangle.

Returns:
the group identifier of this triangle.

setGroupId

public void setGroupId(int g)
Set the group identifier of this triangle.

Parameters:
g - the group identifier of this triangle.

setReadable

public void setReadable(boolean b)

setWritable

public void setWritable(boolean b)

isReadable

public boolean isReadable()

isWritable

public boolean isWritable()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object