Class PerspectiveTrack
java.lang.Object
org.opensourcephysics.display.OSPRuntime.Supported
org.opensourcephysics.cabrillo.tracker.TTrack
org.opensourcephysics.cabrillo.tracker.PerspectiveTrack
- All Implemented Interfaces:
- PropertyChangeListener,- EventListener,- Drawable,- Interactive,- Measurable,- Trackable
This is a track used for autotracking perspective filter corners.
- Author:
- Douglas Brown
- 
Nested Class SummaryNested classes/interfaces inherited from class org.opensourcephysics.cabrillo.tracker.TTrackTTrack.NameDialog, TTrack.StepArray, TTrack.TextLineLabel, TTrack.TrackDecimalField, TTrack.TrackNumberField
- 
Field SummaryFields inherited from class org.opensourcephysics.cabrillo.tracker.TTrackangleField, 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.TrackablePROPERTY_ADJUSTING
- 
Constructor SummaryConstructorsConstructorDescriptionPerspectiveTrack(PerspectiveFilter filter) Constructor requires a PerspectiveFilter to control.
- 
Method SummaryModifier and TypeMethodDescriptionautoMarkAt(int n, double x, double y) Used by autoTracker to mark a step at a match target position.createStep(int n, double x, double y) Creates a new step.deleteStep(int n) Deletes a step.voiddispose()Disposes of resources when this track is deleted or cleared.voiddraw(DrawingPanel panel, Graphics _g) Draws the steps on the tracker panel.findInteractive(DrawingPanel panel, int xpix, int ypix) Finds the interactive drawable object located at the specified pixel position.intGets the length of the footprints required by this track.String[]getMarkedPoint(int n, int index) Used by autoTracker to get the marked point for a given frame and index.getMenu(TrackerPanel trackerPanel, JMenu menu) Prepares menu items and returns a new menu.Gets a message about this track to display in a message box.getStep(TPoint p, TrackerPanel trackerPanel) Gets the step associated with a TPoint.intGets the length of the steps created by this track.protected StringgetTargetDescription(int pointIndex) Returns a description of a target point with a given index.getVarDimsImpl(String variable) protected booleanDetermines if at least one point in this track is autotrackable.protected booleanisAutoTrackable(int pointIndex) Determines if the given point index is autotrackable.voidResponds to property change events.voidRemarks all steps on the specified panel.protected voidSets the target index for the autotracker.voidsetTrackerPanel(TrackerPanel panel) Adds events for TrackerPanel.Methods inherited from class org.opensourcephysics.cabrillo.tracker.TTrackaddFixedItem, addFootprint, addListener, addListenerNCF, addPanelEvents, addStepListener, addTextColumn, assembleMenu, clearColumns, convertTextToDataColumn, createAllVariables, createWarningDialog, delete, delete, erase, erase, finalize, fireStepsChanged, getAllVariables, getAttachmentDescription, getAttachmentLength, getAttachments, getBaseTrackName, getBaseTypeInt, getColor, getCustomFormatPatterns, getData, getData, getDataDescription, getDataName, getDefaultFormatPatterns, getDefaultFormatPatterns, getDescription, getFootprint, getFootprint, getFootprintName, getFootprints, getFootprints, getFormatPatterns, getFrameForData, getIcon, getID, getLoader, getMarkingCursor, getMenuItems, getName, getName, getNameDialog, getNextVisibleStep, getNumberFields, getNumberFieldsForStep, getPlotViews, getPreferredDataOrder, getPreviousVisibleStep, getProperty, getPropertyNames, getSkippedStepWarningDialog, getStep, getSteps, getStepSizeWarningDialog, getTableViews, getTargetIndex, getTextColumnEntry, getTextColumnNames, getToolbarPointComponents, getToolbarTrackComponents, getTrack, getTrailLength, getValues, getVarFormatPattern, getVariableDimensions, getVariablesFromFormatterDisplayName, getX, getXMax, getXMin, getY, getYMax, getYMin, initialize, invalidateData, isAttached, isAutoAdvance, isDataValid, isDependent, isEmpty, isEnabled, isFullyAttached, isLocked, isMarkByDefault, isMarking, isMeasured, isStepComplete, isStepVisible, isTrailVisible, isViewable, isVisible, loadAttachmentsFromNames, refreshAttachments, refreshAttachmentsLater, refreshData, refreshData, refreshDecimalSeparators, remark, removeActiveTrack, removeDeleteTrackItem, removeListener, removeListenerNCF, removePanelEvents, removeStepListener, removeTextColumn, renameTextColumn, repaint, repaint, repaintAll, repaintStep, restorePatterns, savePatterns, setActive, setAnglesInRadians, setAutoAdvance, setColor, setColorToDefault, setDefaultNameAndColor, setDescription, setEnabled, setFixedPosition, setFontLevel, setFootprint, setFootprint, setFootprints, setFootprints, setFormatPattern, setInitialFormatPatterns, setLocked, setMarkByDefault, setMarking, setName, setProperty, setTargetIndex, setTargetIndex, setTextColumnEntry, setTrailLength, setTrailVisible, setViewable, setVisible, setX, setXY, setY, showAnglePopup, showFormatPopup, toString, updateListenerVisibleMethods inherited from class org.opensourcephysics.display.OSPRuntime.SupportedaddListeners, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListenerSafely, dispose, firePropertyChange, firePropertyChange, removeListeners, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from class java.lang.Objectclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opensourcephysics.display.InteractiveisInteractive
- 
Constructor Details- 
PerspectiveTrackConstructor requires a PerspectiveFilter to control.- Parameters:
- filter- the filter
 
 
- 
- 
Method Details- 
disposepublic void dispose()Description copied from class:TTrackDisposes of resources when this track is deleted or cleared.
- 
setTrackerPanelAdds events for TrackerPanel.- Overrides:
- setTrackerPanelin class- TTrack
- Parameters:
- panel- the new TrackerPanel
 
- 
propertyChangeResponds to property change events.- Specified by:
- propertyChangein interface- PropertyChangeListener
- Overrides:
- propertyChangein class- TTrack
- Parameters:
- e- the property change event
 
- 
findInteractiveFinds the interactive drawable object located at the specified pixel position.- Specified by:
- findInteractivein interface- Interactive
- Overrides:
- findInteractivein class- TTrack
- Parameters:
- panel- the drawing panel
- xpix- the x pixel position on the panel
- ypix- the y pixel position on the panel
- Returns:
- the first step TPoint that is hit
 
- 
getMenuPrepares menu items and returns a new menu. Subclasses should override this method and add track-specific menu items.
- 
getMessageGets a message about this track to display in a message box.- Overrides:
- getMessagein class- TTrack
- Returns:
- the message
 
- 
getStepGets the step associated with a TPoint.
- 
deleteStepDeletes a step. This removes the perspective filter key frame data.- Overrides:
- deleteStepin class- TTrack
- Parameters:
- n- the frame number
- Returns:
- the deleted step
 
- 
autoMarkAtUsed by autoTracker to mark a step at a match target position.- Overrides:
- autoMarkAtin class- TTrack
- Parameters:
- n- the frame number
- x- the x target coordinate in image space
- y- the y target coordinate in image space
- Returns:
- the TPoint that was automarked
 
- 
getMarkedPointUsed by autoTracker to get the marked point for a given frame and index.- Overrides:
- getMarkedPointin class- TTrack
- Parameters:
- n- the frame number
- index- the index
- Returns:
- the step TPoint at the index
 
- 
setTargetIndexSets the target index for the autotracker.- Overrides:
- setTargetIndexin class- TTrack
- Parameters:
- p- a TPoint associated with this track
 
- 
getTargetDescriptionReturns a description of a target point with a given index.- Overrides:
- getTargetDescriptionin class- TTrack
- Parameters:
- pointIndex- the index
- Returns:
- the description
 
- 
isAutoTrackableprotected boolean isAutoTrackable(int pointIndex) Determines if the given point index is autotrackable.- Overrides:
- isAutoTrackablein class- TTrack
- Parameters:
- pointIndex- the points[] index
- Returns:
- true if autotrackable
 
- 
isAutoTrackableprotected boolean isAutoTrackable()Determines if at least one point in this track is autotrackable.- Overrides:
- isAutoTrackablein class- TTrack
- Returns:
- true if autotrackable
 
- 
drawDescription copied from class:TTrackDraws the steps on the tracker panel.
- 
getStepLengthpublic int getStepLength()Description copied from class:TTrackGets the length of the steps created by this track.- Specified by:
- getStepLengthin class- TTrack
- Returns:
- the footprint length
 
- 
getFootprintLengthpublic int getFootprintLength()Description copied from class:TTrackGets the length of the footprints required by this track.- Specified by:
- getFootprintLengthin class- TTrack
- Returns:
- the footprint length
 
- 
createStepDescription copied from class:TTrackCreates a new step.- Specified by:
- createStepin class- TTrack
- Parameters:
- n- the frame number
- x- the x coordinate in image space
- y- the y coordinate in image space
- Returns:
- the new step
 
- 
remarkDescription copied from class:TTrackRemarks all steps on the specified panel.
- 
getFormatMap- Specified by:
- getFormatMapin class- TTrack
 
- 
getFormatDescMap- Specified by:
- getFormatDescMapin class- TTrack
 
- 
getFormatVariables- Specified by:
- getFormatVariablesin class- TTrack
 
- 
getVarDimsImpl- Specified by:
- getVarDimsImplin class- TTrack
 
- 
getBaseType- Specified by:
- getBaseTypein class- TTrack
 
 
-