Gnash
0.8.10
|
2D Point class More...
#include <Point2d.h>
Public Member Functions | |
Point2d () | |
Construct a Point2d with default x and y coordinates. | |
Point2d (boost::int32_t cx, boost::int32_t cy) | |
Construct a Point2d with given x and y ordinates. | |
Point2d (const Point2d &p0, const Point2d &p1, float t) | |
Construct a Point2d as an interpolation of the given input points. | |
Point2d & | setTo (const boost::int32_t cx, const boost::int32_t cy) |
Set coordinates to given values. | |
Point2d & | setTo (const Point2d &p0, const Point2d &p1, float t) |
Set coordinates to the ones of the interpolation between the given input points. | |
boost::int64_t | squareDistance (const Point2d &p) const |
Return square distance between this and the given point. | |
boost::int32_t | distance (const Point2d &p) const |
Return distance between this and the given point. | |
bool | operator== (const Point2d &p) const |
bool | operator!= (const Point2d &p) const |
Static Public Member Functions | |
static boost::int64_t | squareDistance (const Point2d &p0, const Point2d &p1) |
Return square distance between two given points. | |
Public Attributes | |
boost::int32_t | x |
The x coordinate. | |
boost::int32_t | y |
The y coordinate. |
2D Point class
A point which contains a x and a y coorinate in TWIPS.
gnash::geometry::Point2d::Point2d | ( | ) | [inline] |
Construct a Point2d with default x and y coordinates.
gnash::geometry::Point2d::Point2d | ( | boost::int32_t | cx, |
boost::int32_t | cy | ||
) | [inline] |
Construct a Point2d with given x and y ordinates.
Construct a Point2d as an interpolation of the given input points.
p0 | first point |
p1 | second point |
t | interpolation factor, between 0 and 1 |
boost::int32_t gnash::geometry::Point2d::distance | ( | const Point2d & | p | ) | const [inline] |
Return distance between this and the given point.
References squareDistance().
Referenced by gnash::renderer::opengl::trace_curve().
bool gnash::geometry::Point2d::operator!= | ( | const Point2d & | p | ) | const [inline] |
References gnash::key::p.
Point2d& gnash::geometry::Point2d::setTo | ( | const boost::int32_t | cx, |
const boost::int32_t | cy | ||
) | [inline] |
Set coordinates to given values.
Referenced by gnash::Path::withinSquareDistance().
Point2d& gnash::geometry::Point2d::setTo | ( | const Point2d & | p0, |
const Point2d & | p1, | ||
float | t | ||
) | [inline] |
Set coordinates to the ones of the interpolation between the given input points.
p0 | first point |
p1 | second point |
t | interpolation factor, between 0 and 1 |
References x, gnash::key::t, and y.
static boost::int64_t gnash::geometry::Point2d::squareDistance | ( | const Point2d & | p0, |
const Point2d & | p1 | ||
) | [inline, static] |
Return square distance between two given points.
Referenced by gnash::Edge::squareDistancePtSeg(), gnash::Edge::squareDistancePtCurve(), squareDistance(), and distance().
boost::int64_t gnash::geometry::Point2d::squareDistance | ( | const Point2d & | p | ) | const [inline] |
Return square distance between this and the given point.
References squareDistance().
boost::int32_t gnash::geometry::Point2d::x |
The x coordinate.
Referenced by gnash::Button::topmostMouseEntity(), gnash::DynamicShape::endFill(), gnash::geometry::pointTest(), gnash::Edge::squareDistancePtSeg(), gnash::Path::withinSquareDistance(), gnash::MorphShape::pointInShape(), gnash::movie_root::setDragState(), gnash::MovieClip::topmostMouseEntity(), gnash::renderer::openvg::preparepath(), gnash::renderer::openvg::Renderer_ovg::world_to_pixel(), gnash::renderer::openvg::Renderer_ovg::draw_poly(), setTo(), squareDistance(), operator==(), gnash::geometry::operator<<(), gnash::Renderer::pixel_to_world(), gnash::Renderer_cairo::add_path(), gnash::renderer::DirectFB::Renderer_DirectFB::world_to_pixel(), gnash::renderer::gles1::Renderer_gles1::world_to_pixel(), gnash::renderer::opengl::middle(), gnash::renderer::opengl::interpolate(), gnash::Shape::pointInShape(), gnash::SWF::ShapeRecord::setLerp(), gnash::SWF::ShapeRecord::read(), gnash::SWFMatrix::transform(), gnash::SWFRect::enclose_transformed_rect(), gnash::SWFRect::expand_to_transformed_rect(), gnash::SWFRect::clamp(), test_geometry(), gnash::TextField::topmostMouseEntity(), and gnash::TextField::pointInShape().
boost::int32_t gnash::geometry::Point2d::y |
The y coordinate.
Referenced by gnash::Button::topmostMouseEntity(), gnash::DynamicShape::endFill(), gnash::geometry::pointTest(), gnash::Edge::squareDistancePtSeg(), gnash::Path::withinSquareDistance(), gnash::MorphShape::pointInShape(), gnash::movie_root::setDragState(), gnash::MovieClip::topmostMouseEntity(), gnash::renderer::openvg::preparepath(), gnash::renderer::openvg::Renderer_ovg::world_to_pixel(), gnash::renderer::openvg::Renderer_ovg::draw_poly(), setTo(), squareDistance(), operator==(), gnash::geometry::operator<<(), gnash::Renderer::pixel_to_world(), gnash::Renderer_cairo::add_path(), gnash::renderer::DirectFB::Renderer_DirectFB::world_to_pixel(), gnash::renderer::gles1::Renderer_gles1::world_to_pixel(), gnash::renderer::opengl::middle(), gnash::renderer::opengl::interpolate(), gnash::Shape::pointInShape(), gnash::SWF::ShapeRecord::setLerp(), gnash::SWF::ShapeRecord::read(), gnash::SWFMatrix::transform(), gnash::SWFRect::enclose_transformed_rect(), gnash::SWFRect::expand_to_transformed_rect(), gnash::SWFRect::clamp(), test_geometry(), gnash::TextField::topmostMouseEntity(), and gnash::TextField::pointInShape().