math.geom2d.grid
Class SquareGrid2D

Package class diagram package SquareGrid2D
java.lang.Object
  extended by math.geom2d.grid.SquareGrid2D
All Implemented Interfaces:
Grid2D

public class SquareGrid2D
extends Object
implements Grid2D

Defines a square grid, which can have different size in each direction. The grid is always parallel to the main axes.

Author:
dlegland

Constructor Summary
SquareGrid2D()
           
SquareGrid2D(double s)
           
SquareGrid2D(double sx, double sy)
           
SquareGrid2D(double x0, double y0, double s)
           
SquareGrid2D(double x0, double y0, double sx, double sy)
           
SquareGrid2D(Point2D origin)
           
SquareGrid2D(Point2D origin, double s)
           
SquareGrid2D(Point2D origin, double sx, double sy)
           
 
Method Summary
 Point2D getClosestVertex(Point2D point)
           
 Collection<LineSegment2D> getEdges(Box2D box)
           
 Point2D getOrigin()
           
 double getSizeX()
           
 double getSizeY()
           
 PointSet2D getVertices(Box2D box)
           
 void setOrigin(Point2D point)
          Deprecated. grids are supposed to be immutable (0.8.0)
 void setSize(double s)
          Deprecated. grids are supposed to be immutable (0.8.0)
 void setSize(double sx, double sy)
          Deprecated. grids are supposed to be immutable (0.8.0)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SquareGrid2D

public SquareGrid2D()

SquareGrid2D

public SquareGrid2D(Point2D origin)

SquareGrid2D

public SquareGrid2D(Point2D origin,
                    double s)

SquareGrid2D

public SquareGrid2D(Point2D origin,
                    double sx,
                    double sy)

SquareGrid2D

public SquareGrid2D(double x0,
                    double y0,
                    double s)

SquareGrid2D

public SquareGrid2D(double s)

SquareGrid2D

public SquareGrid2D(double sx,
                    double sy)

SquareGrid2D

public SquareGrid2D(double x0,
                    double y0,
                    double sx,
                    double sy)
Method Detail

setOrigin

@Deprecated
public void setOrigin(Point2D point)
Deprecated. grids are supposed to be immutable (0.8.0)


getOrigin

public Point2D getOrigin()
Specified by:
getOrigin in interface Grid2D

getSizeX

public double getSizeX()

getSizeY

public double getSizeY()

setSize

@Deprecated
public void setSize(double s)
Deprecated. grids are supposed to be immutable (0.8.0)


setSize

@Deprecated
public void setSize(double sx,
                               double sy)
Deprecated. grids are supposed to be immutable (0.8.0)


getClosestVertex

public Point2D getClosestVertex(Point2D point)
Specified by:
getClosestVertex in interface Grid2D

getEdges

public Collection<LineSegment2D> getEdges(Box2D box)
Specified by:
getEdges in interface Grid2D

getVertices

public PointSet2D getVertices(Box2D box)
Specified by:
getVertices in interface Grid2D


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.