/// <summary> /// Update this slot, applying the given states to find current matrix and color transforms /// and updating meshes using the FFDTimelineState if necessary. /// </summary> /// <param name="displayState"></param> /// <param name="ffdState"></param> internal void Update(DisplayTimelineState displayState, FFDTimelineState ffdState) { var s = displayState.GetState(Name); if (s != null) { var slotState = (SlotState)s; DisplayIndex = slotState.DisplayIndex; if (slotState.ZOrder != null) { ZOrder = (int)slotState.ZOrder; } ColorTransform = slotState.Color; } if (Displays.Count == 0 || !Visible) { return; } var display = Displays[DisplayIndex].Display; // update the current display if it's a mesh var mesh = display as DbMesh; mesh?.Update(ffdState.GetVertices(Name)); }
public DbAnimationState(TransformTimelineState transformState, DisplayTimelineState displayState, FFDTimelineState ffdState) { TransformState = transformState; DisplayState = displayState; FFDState = ffdState; }