public class MPoint extends MObject
PAINT_ANTIALIAS, PAINT_FOCUSED, TRANSFORM_DISTORT| Constructor and Description |
|---|
MPoint(double x,
double y)
Contructs a point object.
|
MPoint(double x,
double y,
double z)
Contructs a point object.
|
MPoint(DPoint3 p)
Constructs a point object.
|
MPoint(MPoint p)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
calcCenter(DPoint3 p,
CTransform3D t)
Calculates the geometrical center.
|
MPoint |
clone()
Creates a clone.
|
double |
distanceFrom(double x,
double y,
CTransform3D t)
Gets the 2D distance from the specified point.
|
boolean |
equals(Object o)
Two points equal if their location equals.
|
DPoint3 |
getLocation()
Gets the point's location.
|
DPoint3 |
getLocation(CTransform3D t)
Gets the point's location.
|
void |
getLocation(DPoint3 p,
CTransform3D t)
Gets the point's location.
|
MPoint |
getPoint(int i)
Gets the point.
|
int |
getPointCount()
Gets the number of points.
|
MPoint |
getPointRef(int i,
CTransform3D trot)
Gets a point of the line.
|
int |
getPointRefCount()
Gets the number of point references.
|
int |
hashCode() |
boolean |
isChildOf(MObject o)
Is this object a children of another one?
|
boolean |
isInternalSelectable()
Is it a selection only internal object?
|
void |
setLocation(DPoint3 p,
CTransform3D t)
Sets the point's location.
|
void |
transform(CTransform3D t,
int opts,
CTransform3D trot)
Transforms all points.
|
addAttributeKeys, addCdataAttributeKeys, addNotify, addNotify, checkValidity, connectToSgroupOfAtom, containsAtom, containsPoint, distanceFrom, finishCloning, fixClonedPoints, getAttribute, getBackground, getColor, getLineColor, hasBackground, hasColor, hasLineColor, isEmpty, isReactionArrow, isSelectableNow, isSelected, isTransformable, makeColor, removeAtom, removeChild, removeNotify, removeNotify, replaceAtom, setAttribute, setBackground, setColor, setLineColor, setSelected, toString, unselectContents, updateBoundingRectpublic MPoint(double x,
double y,
double z)
x - the x coordinatey - the y coordinatez - the z coordinatepublic MPoint(double x,
double y)
x - the x coordinatey - the y coordinatepublic MPoint(DPoint3 p)
p - the pointpublic MPoint(MPoint p)
p - the pointpublic boolean equals(Object o)
public boolean isChildOf(MObject o)
public boolean isInternalSelectable()
isInternalSelectable in class MObjectpublic void getLocation(DPoint3 p, CTransform3D t)
p - the output point objectt - transformation or nullpublic final DPoint3 getLocation(CTransform3D t)
t - transformation or nullpublic final DPoint3 getLocation()
public void setLocation(DPoint3 p, CTransform3D t)
p - new location in the 'absolute' system (null transform)t - viewing transformationpublic int getPointCount()
getPointCount in class MObjectpublic MPoint getPoint(int i)
public int getPointRefCount()
getPointRefCount in class MObjectpublic MPoint getPointRef(int i, CTransform3D trot)
getPointRef in class MObjecti - the point indextrot - the viewing transformation or nullpublic void transform(CTransform3D t, int opts, CTransform3D trot)
transform in class MObjectt - the transformation matrixopts - transform options or 0trot - the viewing transformation or nullMObject.TRANSFORM_DISTORTpublic final void calcCenter(DPoint3 p, CTransform3D t)
calcCenter in class MObjectp - store the coordinates heret - the transformation matrix or nullpublic final double distanceFrom(double x,
double y,
CTransform3D t)
distanceFrom in class MObjectx - the x coordinatey - the y coordinatet - transformation or null