Class PointMass
java.lang.Object
org.opensourcephysics.display.OSPRuntime.Supported
org.opensourcephysics.cabrillo.tracker.TTrack
org.opensourcephysics.cabrillo.tracker.PointMass
- All Implemented Interfaces:
PropertyChangeListener,EventListener,Drawable,Interactive,Measurable,Trackable
- Direct Known Subclasses:
CenterOfMass,ParticleModel
A PointMass tracks the position, velocity and acceleration of a point mass.
- Author:
- Douglas Brown
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInner class containing the position data for a single frame number.Nested classes/interfaces inherited from class org.opensourcephysics.cabrillo.tracker.TTrack
TTrack.NameDialog, TTrack.StepArray, TTrack.TextLineLabel, TTrack.TrackDecimalField, TTrack.TrackNumberField -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected JMenuprotected JMenuItemprotected static final Derivativeprotected intprotected Footprintprotected JMenuprotected Footprint[]protected intprotected JMenuItemprotected JMenuItemprotected JMenuItemprotected JCheckBoxMenuItemprotected booleanprotected static final intprotected static final BounceDerivativesprotected intprotected static final String[]protected Object[]protected booleanprotected static final String[]protected static final intprotected static final intprotected static final String[]protected static final String[]protected booleanprotected static booleanprotected booleanprotected booleanprotected doubleprotected NumberFieldprotected JLabelprotected static final doubleprotected Componentprotected int[]protected booleanprotected GeneralPathprotected Strokeprotected booleanprotected boolean[]protected booleanprotected JMenuItemprotected static final Derivativeprotected intprotected NumberField[][]protected JMenuprotected Footprintprotected JMenuprotected Footprint[]protected JMenuItemprotected JMenuItemprotected JCheckBoxMenuItemprotected booleanprotected double[]protected booleanprotected double[]Fields inherited from class org.opensourcephysics.cabrillo.tracker.TTrack
angleField, angleLabel, angleSeparator, attachmentNames, attachments, autoAdvance, autoAdvanceItem, autoTrackerMarking, circleFootprintListener, clearStepsItem, closeButton, colorItem, constantsLoadedFromXML, customNumberFormats, dataBuilderItem, dataDescriptions, dataFrames, dataProp, datasetManager, dataValid, defaultColors, defaultFootprint, deleteStepItem, deleteTrackItem, description, descriptionItem, enabled, fieldBorder, fixedItem, footprint, footprintListener, footprintMenu, footprints, formatAngleMouseListener, formatMouseListener, hint, HINT_STEP_ADDED_OR_REMOVED, HINT_STEPS_SELECTED, initialized, isMarking, keyFrames, labelFont, locked, lockedItem, magField, magLabel, magSeparator, markByDefault, markByDefaultItem, name, nameDialog, nameItem, nextID, NOMAP, NOMAPS, NOVARA, NOVARS, numberFields, partName, points, positionFields, preferredColumnOrder, properties, PROPERTY_TTRACK_COLOR, PROPERTY_TTRACK_DATA, PROPERTY_TTRACK_FOOTPRINT, PROPERTY_TTRACK_FORMAT, PROPERTY_TTRACK_LOCKED, PROPERTY_TTRACK_MASS, PROPERTY_TTRACK_MODELEND, PROPERTY_TTRACK_MODELSTART, PROPERTY_TTRACK_NAME, PROPERTY_TTRACK_STEP, PROPERTY_TTRACK_STEPS, PROPERTY_TTRACK_TEXTCOLUMN, PROPERTY_TTRACK_VISIBLE, refreshDataLater, skippedStepWarningCheckbox, skippedStepWarningDialog, skippedStepWarningOn, skippedStepWarningTextpane, stepLabel, steps, stepSeparator, stepSizeWhenFirstMarked, stepValueLabel, targetIndex, textColumnEntries, textColumnNames, tField, tframe, tLabel, toolbarPointComponents, toolbarTrackComponents, tp, trailLength, trailVisible, trailVisibleItem, tSeparator, ttype, tValueLabel, TYPE_CALIBRATION, TYPE_CIRCLEFITTER, TYPE_COORDAXES, TYPE_LINEPROFILE, TYPE_OFFSETORIGIN, TYPE_PERSPECTIVE, TYPE_POINTMASS, TYPE_PROTRACTOR, TYPE_RGBREGION, TYPE_TAPEMEASURE, TYPE_UNKNOWN, TYPE_VECTOR, viewable, visible, visibleItem, xField, xLabel, xSeparator, xSpinner, yField, yLabel, ySeparator, ySpinnerFields inherited from interface org.opensourcephysics.media.core.Trackable
PROPERTY_ADJUSTING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautoMarkAt(int n, double x, double y) Used by autoTracker to mark a step at a match target position.protected voidCreates the GUI.protected voidcreateStep(int n, double x, double y) Creates a new position step.protected voiddeleteAutoTrackerStep(int n) deleteStep(int n) Overrides TTrack deleteStep method.voiddispose()Disposes of resources when this track is deleted or cleared.voiddraw(DrawingPanel dp, Graphics _g) Overrides TTrack draw method.voiderase()Overrides TTrack erase method to include v and a.voidOverrides TTrack erase method.findInteractive(DrawingPanel dp, int xpix, int ypix) Overrides TTrack findInteractive method.protected TTrack.StepArrayGets the acceleration StepArray for the specified panel.getAcceleration(int n, Integer panelID) Gets the acceleration for the specified frame number and panel.Gets the current acceleration footprint.Gets the acceleration footprint choices.Step[]getAccelerations(Integer panelID) Gets the acceleration step array for the specified panel.getFootprint(Step step) Gets the current footprint of the specified step.intGets the length of the footprints required by this track.getFootprints(Step step) Gets the footprint choices.String[]static XML.ObjectLoaderReturns an ObjectLoader to save and load data for this class.doublegetMass()Gets the mass.getMenu(TrackerPanel panel, JMenu menu0) Returns a menu with items that control this track.getNextVisibleStep(Step step, TrackerPanel panel) Gets next step after the specified step.Map<String,NumberField[]> Gets a map of number fields by name.protected NumberField[]getNumberFieldsForStep(Step step) Returns an array of NumberFields {x, y, magnitude, angle} for a given step.getPreviousVisibleStep(Step step, TrackerPanel panel) Gets step before the specified step.protected Object[]Gets the rotational data.protected Object[]getRotationData(int startFrame, int stepCount) Gets the rotational data for a range of frame numbers.getStep(TPoint point, TrackerPanel panel) Overrides TTrack getStep method.intGets the length of the steps created by this track.protected StringgetTargetDescription(int pointIndex) Returns a description of the point at a given index.getToolbarPointComponents(TrackerPanel panel, TPoint point) Overrides TTrack getToolbarPointComponents method.Overrides TTrack getToolbarTrackComponents method.intgetUnfilledGapCount(boolean emptyGapsOnly) Returns the number of unfilled gaps in the keyframesprotected TTrack.StepArrayGets the velocity StepArray for the specified panel.Step[]getVelocities(Integer panelID) Gets the velocity step array for the specified panel.getVelocity(int n, Integer panelID) Gets the velocity for the specified frame number and panel.Gets the current velocity footprint.Gets the velocity footprint choices.getWorldAcceleration(int n, Integer panelID) Gets the world acceleration for the specified frame number and panel.getWorldPosition(int n, TrackerPanel panel) Gets the world position for the specified frame number and panel.getWorldVelocity(int n, TrackerPanel panel) Gets the world velocity for the specified frame number and panel.booleanhasGaps()Returns the number of gaps (filled or not) in the keyframesbooleanisAcceleration(Step step) Determines whether the specified step is an acceleration step for this point mass.booleanGets the autofill flag.protected booleanDetermines if any point in this track is autotrackable.booleanGets whether the accelerations are visible on the specified panel.booleanisLabelsVisible(TrackerPanel panel) Gets the labels visibility.booleanisPosition(Step step) Determines whether the specified step is a position step.booleanGets whether the positions are visible on the specified panel.booleanisStepVisible(Step step, TrackerPanel panel) Reports whether or not the specified step is visible.booleanGets trace visibility.booleanisVelocity(Step step) Determines whether the specified step is a velocity step for this point mass.booleanGets whether the velocities are visible on the specified panel.voidMarks all missing steps by linear interpolation.voidmarkInterpolatedSteps(PositionStep step, boolean refreshData) Marks steps by linear interpolation on both sides of a given step.booleanmarkInterpolatedSteps(PositionStep startStep, PositionStep endStep) Marks steps by linear interpolation between two existing steps.voidResponds to property change events.protected voidrefreshData(DatasetManager data, TrackerPanel panel) Refreshes the data.voidremark()Overrides TTrack remark method.voidOverrides TTrack remark method.voidsetAccelerationColor(Color color) Sets the acceleration color.voidSets the acceleration footprint.voidsetAccelerationFootprints(Footprint[] choices) Sets the acceleration footprint choices.voidsetAlgorithm(int type) Sets the derivative algorithm type.protected voidsetAnglesInRadians(boolean radians) Sets the display format for angles.voidsetAutoFill(boolean autofill) Sets the autofill flag.voidsetAVisible(TrackerPanel panel, boolean visible) Shows and hides accelerations on the specified panel.voidsetAVisibleOnAll(boolean visible) Sets whether accelerations are visible on all tracker panels.voidOverrides TTrack setColor method.voidsetFontLevel(int level) Sets the font level.voidsetFootprint(String name, Step step) Sets the footprint to the specified choice.voidsetLabelsVisible(TrackerPanel panel, boolean visible) Sets the visibility of labels.protected voidsetMarking(boolean marking) Sets the marking flag.voidsetMass(double mass) Sets the mass.voidsetPositionVisible(TrackerPanel panel, boolean visible) Shows and hides positions on the specified panel.voidsetPositionVisibleOnAll(boolean visible) Sets whether positions are visible on all tracker panels.voidsetTraceVisible(boolean visible) Sets whether traces are visible.voidsetTrackerPanel(TrackerPanel panel) Adds events for TrackerPanel.voidsetVelocityColor(Color color) Sets the velocity color.voidsetVelocityFootprint(String name) Sets the velocity footprint.voidsetVelocityFootprints(Footprint[] choices) Sets the velocity footprint choices.voidsetVisible(boolean visible) Shows and hides this track.voidsetVVisible(TrackerPanel panel, boolean visible) Shows and hides velocities on the specified panel.voidsetVVisibleOnAll(boolean visible) Sets whether velocities are visible on all tracker panels.protected voidUpdates all velocity and acceleration steps on all TrackerPanels.protected voidupdateDerivatives(int frameNumber) Updates velocity and acceleration steps around a give frame number.protected voidupdateDerivatives(int startFrame, int stepCount) Updates velocity and acceleration steps for a specified start frame and step count.protected voidupdateDerivatives(TrackerPanel panel, int frameNumber) Updates velocity and acceleration steps around a give frame number on a TrackerPanel.protected voidupdateDerivatives(TrackerPanel panel, int startFrame, int stepCount) Updates velocity and acceleration steps for a specified start frame and step count.Methods inherited from class org.opensourcephysics.cabrillo.tracker.TTrack
addFixedItem, addFootprint, addListener, addListenerNCF, addPanelEvents, addStepListener, addTextColumn, assembleMenu, clearColumns, convertTextToDataColumn, createAllVariables, createWarningDialog, delete, delete, finalize, fireStepsChanged, getAllVariables, getAttachmentDescription, getAttachmentLength, getAttachments, getBaseTrackName, getBaseTypeInt, getColor, getCustomFormatPatterns, getData, getData, getDataDescription, getDataName, getDefaultFormatPatterns, getDefaultFormatPatterns, getDescription, getFootprint, getFootprintName, getFootprints, getFormatPatterns, getFrameForData, getIcon, getID, getMarkedPoint, getMarkingCursor, getMenuItems, getMessage, getName, getName, getNameDialog, getPlotViews, getPreferredDataOrder, getProperty, getPropertyNames, getSkippedStepWarningDialog, getStep, getSteps, getStepSizeWarningDialog, getTableViews, getTargetIndex, getTextColumnEntry, getTextColumnNames, getTrack, getTrailLength, getValues, getVarFormatPattern, getVariableDimensions, getVariablesFromFormatterDisplayName, getX, getXMax, getXMin, getY, getYMax, getYMin, initialize, invalidateData, isAttached, isAutoAdvance, isAutoTrackable, isDataValid, isDependent, isEmpty, isEnabled, isFullyAttached, isLocked, isMarkByDefault, isMarking, isMeasured, isStepComplete, isTrailVisible, isViewable, isVisible, loadAttachmentsFromNames, refreshAttachments, refreshAttachmentsLater, refreshData, refreshDecimalSeparators, removeActiveTrack, removeDeleteTrackItem, removeListener, removeListenerNCF, removePanelEvents, removeStepListener, removeTextColumn, renameTextColumn, repaint, repaint, repaintAll, repaintStep, restorePatterns, savePatterns, setActive, setAutoAdvance, setColorToDefault, setDefaultNameAndColor, setDescription, setEnabled, setFixedPosition, setFootprint, setFootprints, setFootprints, setFormatPattern, setInitialFormatPatterns, setLocked, setMarkByDefault, setName, setProperty, setTargetIndex, setTargetIndex, setTargetIndex, setTextColumnEntry, setTrailLength, setTrailVisible, setViewable, setX, setXY, setY, showAnglePopup, showFormatPopup, toString, updateListenerVisibleMethods inherited from class org.opensourcephysics.display.OSPRuntime.Supported
addListeners, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListenerSafely, dispose, firePropertyChange, firePropertyChange, removeListeners, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opensourcephysics.display.Interactive
isInteractive
-
Field Details
-
FINITE_DIFF
protected static final int FINITE_DIFF- See Also:
-
BOUNCE_DETECT
protected static final int BOUNCE_DETECT- See Also:
-
FINITE_DIFF_VSPILL2
protected static final int FINITE_DIFF_VSPILL2- See Also:
-
MINIMUM_MASS
protected static final double MINIMUM_MASS- See Also:
-
vDeriv
-
aDeriv
-
bounceDerivs
-
dataVariables
-
fieldVariables
-
formatVariables
-
formatMap
-
formatDescriptionMap
-
footprintNames
-
allVariables
-
isAutoKeyDown
protected static boolean isAutoKeyDown -
mass
protected double mass -
vFootprints
-
vFootprint
-
aFootprints
-
aFootprint
-
xVisibleOnAll
protected boolean xVisibleOnAll -
vVisibleOnAll
protected boolean vVisibleOnAll -
aVisibleOnAll
protected boolean aVisibleOnAll -
labelsVisible
protected boolean labelsVisible -
algorithm
protected int algorithm -
vDerivSpill
protected int vDerivSpill -
aDerivSpill
protected int aDerivSpill -
bounceDerivsSpill
protected int bounceDerivsSpill -
params
protected int[] params -
xData
protected double[] xData -
yData
protected double[] yData -
validData
protected boolean[] validData -
derivData
-
skippedSteps
-
isAutofill
protected boolean isAutofill -
showfilledSteps
protected boolean showfilledSteps -
vectorFields
-
massLabel
-
massField
-
mSeparator
-
velocityMenu
-
accelerationMenu
-
vColorItem
-
aColorItem
-
vFootprintMenu
-
aFootprintMenu
-
vTailsToOriginItem
-
vTailsToPositionItem
-
aTailsToOriginItem
-
aTailsToPositionItem
-
autotrackItem
-
vVisibleItem
-
aVisibleItem
-
vAtOrigin
protected boolean vAtOrigin -
aAtOrigin
protected boolean aAtOrigin -
traceVisible
protected boolean traceVisible -
trace
-
traceStroke
-
drawsTrace
protected boolean drawsTrace -
loading
protected boolean loading
-
-
Constructor Details
-
PointMass
public PointMass()Constructs a PointMass with mass 1.0. -
PointMass
public PointMass(double mass) Constructs a PointMass with specified mass.- Parameters:
mass- the mass
-
-
Method Details
-
getFormatVariables
- Specified by:
getFormatVariablesin classTTrack
-
getFormatMap
- Specified by:
getFormatMapin classTTrack
-
getFormatDescMap
- Specified by:
getFormatDescMapin classTTrack
-
getBaseType
- Specified by:
getBaseTypein classTTrack
-
getVarDimsImpl
- Specified by:
getVarDimsImplin classTTrack
-
setColor
Overrides TTrack setColor method. -
setVelocityColor
Sets the velocity color.- Parameters:
color- the desired color
-
setAccelerationColor
Sets the acceleration color.- Parameters:
color- the desired color
-
createStep
Creates a new position step.- Specified by:
createStepin classTTrack- Parameters:
n- the frame numberx- the x coordinate in image spacey- the y coordinate in image space- Returns:
- the new step
-
deleteStep
Overrides TTrack deleteStep method.- Overrides:
deleteStepin classTTrack- Parameters:
n- the frame number- Returns:
- the deleted step
-
deleteAutoTrackerStep
protected void deleteAutoTrackerStep(int n) -
getStep
Overrides TTrack getStep method. -
getNextVisibleStep
Gets next step after the specified step. May return null.- Overrides:
getNextVisibleStepin classTTrack- Parameters:
step- the steppanel- the tracker panel- Returns:
- the next step
-
getPreviousVisibleStep
Gets step before the specified step. May return null.- Overrides:
getPreviousVisibleStepin classTTrack- Parameters:
step- the steppanel- the tracker panel- Returns:
- the previous step
-
getStepLength
public int getStepLength()Gets the length of the steps created by this track.- Specified by:
getStepLengthin classTTrack- Returns:
- the footprint length
-
isAutoTrackable
protected boolean isAutoTrackable()Determines if any point in this track is autotrackable.- Overrides:
isAutoTrackablein classTTrack- Returns:
- true if autotrackable
-
autoMarkAt
Description copied from class:TTrackUsed by autoTracker to mark a step at a match target position.- Overrides:
autoMarkAtin classTTrack- Parameters:
n- the frame numberx- the x target coordinate in image spacey- the y target coordinate in image space- Returns:
- the TPoint that was automarked
-
getFootprintLength
public int getFootprintLength()Gets the length of the footprints required by this track.- Specified by:
getFootprintLengthin classTTrack- Returns:
- the footprint length
-
getVelocityFootprints
Gets the velocity footprint choices.- Returns:
- the velocity footprint choices
-
setVelocityFootprints
Sets the velocity footprint choices.- Parameters:
choices- the velocity footprint choices
-
getVelocityFootprint
Gets the current velocity footprint.- Returns:
- the velocity footprint
-
setVelocityFootprint
Sets the velocity footprint.- Parameters:
name- the name of the desired footprint
-
getAccelerationFootprints
Gets the acceleration footprint choices.- Returns:
- the acceleration footprint choices
-
setAccelerationFootprints
Sets the acceleration footprint choices.- Parameters:
choices- the acceleration footprint choices
-
getAccelerationFootprint
Gets the current acceleration footprint.- Returns:
- the acceleration footprint
-
setAccelerationFootprint
Sets the acceleration footprint.- Parameters:
name- the name of the desired footprint
-
getFootprints
Gets the footprint choices. Overrides TTrack.- Overrides:
getFootprintsin classTTrack- Parameters:
step- the step that identifies the step array- Returns:
- the array of Footprints available
-
setFootprint
Sets the footprint to the specified choice. Overrides TTrack.- Overrides:
setFootprintin classTTrack- Parameters:
name- the name of the desired footprintstep- the step that identifies the step array
-
getFootprint
Gets the current footprint of the specified step. Overrides TTrack.- Overrides:
getFootprintin classTTrack- Parameters:
step- the step that identifies the step array- Returns:
- the footprint
-
setMarking
protected void setMarking(boolean marking) Sets the marking flag. Flag should be true when ready to be marked by user.- Overrides:
setMarkingin classTTrack- Parameters:
marking- true when marking
-
getMass
public double getMass()Gets the mass.- Returns:
- the mass
-
setMass
public void setMass(double mass) Sets the mass.- Parameters:
mass- the mass
-
setFontLevel
public void setFontLevel(int level) Sets the font level.- Overrides:
setFontLevelin classTTrack- Parameters:
level- the desired font level
-
getWorldPosition
Gets the world position for the specified frame number and panel. May return null;- Parameters:
n- the frame numberpanel- the tracker panel- Returns:
- a Point2D containing the position components
-
getWorldVelocity
Gets the world velocity for the specified frame number and panel. May return null;- Parameters:
n- the frame numberpanel- the tracker panel- Returns:
- a Point2D containing the velocity components
-
getWorldAcceleration
Gets the world acceleration for the specified frame number and panel. May return null.- Parameters:
n- the frame numberpanel- the tracker panel- Returns:
- a Point2D containing the acceleration components
-
setAlgorithm
public void setAlgorithm(int type) Sets the derivative algorithm type. Defined types: FINITE_DIFF, BOUNCE_DETECT- Parameters:
type- one of the defined algorithm types
-
isAutofill
public boolean isAutofill()Gets the autofill flag.- Returns:
- true if autofill is on
-
setAutoFill
public void setAutoFill(boolean autofill) Sets the autofill flag.- Parameters:
autofill- true to turn on autofill
-
hasGaps
public boolean hasGaps()Returns the number of gaps (filled or not) in the keyframes- Returns:
- the gap count
-
getUnfilledGapCount
public int getUnfilledGapCount(boolean emptyGapsOnly) Returns the number of unfilled gaps in the keyframes- Returns:
- the unfilled gap count
-
markAllInterpolatedSteps
public void markAllInterpolatedSteps()Marks all missing steps by linear interpolation. -
markInterpolatedSteps
Marks steps by linear interpolation on both sides of a given step.- Parameters:
step- the steprefreshData- true to update derivatives
-
markInterpolatedSteps
Marks steps by linear interpolation between two existing steps. Removes steps if isAutofill is false.- Parameters:
startStep- the start stependStep- the end step- Returns:
- true if changed (step added or removed)
-
dispose
public void dispose()Description copied from class:TTrackDisposes of resources when this track is deleted or cleared. -
getTargetDescription
Returns a description of the point at a given index. Used by AutoTracker.- Overrides:
getTargetDescriptionin classTTrack- Parameters:
pointIndex- the points[] index- Returns:
- the description
-
refreshData
Refreshes the data.- Overrides:
refreshDatain classTTrack- Parameters:
data- the DatasetManagerpanel- the tracker panel
-
draw
Overrides TTrack draw method. -
findInteractive
Overrides TTrack findInteractive method.- Specified by:
findInteractivein interfaceInteractive- Overrides:
findInteractivein classTTrack- Parameters:
dp- the drawing panelxpix- the x pixel position on the panelypix- the y pixel position on the panel- Returns:
- the first step or motion vector that is hit
-
setVisible
public void setVisible(boolean visible) Shows and hides this track.- Overrides:
setVisiblein classTTrack- Parameters:
visible-trueto show this track
-
isStepVisible
Reports whether or not the specified step is visible.- Overrides:
isStepVisiblein classTTrack- Parameters:
step- the steppanel- the tracker panel- Returns:
trueif the step is visible
-
setVVisibleOnAll
public void setVVisibleOnAll(boolean visible) Sets whether velocities are visible on all tracker panels.- Parameters:
visible-trueto show velocities
-
setVVisible
Shows and hides velocities on the specified panel.- Parameters:
panel- the tracker panelvisible-trueto show velocities
-
isVVisible
public boolean isVVisible()Gets whether the velocities are visible on the specified panel.- Parameters:
panel- the tracker panel- Returns:
trueif velocities are visible
-
setPositionVisibleOnAll
public void setPositionVisibleOnAll(boolean visible) Sets whether positions are visible on all tracker panels.- Parameters:
visible-trueto show positions
-
setTraceVisible
public void setTraceVisible(boolean visible) Sets whether traces are visible.- Parameters:
visible-trueto show traces
-
isTraceVisible
public boolean isTraceVisible()Gets trace visibility.- Returns:
trueif traces are visible
-
isPosition
Determines whether the specified step is a position step.- Parameters:
step- the step- Returns:
trueif the step is a position
-
setPositionVisible
Shows and hides positions on the specified panel.- Parameters:
panel- the tracker panelvisible-trueto show positions
-
isPositionVisible
public boolean isPositionVisible()Gets whether the positions are visible on the specified panel.- Parameters:
panel- the tracker panel- Returns:
trueif positions are visible
-
getVelocity
Gets the velocity for the specified frame number and panel.- Parameters:
n- the frame numberpanel- the tracker panel- Returns:
- the velocity
-
getVelocities
Gets the velocity step array for the specified panel.- Parameters:
panel- the tracker panel- Returns:
- the velocity step array
-
isVelocity
Determines whether the specified step is a velocity step for this point mass.- Parameters:
step- the step- Returns:
trueif the step is a velocity VectorStep
-
setAVisibleOnAll
public void setAVisibleOnAll(boolean visible) Sets whether accelerations are visible on all tracker panels.- Parameters:
visible-trueto show accelerations
-
setAVisible
Shows and hides accelerations on the specified panel.- Parameters:
panel- the tracker panelvisible-trueto show accelerations
-
isAVisible
public boolean isAVisible()Gets whether the accelerations are visible on the specified panel.- Parameters:
panel- the tracker panel- Returns:
trueif accelerations are visible
-
getAcceleration
Gets the acceleration for the specified frame number and panel.- Parameters:
n- the frame numberpanel- the tracker panel- Returns:
- the acceleration vector
-
getAccelerations
Gets the acceleration step array for the specified panel.- Parameters:
panel- the tracker panel- Returns:
- the acceleration step array
-
isAcceleration
Determines whether the specified step is an acceleration step for this point mass.- Parameters:
step- the step- Returns:
trueif the step is an acceleration VectorStep
-
setLabelsVisible
Sets the visibility of labels.- Parameters:
panel- a tracker panelvisible-trueto show all labels
-
isLabelsVisible
Gets the labels visibility.- Parameters:
panel- the tracker panel- Returns:
trueif labels are visible
-
getNumberFieldsForStep
Description copied from class:TTrackReturns an array of NumberFields {x, y, magnitude, angle} for a given step.- Overrides:
getNumberFieldsForStepin classTTrack- Parameters:
step- the step- Returns:
- the number fields
-
setAnglesInRadians
protected void setAnglesInRadians(boolean radians) Description copied from class:TTrackSets the display format for angles.- Overrides:
setAnglesInRadiansin classTTrack- Parameters:
radians-truefor radians, false for degrees
-
updateDerivatives
protected void updateDerivatives()Updates all velocity and acceleration steps on all TrackerPanels. -
updateDerivatives
protected void updateDerivatives(int startFrame, int stepCount) Updates velocity and acceleration steps for a specified start frame and step count.- Parameters:
startFrame- the start framestepCount- the step count
-
updateDerivatives
protected void updateDerivatives(int frameNumber) Updates velocity and acceleration steps around a give frame number.- Parameters:
frameNumber- the frame number
-
updateDerivatives
Updates velocity and acceleration steps around a give frame number on a TrackerPanel.- Parameters:
panel- the TrackerPanelframeNumber- the frame number
-
updateDerivatives
Updates velocity and acceleration steps for a specified start frame and step count.- Parameters:
panel- the TrackerPanelstartFrame- the start framestepCount- the step count
-
getRotationData
Gets the rotational data.- Returns:
- Object[] {theta, omega, alpha}
-
getRotationData
Gets the rotational data for a range of frame numbers.- Parameters:
startFrame- the start framestepCount- the number of steps- Returns:
- Object[] {theta, omega, alpha}
-
erase
public void erase()Overrides TTrack erase method to include v and a. -
remark
public void remark()Overrides TTrack remark method. -
erase
Overrides TTrack erase method. -
remark
Overrides TTrack remark method. -
setTrackerPanel
Adds events for TrackerPanel.- Overrides:
setTrackerPanelin classTTrack- Parameters:
panel- the new TrackerPanel
-
propertyChange
Responds to property change events.- Specified by:
propertyChangein interfacePropertyChangeListener- Overrides:
propertyChangein classTTrack- Parameters:
e- the property change event
-
getMenu
Returns a menu with items that control this track. -
getToolbarTrackComponents
Overrides TTrack getToolbarTrackComponents method.- Overrides:
getToolbarTrackComponentsin classTTrack- Parameters:
panel- the tracker panel- Returns:
- a list of components
-
getToolbarPointComponents
Overrides TTrack getToolbarPointComponents method.- Overrides:
getToolbarPointComponentsin classTTrack- Parameters:
panel- the tracker panelpoint- the TPoint- Returns:
- a list of components
-
getNumberFields
Description copied from class:TTrackGets a map of number fields by name.- Overrides:
getNumberFieldsin classTTrack- Returns:
- a map of name to NumberField.
-
getLoader
Returns an ObjectLoader to save and load data for this class.- Returns:
- the object loader
-
createGUI
protected void createGUI()Creates the GUI. -
createMenuIfNecessary
protected void createMenuIfNecessary() -
getVArray
Gets the velocity StepArray for the specified panel.- Parameters:
panel- the tracker panel- Returns:
- the velocity StepArray
-
getAArray
Gets the acceleration StepArray for the specified panel.- Parameters:
panel- the tracker panel- Returns:
- the acceleration StepArray
-