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.booleanisLocked()Overrides isLocked method.voidResponds to property change events.voidsetFixedOrigin(boolean fixed, int n) Overrides ImageCoordSystem setFixedOrigin method.voidsetLocked(boolean locked) Overrides setLocked method.protected voidSets the origins of the image coordinate system.protected voidUpdates 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, worldToImageYComponentMethods 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:
setFixedOriginin classImageCoordSystem- Parameters:
fixed- ignoredn- the frame number
-
setLocked
public void setLocked(boolean locked) Overrides setLocked method.- Overrides:
setLockedin classImageCoordSystem- Parameters:
locked-trueto lock the coordinate system
-
isLocked
public boolean isLocked()Overrides isLocked method.- Overrides:
isLockedin classImageCoordSystem- Returns:
trueif this is locked
-
propertyChange
Responds to property change events.- Specified by:
propertyChangein interfacePropertyChangeListener- Parameters:
e- the property change event
-
updateAllTransforms
protected void updateAllTransforms()Description copied from class:ImageCoordSystemUpdates all transforms used to convert between drawing spaces.- Overrides:
updateAllTransformsin 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.
-