#include </afs/cs.cmu.edu/user/tp517/rio/tumble/trunk/src/tumble/inc/cell.h>
Inheritance diagram for BezierEdge:
Public Types | |
| typedef EdgeCell | super |
Public Member Functions | |
| BezierEdge (BezierVertex *v1, BezierVertex *v2, const ControlPoint &, const DataStore &) | |
| Create an empty BezierEdge. | |
| ~BezierEdge () | |
| void | set_bdry (BoundaryEdge *be, double u0, double u1) |
| Destructor. | |
| void | set_cp (const Point2D &p, int i) |
| Set the value of ControlPoint with given index. | |
| void | set_dp (const LinearData &d, int i) |
| Set the value of DataPoint with given index. | |
| void | set_data (int i, int pos, double data) |
| Set the value of DataPoint with given index, at the given position. | |
| int | get_num_cp () const |
| const Point2D & | get_cp (int i) const |
| Get the value of ControlPoint with given index. | |
| Point2D & | access_cp (int i) |
| Get read-write access to the point at position i. | |
| ControlPoint | get_control_point (int i) const |
| Direct access to the ControlPoint pointer. | |
| const LinearData & | get_dp (int i) const |
| Get the value of DataPoint with given index. | |
| LinearData & | access_dp (int i) |
| Get the value of DataPoint with given index. | |
| DataPoint | get_data_point (int i) const |
| Direct access to the DataPoint pointer. | |
| const BezierVertex * | get_vertex (int i) const |
| Get the BezierVertex that is a sub-cell of this edge, with given index. | |
| BezierVertex * | get_vertex (int i) |
| bool | is_boundary () const |
| True if this is a boundary edge. | |
| const BoundaryEdge * | get_bdry_edge () const |
| BoundaryEdge * | get_bdry_edge () |
| double | get_u (int i) const |
| Point2D | eval (double u) const |
| Given a parameter in [0,1], interpolate the geometric coordinates in the Bezier Basis. | |
| LinearData | dataeval (double u) const |
| Given a parameter in [0,1], interpolate the functional value in the Bezier Basis. | |
| void | evalIntermediate (double u, Point2D &p, Point2D &pc0, Point2D &pc1) const |
| Given a parameter in [0,1], interpolate the geometric coordinates in the Bezier Basis. | |
| void | dataevalIntermediate (double u, LinearData &d, LinearData &dc0, LinearData &dc1) const |
| Given a parameter in [0,1], interpolate the functional data in the Bezier Basis. | |
| bool | is_encroached (const Point2D &) const |
| Determines id the given point encroaches this edge. | |
| int | left_of_curve (Point2D &, int, double &) const |
| Determines if the point is left of the curve. | |
| double | curvature_angle () const |
| Returns the total turning (theta) of this edge For a quadratic bezier edge, this is the absolute value of the angle between control arms. | |
| void | print () const |
| Print info. | |
| declare_iterators (vertex, vertices, BezierVertex) | |
| declare_iterators (face, faces, BezierTriangle) | |
Static Public Member Functions | |
| template<typename iterator> | |
| static bool | encroaches (Point2D p, const iterator &bounding_start, const iterator &bounding_end) |
| Test whether the point encroaches on the curve bounded by the bounding polygon defined by points in the range [start, end]. | |
Private Member Functions | |
| void | replace_cp (const ControlPoint &oldp, const ControlPoint &newp) |
| Replace a control point. Used in bootstrapping. We assert the old point is actually part of the edge. Note: this function does *not* fix up the corresponding triangle or vertex. | |
| BezierEdge (const BezierEdge &o) | |
| BezierEdge & | operator= (const BezierEdge &o) |
Private Attributes | |
| ControlPoint | cp_ [3] |
| An array of iterators, pointing to the geometric data (Point2D). | |
| DataPoint | dp_ [3] |
| An array of iterators, pointing to the functional data (LinearData). | |
| BoundaryEdge * | bdry_edge_ |
| The BoundaryEdge this edge is part of (NULL if no such BoundaryEdge). | |
| double | u_ [2] |
| If on a boundary, then this is the u-value of the first and last vertex along the boundary. | |
Friends | |
| class | BezierMesh |
| std::ostream & | operator<< (std::ostream &stream, const BezierEdge &e) |
As we are using a second order BezierBasis for our geometric and functional basis, each BezierEdge will have three ControlPoints and three DataPoints. Interpolation is done with the basis functions as:
![$ \forall \alpha \in [0,1], B(\alpha) = (cp[0])\cdot \alpha^2 + (cp[1])\cdot 2\alpha (1 - \alpha) + (cp[2])\cdot (1-\alpha)^2 $](form_15.png)
BezierEdge
Use the iterator functions (begin_vertices, begin_faces, etc) to access the sub-cells and super-cells of this edge.
Also contains information about the boundary. If this edge is part of a BoundaryEdge, then bdry points to that BoundaryEdge and u0 and u1 are the u-values of the vertex with index 0 and the vertex with index 1 respectivly. Thus, we should have that:
edge->get_vertex(0)->get_u(edge->bdry, edge) == edge->u0 edge->get_vertex(1)->get_u(edge->bdry, edge) == edge->u1
edge->get_vertex(0)->u , because that vertex might have been on a D0 vertex, and thus not have a unique u-value.edge->evaluate(i) == edge->bdry->evaluate(edge->u0 + i * (edge->u1 - edge->u0))
Definition at line 575 of file cell.h.
|
|
|
|
||||||||||||||||||||
|
Create an empty BezierEdge.
Definition at line 1047 of file cell.C. References cp_, dp_, get_control_point(), BezierVertex::get_control_point(), get_num_cp(), and u_. Here is the call graph for this function: |
|
|
|
|
|
|
|
|
Get read-write access to the point at position i.
Definition at line 1305 of file cell.C. References cp_, and get_num_cp(). Referenced by Simulation::move(), and set_cp(). Here is the call graph for this function: |
|
|
Get the value of DataPoint with given index.
Definition at line 1332 of file cell.C. References dp_, and get_num_cp(). Referenced by BezierMesh::reinterpolate(), set_data(), and set_dp(). Here is the call graph for this function: |
|
|
Returns the total turning (theta) of this edge For a quadratic bezier edge, this is the absolute value of the angle between control arms.
Definition at line 1202 of file cell.C. References Point2D::dot(), get_cp(), and Point2D::mag(). Here is the call graph for this function: |
|
|
Given a parameter in [0,1], interpolate the functional value in the Bezier Basis.
returns:
Definition at line 1120 of file cell.C. References get_dp(). Here is the call graph for this function: |
|
||||||||||||||||||||
|
Given a parameter in [0,1], interpolate the functional data in the Bezier Basis. Runs the de Casteljau algorithm, and returns intermediates as well as the final interpolated value.
Definition at line 1162 of file cell.C. References get_dp(). Here is the call graph for this function: |
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||||||
|
Test whether the point encroaches on the curve bounded by the bounding polygon defined by points in the range [start, end]. Encroachment on curve is defined by encroachment on the dimetral circle of any pair of points on the curve. To compute this, we compute whether there is encroachment on the bounding polygon (is the point in the circumcircle of any pair of points on the polygon -- in particular, its vertices). iterator::operator*() must return something on which operator-(Point2D) is defined and returns something on which a dot product is defined. For example: Point2D* has its * operator return a Point2D, on which operator-(Point2D) returns a Point2D, on which the dot product is defined. Definition at line 862 of file cell.h. Referenced by is_encroached(). |
|
|
Given a parameter in [0,1], interpolate the geometric coordinates in the Bezier Basis.
returns:
Definition at line 1103 of file cell.C. References get_cp(). Referenced by BezierMesh::clean_insert_edge_midpoint(), Visualization::draw_bezier_edge(), Visualization::draw_point(), and BezierMesh::insert_edge_midpoint(). Here is the call graph for this function: |
|
||||||||||||||||||||
|
Given a parameter in [0,1], interpolate the geometric coordinates in the Bezier Basis. Runs the de Casteljau algorithm, and returns intermediates as well as the final interpolated value.
Definition at line 1139 of file cell.C. References get_cp(). Here is the call graph for this function: |
|
|
Definition at line 1380 of file cell.C. References bdry_edge_, and is_boundary(). Here is the call graph for this function: |
|
|
Definition at line 1375 of file cell.C. References bdry_edge_, and is_boundary(). Referenced by BezierVertex::get_u(), BezierMesh::insert_edge_midpoint(), operator<<(), BezierTriangle::small_angle(), and MeshBinaryOutput::write(). Here is the call graph for this function: |
|
|
Direct access to the ControlPoint pointer.
Definition at line 1312 of file cell.C. References cp_, and get_num_cp(). Referenced by BezierEdge(), BezierTriangle::BezierTriangle(), BezierMesh::consistency_check_helper(), BezierMesh::delete_edge(), BezierMesh::orient_edge_triangle(), BezierMesh::replace_control_point(), MeshBinaryOutput::write(), and MeshOutput::write(). Here is the call graph for this function: |
|
|
Get the value of ControlPoint with given index.
Definition at line 1299 of file cell.C. References cp_, and get_num_cp(). Referenced by BezierMesh::can_flip(), BezierMesh::can_smooth(), curvature_angle(), BezierMesh::debug_flip(), BezierMesh::debug_smooth(), EPSWrite::draw_edge(), eval(), evalIntermediate(), BezierMesh::flip(), BezierMesh::function_angle(), BezierMesh::get_flip_polygon(), BezierMesh::get_smooth_polygon(), Visualization::is_visible(), left_of_curve(), operator<<(), EPSWrite::shade_triangle(), BezierMesh::should_refine_func_angle(), BezierMesh::smooth_edge(), and MeshBinaryOutput::write(). Here is the call graph for this function: |
|
|
Direct access to the DataPoint pointer.
Definition at line 1339 of file cell.C. References dp_, and get_num_cp(). Referenced by BezierMesh::consistency_check_helper(), BezierMesh::delete_edge(), and MeshOutput::write(). Here is the call graph for this function: |
|
|
Get the value of DataPoint with given index.
Definition at line 1322 of file cell.C. References dp_, and get_num_cp(). Referenced by dataeval(), dataevalIntermediate(), BezierMesh::flip(), BezierMesh::function_angle(), Simulation::move(), operator<<(), BezierMesh::remove_vertex(), and MeshBinaryOutput::write(). Here is the call graph for this function: |
|
|
Definition at line 594 of file cell.h. Referenced by access_cp(), access_dp(), BezierEdge(), get_control_point(), get_cp(), get_data_point(), get_dp(), is_encroached(), and replace_cp(). |
|
|
Definition at line 1090 of file cell.C. References u_. Referenced by operator<<(). |
|
|
Reimplemented from EdgeCell. Definition at line 1364 of file cell.C. References EdgeCell::get_vertex(). Here is the call graph for this function: |
|
|
Get the BezierVertex that is a sub-cell of this edge, with given index.
Reimplemented from EdgeCell. Definition at line 1360 of file cell.C. References EdgeCell::get_vertex(). Referenced by BezierTriangle::BezierTriangle(), BezierMesh::coarsen_calculate_edge_lengths(), BezierMesh::coarsen_keep_large_function_angles(), BezierMesh::consistency_check_helper(), BezierTriangle::get_edge_index_by_cps(), BezierVertex::get_u(), BezierTriangle::small_angle(), and MeshBinaryOutput::write(). Here is the call graph for this function: |
|
|
|
Determines id the given point encroaches this edge. In the classic Delaunay refinement algorithms, one of the key procedures is checking an edge for encroachment. This occurs when a point enters the circumcircle of an edge. For curved segments, we define encroachment using a convex bounding polygon for the curve. A point encroaches if it lies inside the diametral circle of any pair of point of the bounding polygon. For Bezier segments, the control points define the bounding polygon.
Definition at line 1191 of file cell.C. References cp_, encroaches(), and get_num_cp(). Referenced by BezierMesh::clean_insert_edge_midpoint(), BezierMesh::clean_insert_point(), and BezierMesh::protect_boundarys(). Here is the call graph for this function: |
|
||||||||||||||||
|
Determines if the point is left of the curve. Ask Todd about this one. Definition at line 1224 of file cell.C. References get_cp(), Point2D::is_left_of(), p1, and p2. Here is the call graph for this function: |
|
|
|
|
|
Print info.
|
|
||||||||||||
|
Replace a control point. Used in bootstrapping. We assert the old point is actually part of the edge. Note: this function does *not* fix up the corresponding triangle or vertex.
Definition at line 1079 of file cell.C. References cp_, and get_num_cp(). Referenced by BezierMesh::replace_control_point(). Here is the call graph for this function: |
|
||||||||||||||||
|
Destructor.
Definition at line 1067 of file cell.C. References bdry_edge_, and u_. Referenced by BezierMesh::insert_edge_midpoint(), MeshBinaryInput::read(), MeshInput::read(), BezierMesh::remove_vertex(), and ConformalMesher::reticulate_splines(). |
|
||||||||||||
|
Set the value of ControlPoint with given index.
Definition at line 1279 of file cell.C. References access_cp(). Referenced by BezierMesh::smooth_edge(). Here is the call graph for this function: |
|
||||||||||||||||
|
Set the value of DataPoint with given index, at the given position.
Definition at line 1350 of file cell.C. References access_dp(), and LinearData::set(). Here is the call graph for this function: |
|
||||||||||||
|
Set the value of DataPoint with given index.
Definition at line 1289 of file cell.C. References access_dp(). Here is the call graph for this function: |
|
|
|
|
||||||||||||
|
|
|
|
The BoundaryEdge this edge is part of (NULL if no such BoundaryEdge).
Definition at line 638 of file cell.h. Referenced by get_bdry_edge(), is_boundary(), and set_bdry(). |
|
|
An array of iterators, pointing to the geometric data (Point2D).
Definition at line 636 of file cell.h. Referenced by access_cp(), BezierEdge(), get_control_point(), get_cp(), is_encroached(), and replace_cp(). |
|
|
An array of iterators, pointing to the functional data (LinearData).
Definition at line 637 of file cell.h. Referenced by access_dp(), BezierEdge(), get_data_point(), and get_dp(). |
|
|
If on a boundary, then this is the u-value of the first and last vertex along the boundary.
Definition at line 639 of file cell.h. Referenced by BezierEdge(), get_u(), and set_bdry(). |
1.4.3