fdubath.entrelacs.tilling
Class TillingP3m1BackgroundGeometry

java.lang.Object
  extended by fdubath.entrelacs.BackgroundGeometry
      extended by fdubath.entrelacs.tilling.TillingBackgroundGeometry
          extended by fdubath.entrelacs.tilling.TillingP3m1BackgroundGeometry

public class TillingP3m1BackgroundGeometry
extends TillingBackgroundGeometry

This geometry has a fundamental zone which is an equilateral triangle. The three borders ((0,0)-(1,0)) ,((0,0)-(1/2,sqrt(3)/2)) and ((1,0)-(1/2,sqrt(3)/2)) are mirror border.


Field Summary
 
Fields inherited from class fdubath.entrelacs.tilling.TillingBackgroundGeometry
drawer
 
Fields inherited from class fdubath.entrelacs.BackgroundGeometry
verbose
 
Constructor Summary
TillingP3m1BackgroundGeometry()
           
 
Method Summary
 void draw(int[] origine, int[] clipSize, double geometryUnit)
          Call to this method cause the computation of the intersections and segments and the drawing of the ropes.
 java.lang.String geometryName()
          Get the name of the Geometry, use for the CustomFileReader in order to ensure it can extract the content of a file and assigne it to the geometry.
 double[] getBorderTangentVector(Vertex vertex)
          When a vertex is on a miror border, this methode allows to get the direction of the border at the vertex position.
 boolean hasIdentifiedBorder()
          Define if the geometry has identified border - that is borders on which a Vertex has two image, causing the rope to jump from the first to the second image accross the geometry zone.
 boolean hasMirorBorder()
          Define if the geometry has mirror border - that is border on which a Rope can end.
 boolean isInside(double[] position)
          Compute if a given position is inside the geometry zone.
 double[] placeInside(double[] position)
          If a given position is inside the geometry zone.
 double[] placeOnMirorBorder(double[] position)
          Compute the closest position on a mirror border of the zone
 
Methods inherited from class fdubath.entrelacs.tilling.TillingBackgroundGeometry
computeSegments
 
Methods inherited from class fdubath.entrelacs.BackgroundGeometry
addLoopRope, addRopeOnMirorBorder, addVertex, addVertexToRope, deleteRope, deleteVertex, getIdentifiedBorderRotationAngle, getReadOnlyRopexList, getReadOnlyVertexList, getVertexImagePosition, moveVertex, numberOfVertexImages, placeOnIdentifiedBorder, removeVertexfromRope
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TillingP3m1BackgroundGeometry

public TillingP3m1BackgroundGeometry()
Method Detail

geometryName

public java.lang.String geometryName()
Description copied from class: BackgroundGeometry
Get the name of the Geometry, use for the CustomFileReader in order to ensure it can extract the content of a file and assigne it to the geometry.

Overrides:
geometryName in class BackgroundGeometry
See Also:
CustomFileReader

getBorderTangentVector

public double[] getBorderTangentVector(Vertex vertex)
Description copied from class: BackgroundGeometry
When a vertex is on a miror border, this methode allows to get the direction of the border at the vertex position.

Overrides:
getBorderTangentVector in class BackgroundGeometry
Parameters:
vertex - the Vertex determining a position on a miror border
Returns:
direction of the border at the vertex position.

hasMirorBorder

public boolean hasMirorBorder()
Description copied from class: BackgroundGeometry
Define if the geometry has mirror border - that is border on which a Rope can end.

Overrides:
hasMirorBorder in class BackgroundGeometry
Returns:
true if mirror border exists

hasIdentifiedBorder

public boolean hasIdentifiedBorder()
Description copied from class: BackgroundGeometry
Define if the geometry has identified border - that is borders on which a Vertex has two image, causing the rope to jump from the first to the second image accross the geometry zone.

Overrides:
hasIdentifiedBorder in class BackgroundGeometry
Returns:
true if identified border exists

isInside

public boolean isInside(double[] position)
Description copied from class: BackgroundGeometry
Compute if a given position is inside the geometry zone.

Overrides:
isInside in class BackgroundGeometry
Returns:
true if the position is inside the geometry zone.

placeInside

public double[] placeInside(double[] position)
Description copied from class: BackgroundGeometry
If a given position is inside the geometry zone. returns the position, otherwise compute the closest position inside the zone

Overrides:
placeInside in class BackgroundGeometry
Returns:
a position inside the geometry zone.

placeOnMirorBorder

public double[] placeOnMirorBorder(double[] position)
Description copied from class: BackgroundGeometry
Compute the closest position on a mirror border of the zone

Overrides:
placeOnMirorBorder in class BackgroundGeometry
Returns:
a position on a mirror border.

draw

public void draw(int[] origine,
                 int[] clipSize,
                 double geometryUnit)
Description copied from class: TillingBackgroundGeometry
Call to this method cause the computation of the intersections and segments and the drawing of the ropes. The geometry zone is replicated (according to its symetry) in order to fill the clipSize. Note that the direction of the drawing has vertical axis inverted with respect to screen coordinate (that is if you have a window with size(100,200) you should set the clip size to (100,200) and set the origine to (0,200)). Note also that the effective drawing fill the clip zone but is not restricted to it (some drawing are done outside of this sone).

Overrides:
draw in class TillingBackgroundGeometry