#include </usr1/tp517/Tumble/trunk/src/tumble/util.h>
Public Member Functions | |
| Point2D () | |
| Point2D (double x, double y) | |
| Point2D (const Point2D &o) | |
| Point2D & | assign (double x, double y) |
| double | operator[] (int i) const |
| double | x () const |
| double | y () const |
| bool | operator< (const Point2D &o) const |
| bool | operator<= (const Point2D &o) const |
| bool | operator> (const Point2D &o) const |
| bool | operator>= (const Point2D &o) const |
| Point2D & | operator= (const Point2D &o) |
| Assignment operator. | |
| Point2D & | operator+= (const Point2D &o) |
| Point2D & | operator-= (const Point2D &o) |
| Point2D & | operator *= (double s) |
| Point2D & | operator/= (double s) |
| Point2D | operator+ (const Point2D &o) const |
| Point2D | operator- (const Point2D &o) const |
| Point2D | operator * (double s) const |
| Point2D | operator/ (double s) const |
| double | dot (const Point2D &o) const |
| double | magsq () const |
| double | mag () const |
| double | cross (const Point2D &a) const |
| Determinate-like operation. | |
| bool | machine_equal (const Point2D &other) const |
| Tests if this point is exactly, to machine accuracy, the same as b. | |
| bool | is_left_of (const Point2D &a, const Point2D &b) const |
| Tests if this point is left of line given by a and b. | |
| bool | is_right_of (const Point2D &a, const Point2D &b) const |
| Tests if this point is right of line given by a and b. | |
| double | line_side_test (Point2D a, Point2D b) const |
| Tests which side of line given by a and b that this point is on. | |
| bool | in_circle_test (Point2D a, Point2D b, Point2D c) const |
| Tests if this point is in the circle defined by a , b , and c. | |
| double | dist_from_line (const Point2D &a, const Point2D &b) const |
| Gives distance of this point from the line defined by a and b. | |
| double | angle (const Point2D &a, const Point2D &c) const |
| Return the cosine of the angle made by the triple (a, this, c). | |
| void | print () |
Public Attributes | |
| double | coords [2] |
| The coodinates of the point. | |
Friends | |
| std::ostream & | operator<< (std::ostream &, const Point2D &p) |
Geometric data on the mesh is of type Point2D
Definition at line 46 of file util.h.
| Point2D::Point2D | ( | ) | [inline] |
Definition at line 51 of file util.h.
References coords.
Referenced by operator *(), operator+(), operator-(), and operator/().
| Point2D::Point2D | ( | double | x, | |
| double | y | |||
| ) | [inline] |
| Point2D::Point2D | ( | const Point2D & | o | ) | [inline] |
| Point2D& Point2D::assign | ( | double | x, | |
| double | y | |||
| ) | [inline] |
Definition at line 70 of file util.h.
References coords.
Referenced by MeshConstructor::add_arc(), MeshConstructor::add_circle(), MeshConstructor::add_spiral(), Visualization::compute_world_size(), Visualization::draw_circle(), Visualization::project(), and EPSWrite::project_to_canvas().
| double Point2D::operator[] | ( | int | i | ) | const [inline] |
| double Point2D::x | ( | ) | const [inline] |
Definition at line 78 of file util.h.
References coords.
Referenced by MeshConstructor::add_spiral(), Vec3D::assign(), Visualization::compute_world_size(), EPSWrite::convert_coords(), Visualization::convert_from_screen_coords(), Visualization::draw_circle(), EPSWrite::EPSWrite(), Visualization::get_bbox(), Visualization::is_visible(), BezierMesh::locate_point_in_linear_mesh(), machine_equal(), QBSpline::move(), Simulation::move_(), GhostTriangle::print_mathematica(), BezierTriangle::print_mathematica(), Visualization::project(), EPSWrite::project_to_canvas(), EPSWrite::set_world_view(), BezierMesh::should_refine_func_angle(), BezierMesh::smooth_point(), Vec3D::Vec3D(), and Visualization::zoomin().
| double Point2D::y | ( | ) | const [inline] |
Definition at line 79 of file util.h.
References coords.
Referenced by Vec3D::assign(), Visualization::compute_world_size(), EPSWrite::convert_coords(), Visualization::convert_from_screen_coords(), Visualization::draw_circle(), EPSWrite::EPSWrite(), Visualization::get_bbox(), Visualization::is_visible(), BezierMesh::locate_point_in_linear_mesh(), machine_equal(), QBSpline::move(), Simulation::move_(), GhostTriangle::print_mathematica(), BezierTriangle::print_mathematica(), Visualization::project(), EPSWrite::project_to_canvas(), EPSWrite::set_world_view(), BezierMesh::smooth_point(), Vec3D::Vec3D(), and Visualization::zoomin().
| bool Point2D::operator< | ( | const Point2D & | o | ) | const [inline] |
| bool Point2D::operator<= | ( | const Point2D & | o | ) | const [inline] |
| bool Point2D::operator> | ( | const Point2D & | o | ) | const [inline] |
| bool Point2D::operator>= | ( | const Point2D & | o | ) | const [inline] |
| Point2D& Point2D::operator *= | ( | double | s | ) | [inline] |
| Point2D& Point2D::operator/= | ( | double | s | ) | [inline] |
| Point2D Point2D::operator * | ( | double | s | ) | const [inline] |
| Point2D Point2D::operator/ | ( | double | s | ) | const [inline] |
| double Point2D::dot | ( | const Point2D & | o | ) | const [inline] |
Definition at line 160 of file util.h.
References coords.
Referenced by angle(), BezierEdge::curvature_angle(), and dist_from_line().
| double Point2D::magsq | ( | ) | const [inline] |
Definition at line 165 of file util.h.
References coords.
Referenced by CurvedTriangle::newton_find(), operator<(), operator<=(), operator>(), and operator>=().
| double Point2D::mag | ( | ) | const [inline] |
Definition at line 170 of file util.h.
References coords.
Referenced by angle(), BezierEdge::curvature_angle(), dist_from_line(), and BezierTriangle::offcenter().
| double Point2D::cross | ( | const Point2D & | a | ) | const [inline] |
Determinate-like operation.
Definition at line 176 of file util.h.
References coords.
Referenced by GhostTriangle::jacobian(), BezierTriangle::jacobian(), and CurvedTriangle::newton_find().
| bool Point2D::machine_equal | ( | const Point2D & | other | ) | const [inline] |
Tests if this point is exactly, to machine accuracy, the same as b.
We don't define operator== because that's dangerous with floating point: only use this if you know what you're doing.
Definition at line 189 of file util.h.
Referenced by BezierMesh::locate_point_in_linear_mesh().
Here is the call graph for this function:
Tests if this point is left of line given by a and b.
Uses exact arithmetic predicates of Shewchuk, from libgeopredicates.so
| a | First point of line | |
| b | Second point of line |
Definition at line 201 of file util.h.
References line_side_test().
Referenced by BezierMesh::can_flip(), in_circle_test(), BezierTriangle::is_linear_inverted(), BezierEdge::left_of_curve(), and point_in_poly_kernel().
Here is the call graph for this function:
Tests if this point is right of line given by a and b.
Uses exact arithmetic predicates of Shewchuk, from libgeopredicates.so
| a | First point of line | |
| b | Second point of line |
Definition at line 211 of file util.h.
References line_side_test().
Here is the call graph for this function:
Tests which side of line given by a and b that this point is on.
Uses exact arithmetic predicates of Shewchuk, from libgeopredicates.so
| a | First point of line | |
| b | Second point of line |
Definition at line 47 of file util.C.
References coords.
Referenced by ConformalMesher::angle_is_positive(), is_left_of(), is_right_of(), and BezierMesh::locate_point_in_linear_mesh().
Tests if this point is in the circle defined by a , b , and c.
Uses exact arithmetic predicates of Shewchuk, from libgeopredicates.so
| a | First point of circle | |
| b | Second point of circle | |
| c | Third point of circle |
Definition at line 55 of file util.C.
References coords, and is_left_of().
Referenced by _wrap_Point2D_in_circle_test(), and BezierMesh::should_flip().
Here is the call graph for this function:
Return the cosine of the angle made by the triple (a, this, c).
Return the cosine of the angle made by the intersection of the lines formed by (a, this) and (c, this).
| a | The first point | |
| c | The second point |
Definition at line 246 of file util.h.
Referenced by BezierTriangle::small_angle().
Here is the call graph for this function:
| std::ostream& operator<< | ( | std::ostream & | , | |
| const Point2D & | p | |||
| ) | [friend] |
| double Point2D::coords[2] |
The coodinates of the point.
Definition at line 48 of file util.h.
Referenced by MeshConstructor::add_spiral(), assign(), BoundaryMesh::bbox(), compute_displacement(), Visualization::compute_world_size(), Visualization::convert_from_screen_coords(), cross(), dot(), Visualization::draw_bezier_edge(), Visualization::draw_bezier_triangle(), Visualization::draw_bezier_vertex(), Visualization::draw_boundary_edge(), Visualization::draw_boundary_edge_debug(), Visualization::draw_circle(), Visualization::draw_control_net(), Visualization::draw_newton(), Visualization::draw_point(), EPSWrite::EPSWrite(), Visualization::get_bbox(), in_circle_test(), line_side_test(), mag(), magsq(), MeshInput::Node::Node(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator=(), operator[](), Point2D(), Visualization::project(), EPSWrite::project_to_canvas(), MeshInput::read_boundary_edge_data(), BezierMesh::smooth_point(), x(), y(), and Visualization::zoomin().
1.5.2