09-29-2022, 09:18 PM
I need my SplineController to quickly access the radius of points along the spline. I have the math working properly but am trying to best fit it into the architecture of Curvy.
1) Is it correct place to cached the radius values in Metadata (i.e. public class RadiusMetadata : CurvyInterpolatableMetadataBase<float> )?
If not, what would you suggest?
2) Only RadiusMetadata of certain segments would need to be recalculated when a control point is manipulated. Will this occur using CurvySpline.SetDirty( cpOfRadiusToUpdate,...) or automagiclly by just setting the segment's LocalPosition ?
If so, what to implement in RadiusMetadata to catch dirty notifications?
If not, do I just implement my own RadiusMetadata.BuildCache when any of it's segment's dependent cps changes?
(It would be nice if this 'dependency' is handling was the same one Curvy uses taking 'followUp' things into consideration. I don't want to reinvent it)
Or what would you suggest?
1) Is it correct place to cached the radius values in Metadata (i.e. public class RadiusMetadata : CurvyInterpolatableMetadataBase<float> )?
If not, what would you suggest?
2) Only RadiusMetadata of certain segments would need to be recalculated when a control point is manipulated. Will this occur using CurvySpline.SetDirty( cpOfRadiusToUpdate,...) or automagiclly by just setting the segment's LocalPosition ?
If so, what to implement in RadiusMetadata to catch dirty notifications?
If not, do I just implement my own RadiusMetadata.BuildCache when any of it's segment's dependent cps changes?
(It would be nice if this 'dependency' is handling was the same one Curvy uses taking 'followUp' things into consideration. I don't want to reinvent it)
Or what would you suggest?