Skip to content

Compute recommended camera position based on playback stroke #1

@Daniel-Fan

Description

@Daniel-Fan

Working based branch:
https://github.com/Daniel-Fan/open-brush/tree/add-strokeIndicator

ReadMemory

  1. Read the strokes info from memory, then add stroke into a MemoryList https://github.com/Daniel-Fan/open-brush/blob/add-strokeIndicator/Assets/Scripts/Save/SketchWriter.cs#L306
  2. All the stroke is stored in that memoryList
  3. The memoryList will be sorted by the timestamp of initial control point of each stroke. https://github.com/Daniel-Fan/open-brush/blob/add-strokeIndicator/Assets/Scripts/SketchMemoryScript.cs#L906

Workflow for playback

  1. BeginDrawingFromMemory is used to initialize the playback object.
  2. Before passing memoryList into the ScenePlayback, we should have finished the computation of camera position.
  3. After the scene started, we only only to consider the redraw part, see details below
    • In Redraw(which should be used for scale change and zoom in and out), after it is sorted, we will start the ScenePlaybackByTimeLayered or ScenePlaybackByStrokeDistance

Data Structure of Stroke

  1. There is a list in each Stroke called m_ControlPoints which stores the specific position and orientation of each point in this list. https://github.com/Daniel-Fan/open-brush/blob/add-strokeIndicator/Assets/Scripts/StrokeData.cs#L31
  2. structure of control point https://github.com/Daniel-Fan/open-brush/blob/add-strokeIndicator/Assets/Scripts/PointerManager.cs#L70

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions