org.reprap.geometry.polygons
Class BooleanGrid.iPoint

java.lang.Object
  extended by org.reprap.geometry.polygons.BooleanGrid.iPoint
Enclosing class:
BooleanGrid

 class BooleanGrid.iPoint
extends java.lang.Object

Integer 2D point

Author:
ensab

Field Summary
private  int x
           
private  int y
           
 
Constructor Summary
BooleanGrid.iPoint(BooleanGrid.iPoint a)
          Copy constructor
BooleanGrid.iPoint(int xa, int ya)
           
BooleanGrid.iPoint(Rr2Point a)
          Convert real-world point to integer
 
Method Summary
(package private)  BooleanGrid.iPoint abs()
          Absolute value
(package private)  BooleanGrid.iPoint add(BooleanGrid.iPoint b)
          Vector addition
(package private)  boolean coincidesWith(BooleanGrid.iPoint b)
          Are two points the same?
(package private)  long magnitude2()
          Squared length
(package private)  BooleanGrid.iPoint neg()
          Opposite direction
(package private)  Rr2Point realPoint()
          Generate the equivalent real-world point
(package private)  long scalarProduct(BooleanGrid.iPoint a)
          Scalar product
(package private)  BooleanGrid.iPoint sub(BooleanGrid.iPoint b)
          Vector subtraction
 java.lang.String toString()
          For printing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

private int x

y

private int y
Constructor Detail

BooleanGrid.iPoint

BooleanGrid.iPoint(int xa,
                   int ya)

BooleanGrid.iPoint

BooleanGrid.iPoint(BooleanGrid.iPoint a)
Copy constructor

Parameters:
a -

BooleanGrid.iPoint

BooleanGrid.iPoint(Rr2Point a)
Convert real-world point to integer

Parameters:
a -
Method Detail

realPoint

Rr2Point realPoint()
Generate the equivalent real-world point

Returns:

coincidesWith

boolean coincidesWith(BooleanGrid.iPoint b)
Are two points the same?

Parameters:
b -
Returns:

add

BooleanGrid.iPoint add(BooleanGrid.iPoint b)
Vector addition

Parameters:
b -
Returns:

sub

BooleanGrid.iPoint sub(BooleanGrid.iPoint b)
Vector subtraction

Parameters:
b -
Returns:

neg

BooleanGrid.iPoint neg()
Opposite direction

Returns:

abs

BooleanGrid.iPoint abs()
Absolute value

Returns:

magnitude2

long magnitude2()
Squared length

Returns:

scalarProduct

long scalarProduct(BooleanGrid.iPoint a)
Scalar product

Parameters:
a -
Returns:

toString

public java.lang.String toString()
For printing

Overrides:
toString in class java.lang.Object