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