public class ShapeUtil
extends java.lang.Object
Constructor and Description |
---|
ShapeUtil() |
Modifier and Type | Method and Description |
---|---|
static double |
evalBoxRadius2D(org.graphstream.ui.geom.Point3 p0,
org.graphstream.ui.geom.Point3 p1,
org.graphstream.ui.geom.Point3 p2,
org.graphstream.ui.geom.Point3 p3,
double w,
double h)
Compute the length of a vector along the edge from the box center that match the box
"radius".
|
static double |
evalEllipseRadius2D(org.graphstream.ui.geom.Point3 p0,
org.graphstream.ui.geom.Point3 p1,
org.graphstream.ui.geom.Point3 p2,
org.graphstream.ui.geom.Point3 p3,
double w,
double h)
Compute the length of a vector along the edge from the ellipse center that match the
ellipse radius.
|
static double |
evalEllipseRadius2D(org.graphstream.ui.geom.Point3 p0,
org.graphstream.ui.geom.Point3 p1,
org.graphstream.ui.geom.Point3 p2,
org.graphstream.ui.geom.Point3 p3,
double w,
double h,
double s)
Compute the length of a (eventually cubic curve) vector along the edge from the ellipse center toward the intersection
point with the ellipse that match the ellipse radius.
|
static double |
evalTargetRadius2D(org.graphstream.ui.graphicGraph.GraphicEdge edge,
org.graphstream.ui.view.camera.DefaultCamera2D camera)
Try to evaluate the "radius" of the edge target node shape along the edge.
|
static double |
evalTargetRadius2D(org.graphstream.ui.graphicGraph.GraphicEdge edge,
org.graphstream.ui.geom.Point3 p0,
org.graphstream.ui.geom.Point3 p1,
org.graphstream.ui.geom.Point3 p2,
org.graphstream.ui.geom.Point3 p3,
org.graphstream.ui.view.camera.DefaultCamera2D camera)
Try to evaluate the "radius" of the given area skeleton considering a cubic curve edge between points `p0` and
point `p3` and curving to control points `p1` and `p2`.
|
static double |
evalTargetRadius2D(org.graphstream.ui.geom.Point3 from,
org.graphstream.ui.geom.Point3 to,
org.graphstream.ui.graphicGraph.GraphicNode node,
org.graphstream.ui.view.camera.DefaultCamera2D camera)
Try to evaluate the "radius" of the given node considering an edge between points `from` and `to`.
|
static double |
evalTargetRadius2D(org.graphstream.ui.graphicGraph.stylesheet.Style style,
AreaSkeleton skeleton,
org.graphstream.ui.geom.Point3 p0,
org.graphstream.ui.geom.Point3 p3,
org.graphstream.ui.view.camera.DefaultCamera2D camera)
Try to evaluate the "radius" of the given area skeleton considering an edge between points `p0` and
point `p3` (the edge is considered a straight line).
|
static double |
evalTargetRadius2D(org.graphstream.ui.graphicGraph.stylesheet.Style style,
AreaSkeleton skeleton,
org.graphstream.ui.geom.Point3 p0,
org.graphstream.ui.geom.Point3 p1,
org.graphstream.ui.geom.Point3 p2,
org.graphstream.ui.geom.Point3 p3,
org.graphstream.ui.view.camera.DefaultCamera2D camera)
Try to evaluate the "radius" of the given area skeleton considering a cubic curve edge between points `p0` and
point `p3` and curving to control points `p1` and `p2`.
|
static boolean |
isPointIn(org.graphstream.ui.graphicGraph.GraphicElement elt,
org.graphstream.ui.geom.Point3 p,
double w,
double h)
Compute if point `p` is inside of the shape of `elt` whose overall size is `w` x `h`.
|
static boolean |
isPointIn2DBox(org.graphstream.ui.geom.Point3 p,
double x,
double y,
double w,
double h)
Compute if point `p` is inside of a rectangular shape of overall size `w` x `h`.
|
static boolean |
isPointIn2DEllipse(org.graphstream.ui.geom.Point3 p,
double x,
double y,
double w,
double h)
Compute if point `p` is inside of a ellipsoid shape of overall size `w` x `h`.
|
public static double evalTargetRadius2D(org.graphstream.ui.graphicGraph.GraphicEdge edge, org.graphstream.ui.view.camera.DefaultCamera2D camera)
edge
- The edge (it contains its target node).camera
- the camera.public static double evalTargetRadius2D(org.graphstream.ui.geom.Point3 from, org.graphstream.ui.geom.Point3 to, org.graphstream.ui.graphicGraph.GraphicNode node, org.graphstream.ui.view.camera.DefaultCamera2D camera)
from
- The origin point of the edge.to
- The target point of the edge.node
- The target node shape.the
- camera.public static double evalTargetRadius2D(org.graphstream.ui.graphicGraph.stylesheet.Style style, AreaSkeleton skeleton, org.graphstream.ui.geom.Point3 p0, org.graphstream.ui.geom.Point3 p3, org.graphstream.ui.view.camera.DefaultCamera2D camera)
style
- The style of the area skeleton.skeleton
- The skeleton.p0
- The origin point of the edge.p3
- the target point of the edge.camera
- the camera.public static double evalTargetRadius2D(org.graphstream.ui.graphicGraph.GraphicEdge edge, org.graphstream.ui.geom.Point3 p0, org.graphstream.ui.geom.Point3 p1, org.graphstream.ui.geom.Point3 p2, org.graphstream.ui.geom.Point3 p3, org.graphstream.ui.view.camera.DefaultCamera2D camera)
edge
- The edge.p0
- The origin point of the edge.p3
- the target point of the edge.camera
- the camera.public static double evalTargetRadius2D(org.graphstream.ui.graphicGraph.stylesheet.Style style, AreaSkeleton skeleton, org.graphstream.ui.geom.Point3 p0, org.graphstream.ui.geom.Point3 p1, org.graphstream.ui.geom.Point3 p2, org.graphstream.ui.geom.Point3 p3, org.graphstream.ui.view.camera.DefaultCamera2D camera)
style
- The style of the area skeleton.skeleton
- The skeleton.p0
- The origin point of the edge.p3
- the target point of the edge.camera
- the camera.public static double evalEllipseRadius2D(org.graphstream.ui.geom.Point3 p0, org.graphstream.ui.geom.Point3 p1, org.graphstream.ui.geom.Point3 p2, org.graphstream.ui.geom.Point3 p3, double w, double h, double s)
p0
- the origin point of the edgep1
- the first cubic-curve control point or null for straight edge.p2
- the second cubic-curve control point or null for straight edge.p3
- the target point of the edge.w
- the width of the ellipse.h
- the height of the ellipse.s
- the width of the stroke of the ellipse shape.public static double evalEllipseRadius2D(org.graphstream.ui.geom.Point3 p0, org.graphstream.ui.geom.Point3 p1, org.graphstream.ui.geom.Point3 p2, org.graphstream.ui.geom.Point3 p3, double w, double h)
edge
- The edge representing the vector.w
- The ellipse first radius (width/2).h
- The ellipse second radius (height/2).public static double evalBoxRadius2D(org.graphstream.ui.geom.Point3 p0, org.graphstream.ui.geom.Point3 p1, org.graphstream.ui.geom.Point3 p2, org.graphstream.ui.geom.Point3 p3, double w, double h)
edge
- The edge representing the vector.w
- The box first radius (width/2).h
- The box second radius (height/2).public static boolean isPointIn(org.graphstream.ui.graphicGraph.GraphicElement elt, org.graphstream.ui.geom.Point3 p, double w, double h)
public static boolean isPointIn2DBox(org.graphstream.ui.geom.Point3 p, double x, double y, double w, double h)
public static boolean isPointIn2DEllipse(org.graphstream.ui.geom.Point3 p, double x, double y, double w, double h)