#include <topology.hh>
Public Member Functions | |
Triangle (Edge &edg0, Edge &edg1, Edge &edg2, const Attribute attrib=Attribute()) | |
virtual Triangle * | child (uint i, bool mode=0) |
virtual const Triangle * | child (uint i) const |
Edge * | edge (uint i) const |
Vertex * | vertex (uint i) const |
Z2 | rho (int i) const |
Triangle * | clone (Edge &edg0, Edge &edg1, Edge &edg2) const |
int | operator== (const Connector &cntr) const |
Comparison operator. | |
const Key & | key () const |
Returns the key of the connector. | |
const Attribute & | attrib () const |
Returns the attribute of the connector. | |
void | setAttrib (uint attrb) |
int | related (const Connector &conn) const |
Protected Member Functions | |
virtual std::ostream & | info (std::ostream &os) const |
Returns information in an output stream. | |
Protected Attributes | |
Key | key_ |
Unique key of the connector. | |
Attribute | attrib_ |
Attribute. | |
Static Protected Attributes | |
static uint | cnt_ |
A triangle in the topology. Implements the abstract methods from the parent classes to query the children, the vertices and the edges of the triangle.
Every edge can have two different orientations in the triangle, this orientation is stored in the array rho.
Definition at line 193 of file topology.hh.
concepts::Triangle::Triangle | ( | Edge & | edg0, |
Edge & | edg1, | ||
Edge & | edg2, | ||
const Attribute | attrib = Attribute() |
||
) |
Constructor. Creates a triangle out of three edges. The edges must form a triangle: the 1st and the 2nd edge, the 2nd and the 3rd edge and the 3rd and the 1st edge must have a common vertex. The edges can have an arbitrary orientation. The orientation is detected and stored in rho_.
edg0 | 1st edge. |
edg1 | 2nd edge. |
edg2 | 3rd edge. |
attrib | Attribute of the triangle |
|
inlineinherited |
Returns the attribute of the connector.
Definition at line 108 of file connector.hh.
Implements concepts::Connector2.
Returns a child.
If children are created, four new children are created (with the same attributes as this one). The triangle is cut into four new triangles by joining the midpoints of its edges.
i | Index of the child to be returned. |
mode | mode = 1: No children are created mode = 0: If no children exist, four new children are created. |
Implements concepts::Connector2.
Returns the pointer of a new Triangle with the same attribute, the same key and the same rho but NO children and sibling
Definition at line 258 of file topology.hh.
Returns a 1D component: edge. A 2D element consists of 1D and 0D elements, the edges can be queried here.
i | Index of the edge |
Implements concepts::Connector2.
Definition at line 224 of file topology.hh.
|
protectedvirtual |
Returns information in an output stream.
Reimplemented from concepts::Connector.
|
inlineinherited |
Returns the key of the connector.
Definition at line 105 of file connector.hh.
Comparison operator.
Definition at line 102 of file connector.hh.
Checks if this connector is related to conn
. It is being checked if one of the two is an ancestor of the other.
conn | Other connector |
conn
is an ancestor of this connectorconn
is a descendant of this connectorReturns the orientation of an edge.
i | Index of the edge. |
Definition at line 230 of file topology.hh.
Definition at line 111 of file connector.hh.
Returns a 0D component: vertex A 2D element consists of 1D and 0D elements, the vertices can be queried here.
i | Index of the vertex |
Implements concepts::Connector2.
Definition at line 225 of file topology.hh.
|
protectedinherited |
Definition at line 132 of file connector.hh.
|
staticprotectedinherited |
Counter for the connectors. This counter is used to create the unique key of the connector.
Definition at line 263 of file connector.hh.
|
protectedinherited |
Unique key of the connector.
Definition at line 129 of file connector.hh.