Package chemaxon.struc
Class MPoint
java.lang.Object
chemaxon.struc.MObject
chemaxon.struc.MPoint
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
MAtomSetPoint,MEFlowBasePoint,MMidPoint,MRectanglePoint
Point object.
- Since:
- Marvin 3.3, 10/18/2003
- See Also:
-
Field Summary
Fields inherited from class chemaxon.struc.MObject
TRANSFORM_DISTORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidcalcCenter(DPoint3 p, CTransform3D t) Calculates the geometrical center.clone()Creates a clone.final doubledistanceFrom(double x, double y, CTransform3D t) Gets the 2D distance from the specified point.booleanTwo points equal if their location equals.final DPoint3Gets the point's location.final DPoint3Gets the point's location.voidgetLocation(DPoint3 p, CTransform3D t) Gets the point's location.getPoint(int i) Gets the point.intGets the number of points.getPointRef(int i, CTransform3D trot) Gets a point of the line.intGets the number of point references.inthashCode()booleanIs this object a children of another one?booleanIs it a selection only internal object?voidsetLocation(DPoint3 p, CTransform3D t) Sets the point's location.toString()Overrides Object.toString() to ease debugging.voidtransform(CTransform3D t, int opts, CTransform3D trot) Transforms all points.Methods inherited from class chemaxon.struc.MObject
addAttributeKeys, addCdataAttributeKeys, addNotify, checkValidity, clearProperties, connectToSgroupOfAtom, containsAtom, containsPoint, containsPropertyKey, distanceFrom, finishCloning, fixClonedPoints, getAttribute, getBackground, getColor, getContainerMObject, getLineColor, getProperty, hasBackground, hasColor, hasLineColor, isEmpty, isReactionArrow, isSelectableNow, isSelected, isTransformable, makeColor, propertyCount, propertyKeySet, propertySet, putProperty, removeAtom, removeChild, removeNotify, removeProperty, replaceAtom, setAttribute, setBackground, setColor, setLineColor, setSelected, unselectContents, updateBoundingRect, updateBoundingRect
-
Constructor Details
-
MPoint
public MPoint(double x, double y, double z) Contructs a point object.- Parameters:
x- the x coordinatey- the y coordinatez- the z coordinate
-
MPoint
public MPoint(double x, double y) Contructs a point object.- Parameters:
x- the x coordinatey- the y coordinate- Since:
- Marvin 4.1, 03/06/2006
-
MPoint
Constructs a point object.- Parameters:
p- the point
-
MPoint
Copy constructor.- Parameters:
p- the point
-
-
Method Details
-
hashCode
public int hashCode() -
equals
Two points equal if their location equals. -
isChildOf
Is this object a children of another one? -
isInternalSelectable
public boolean isInternalSelectable()Is it a selection only internal object?- Overrides:
isInternalSelectablein classMObject- Returns:
- true
-
clone
Description copied from class:MObjectCreates a clone. -
getLocation
Gets the point's location.- Parameters:
p- the output point objectt- transformation or null- Since:
- Marvin 4.1, 04/28/2006
-
getLocation
Gets the point's location.- Parameters:
t- transformation or null- Returns:
- the point
- Since:
- Marvin 4.1, 04/28/2006
-
getLocation
Gets the point's location.- Returns:
- the point
-
setLocation
Sets the point's location.- Parameters:
p- new location in the 'absolute' system (null transform)t- viewing transformation- Since:
- Marvin 4.1, 04/28/2006
-
getPointCount
public int getPointCount()Gets the number of points.- Specified by:
getPointCountin classMObject- Returns:
- 1
-
getPoint
Gets the point. -
getPointRefCount
public int getPointRefCount()Gets the number of point references.- Overrides:
getPointRefCountin classMObject- Returns:
- 1
-
getPointRef
Gets a point of the line.- Overrides:
getPointRefin classMObject- Parameters:
i- the point indextrot- the viewing transformation or null- Returns:
- the point's reference
- Since:
- Marvin 4.1, 05/01/2006
-
transform
Transforms all points. -
calcCenter
Calculates the geometrical center.- Specified by:
calcCenterin classMObject- Parameters:
p- store the coordinates heret- the transformation matrix or null- Since:
- Marvin 4.1, 04/28/2006
-
distanceFrom
Gets the 2D distance from the specified point.- Specified by:
distanceFromin classMObject- Parameters:
x- the x coordinatey- the y coordinatet- transformation or null- Since:
- Marvin 3.5, 11/04/2004
-
toString
Description copied from class:MObjectOverrides Object.toString() to ease debugging. Returns a string consisting of the classname (without the package name!), the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object.
-