Skip to content

Conversation

The-Lennzer
Copy link

Describe your changes

Changed File: vtkF3DQuakeMDLImporter.cxx

  • used timeValue to find two adjacent frames instead of just the previous Frame
  • wrote interpolation logic using vtkNew<vtkInterpolateDataSetAttributes>
  • if both frames are different interpolated frame is set to render
  • else previous logic follows, the previous frame, now FrameA is set to render

Issue ticket number and link if any

#2138

This is a work-in-progress draft PR to fix issues in interpolation logic

  • During playback, screen goes blank
  • playback works well without interpolation logic

//interpolation
if (frameAIndex != frameBIndex)
{
vtkNew<vtkInterpolateDataSetAttributes> interpolator;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vtkNew is a RAII mechanism, which means interpolator is deallocated when you leave the scope, which means the dataset is deleted before you display it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to store the Interpolator as a member of the vtkF3DQuakeMDLImporter so it keeps on living when you leave this method.

@mwestphal
Copy link
Member

Need any help moving forward @The-Lennzer ?

1 similar comment
@mwestphal
Copy link
Member

Need any help moving forward @The-Lennzer ?

Comment on lines +509 to +510
iPtr->SetInputData(0, frameA);
iPtr->SetInputData(1, frameB);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
iPtr->SetInputData(0, frameA);
iPtr->SetInputData(1, frameB);
iPtr->AddInputData(frameA);
iPtr->AddInputData(frameB);

@mwestphal
Copy link
Member

Need any help moving forward @The-Lennzer ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants