opale.m2d.ker
Class GPoint2D
java.lang.Object
|
+--opale.m2d.ker.Object2D
|
+--opale.m2d.ker.Point2D
|
+--opale.m2d.ker.GPoint2D
- All Implemented Interfaces:
- java.lang.Cloneable, GObject2D, Transformable
- public class GPoint2D
- extends Point2D
- implements GObject2D, java.lang.Cloneable
Cette classe représente un point du plan
Elle contient plusieurs méthodes utiles
pour la géométrie euclidienne
- Since:
- Opale-2d 0.1
Fields inherited from class opale.m2d.ker.Point2D |
x, y |
Constructor Summary |
GPoint2D()
Constructeur par défaut. |
GPoint2D(GPoint2D p)
Le constructeur de copie |
GPoint2D(OIJ rep)
Construit et initialise le point avec les coordonnées (0; 0) et avec les informations par défaut. |
GPoint2D(OIJ rep,
double x,
double y)
Construit et initialise le point avec les coordonnées (x; y) et avec les informations par défaut. |
GPoint2D(Point2D p)
Construit et initialise le point à partir d'un Point2D et avec les informations par défaut. |
Method Summary |
java.lang.Object |
clone()
Crée un nouvel objet de même classe et de même contenu. |
void |
draw(Pen2D c)
Methode indiquant la procedure de dessin des objets de la classe |
InfoObject |
getInfo()
Renvoie les infos de l'instance |
int |
readKeyWord(java.lang.String word,
RFile f,
Pack2D p)
Interpret a keyword read in a file. |
void |
writeFileMore(WFile f,
Pack2D p)
Wrtie complementary information in a file. |
Methods inherited from class opale.m2d.ker.Point2D |
changeOIJ, equals, getX, getY, homothetie, rotate, rotate, setLocation, setLocation, toString, transform, translate |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
GPoint2D
public GPoint2D()
- Constructeur par défaut.
GPoint2D
public GPoint2D(OIJ rep)
- Construit et initialise le point avec les coordonnées (0; 0) et avec les informations par défaut.
- Parameters:
OIJ
- rep, le repère.
GPoint2D
public GPoint2D(OIJ rep,
double x,
double y)
- Construit et initialise le point avec les coordonnées (x; y) et avec les informations par défaut.
- Parameters:
OIJ
- rep, le repère.double
- x,y les coordonnées du point.
GPoint2D
public GPoint2D(Point2D p)
- Construit et initialise le point à partir d'un Point2D et avec les informations par défaut.
- Parameters:
Point2D
- p le point
GPoint2D
public GPoint2D(GPoint2D p)
- Le constructeur de copie
- Parameters:
Point2D
- p, le point à copier
draw
public void draw(Pen2D c)
- Description copied from interface:
GObject2D
- Methode indiquant la procedure de dessin des objets de la classe
- Specified by:
draw
in interface GObject2D
- Following copied from interface:
opale.m2d.ker.GObject2D
- Parameters:
Pen2D
- crayon, le crayon pour dessiner en 2D dans un repere2D
getInfo
public InfoObject getInfo()
- Description copied from interface:
GObject2D
- Renvoie les infos de l'instance
- Specified by:
getInfo
in interface GObject2D
- Following copied from interface:
opale.m2d.ker.GObject2D
- Returns:
- InfoObjet, info sur l'objet
clone
public java.lang.Object clone()
- Crée un nouvel objet de même classe et de même contenu.
- Specified by:
clone
in interface GObject2D
- Overrides:
clone
in class Point2D
- Returns:
- Object un clone de l'objet.
- Throws:
OutOfMemoryError
- s'il n'y a pas assez de mémoire.- See Also:
Cloneable
readKeyWord
public int readKeyWord(java.lang.String word,
RFile f,
Pack2D p)
throws java.io.IOException,
MalformedFileException
- Description copied from class:
Object2D
- Interpret a keyword read in a file.
- Overrides:
readKeyWord
in class Point2D
- Following copied from class:
opale.m2d.ker.Object2D
- Parameters:
String
- word, the keyword.RFile
- f, the file in reading.Pack2D
- p, instance of Pack2D
that contains the requiered objects.- Returns:
- int, 0 if the keyword is good, -1 otherwise.
writeFileMore
public void writeFileMore(WFile f,
Pack2D p)
- Description copied from class:
Object2D
- Wrtie complementary information in a file.
- Overrides:
writeFileMore
in class Point2D
- Following copied from class:
opale.m2d.ker.Object2D
- Parameters:
WFile
- f, the file in writing .