Class ReferenceFrame
java.lang.Object
org.opensourcephysics.display.OSPRuntime.Supported
org.opensourcephysics.media.core.ImageCoordSystem
org.opensourcephysics.cabrillo.tracker.ReferenceFrame
- All Implemented Interfaces:
PropertyChangeListener
,EventListener
A ReferenceFrame is an image coordinate system with its origin
determined by the position of a PointMass.
- Author:
- Douglas Brown
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensourcephysics.media.core.ImageCoordSystem
ImageCoordSystem.FrameData, ImageCoordSystem.Loader
-
Field Summary
Fields inherited from class org.opensourcephysics.media.core.ImageCoordSystem
firePropChange, ignoreUpdateRequests, PROPERTY_COORDS_FIXEDANGLE, PROPERTY_COORDS_FIXEDORIGIN, PROPERTY_COORDS_FIXEDSCALE, PROPERTY_COORDS_LOCKED, PROPERTY_COORDS_TRANSFORM
-
Constructor Summary
ConstructorsConstructorDescriptionReferenceFrame
(ImageCoordSystem coords, PointMass originTrack) Constructs a ReferenceFrame with a default initial length. -
Method Summary
Modifier and TypeMethodDescriptionGets the parent image coordinate system.Gets the origin track of this reference frame.boolean
isLocked()
Overrides isLocked method.void
Responds to property change events.void
setFixedOrigin
(boolean fixed, int n) Overrides ImageCoordSystem setFixedOrigin method.void
setLocked
(boolean locked) Overrides setLocked method.protected void
Sets the origins of the image coordinate system.protected void
Updates all transforms used to convert between drawing spaces.Methods inherited from class org.opensourcephysics.media.core.ImageCoordSystem
addPropertyChangeListenerSafely, dispose, getAngle, getCosine, getKeyFrames, getLength, getLoader, getOriginX, getOriginY, getScaleX, getScaleY, getSine, getToImageTransform, getToWorldTransform, imageToWorldX, imageToWorldXComponent, imageToWorldY, imageToWorldYComponent, isAdjusting, isFixedAngle, isFixedOrigin, isFixedScale, setAdjusting, setAllAngles, setAllCosineSines, setAllOriginsXY, setAllScalesX, setAllScalesXY, setAllScalesY, setAllValuesToFrame, setAngle, setCosineSine, setCosineSines, setFixedAngle, setFixedAngle, setFixedOrigin, setFixedScale, setFixedScale, setLength, setOriginsXY, setOriginXY, setScalesX, setScalesXY, setScalesY, setScaleX, setScaleXY, setScaleY, worldToImageX, worldToImageXComponent, worldToImageY, worldToImageYComponent
Methods inherited from class org.opensourcephysics.display.OSPRuntime.Supported
addListeners, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, firePropertyChange, removeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Constructor Details
-
ReferenceFrame
Constructs a ReferenceFrame with a default initial length.- Parameters:
coords
- the image coordinate system providing angle and scale dataoriginTrack
- the point mass providing origin data
-
-
Method Details
-
setFixedOrigin
public void setFixedOrigin(boolean fixed, int n) Overrides ImageCoordSystem setFixedOrigin method. Origin is never fixed for a reference frame.- Overrides:
setFixedOrigin
in classImageCoordSystem
- Parameters:
fixed
- ignoredn
- the frame number
-
setLocked
public void setLocked(boolean locked) Overrides setLocked method.- Overrides:
setLocked
in classImageCoordSystem
- Parameters:
locked
-true
to lock the coordinate system
-
isLocked
public boolean isLocked()Overrides isLocked method.- Overrides:
isLocked
in classImageCoordSystem
- Returns:
true
if this is locked
-
propertyChange
Responds to property change events.- Specified by:
propertyChange
in interfacePropertyChangeListener
- Parameters:
e
- the property change event
-
updateAllTransforms
protected void updateAllTransforms()Description copied from class:ImageCoordSystem
Updates all transforms used to convert between drawing spaces.- Overrides:
updateAllTransforms
in classImageCoordSystem
-
getCoords
Gets the parent image coordinate system. The parent coords are returned after setting its angles and scales to match this.- Returns:
- the parent image coordinate system
-
getOriginTrack
Gets the origin track of this reference frame.- Returns:
- the point mass supplying origin data
-
setOrigins
protected void setOrigins()Sets the origins of the image coordinate system.
-