sddl.hierarchy
Class AbstractPoint

java.lang.Object
  extended by sddl.hierarchy.AbstractPoint
Direct Known Subclasses:
BinaryMapPoint, IntersectionPoint, Point, RefPoint, UnaryMapPoint

public abstract class AbstractPoint
extends java.lang.Object

This class represents any kind of point. This is limited to 2 dimensional points.

Version:
1.00
Author:
Mathieu Bourgeois

Constructor Summary
AbstractPoint()
           
 
Method Summary
 AbstractPoint add(AbstractPoint second)
          Adds two points together
 AbstractPoint combine(double percentage, AbstractPoint second)
          Linearly combine two points
abstract  AbstractPoint copy()
          Returns a copy of this Point
 AbstractPoint multiply(double multiplier)
          Multiply a real number and a point together
abstract  java.lang.String solve()
          Returns an Asymptote string describing the Point
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPoint

public AbstractPoint()
Method Detail

add

public AbstractPoint add(AbstractPoint second)
Adds two points together

Parameters:
second - The second point
Returns:
The addition of the current point and the second point

multiply

public AbstractPoint multiply(double multiplier)
Multiply a real number and a point together

Parameters:
multiplier - The real number to multiply with the point
Returns:
The result of multiplying the number with the point

combine

public AbstractPoint combine(double percentage,
                             AbstractPoint second)
Linearly combine two points

Parameters:
percentage - The percentage from the first point (in the range [0..1]) to the second point
second - The second point
Returns:
The point at the percentage between the two points

solve

public abstract java.lang.String solve()
Returns an Asymptote string describing the Point

Returns:
An Asymptote string describing the Point

copy

public abstract AbstractPoint copy()
Returns a copy of this Point

Returns:
A copy of this Point