internal override void Interp(VolumeParameter from, VolumeParameter to, float t) { if (m_Value == null) { return; } var paramOrigin = parameters; var paramFrom = ((ObjectParameter <T>)from).parameters; var paramTo = ((ObjectParameter <T>)to).parameters; for (int i = 0; i < paramFrom.Count; i++) { if (paramOrigin[i].overrideState) { paramOrigin[i].Interp(paramFrom[i], paramTo[i], t); } } }
void SetAllOverridesTo(IEnumerable <VolumeParameter> enumerable, bool state) { foreach (var prop in enumerable) { prop.overrideState = state; var t = prop.GetType(); if (VolumeParameter.IsObjectParameter(t)) { // This method won't be called a lot but this is sub-optimal, fix me var innerParams = (ReadOnlyCollection <VolumeParameter>) t.GetProperty("parameters", BindingFlags.NonPublic | BindingFlags.Instance) .GetValue(prop, null); if (innerParams != null) { SetAllOverridesTo(innerParams, state); } } } }
internal abstract void SetValue(VolumeParameter parameter);
internal abstract void Interp(VolumeParameter from, VolumeParameter to, float t);