internal void AddAfter(CamNode node, int?index = null) { if (index is null) { _nodes.Add(node); } else { _nodes.Insert(index.Value + 1, node); } }
internal CamNode GetPointBetween(CamNode point, double percent) { var node = new CamNode( x + (point.x - x) * percent, y + (point.y - y) * percent, z + (point.z - z) * percent, (float)(Yaw + (point.Yaw - Yaw) * percent), (float)(Pitch + (point.Pitch - Pitch) * percent), (float)(Roll + (point.Roll - Roll) * percent)); node.FieldOfView += (point.FieldOfView - FieldOfView) * percent; node.Saturation += (point.Saturation - Saturation) * percent; node.Sepia += (point.Sepia - Sepia) * percent; return(node); }
internal CamNode ExtrapolateFrom(CamNode p, int direction) { var dx = p.x - x; var dy = p.y - y; var dz = p.z - z; var dpitch = p.pitch - pitch; var dyaw = p.yaw - yaw; var droll = p.roll - roll; return(new CamNode( dx * direction, dy * direction, dz * direction, dyaw * direction, dpitch * direction, droll * direction)); }
internal bool PositionEquals(CamNode node) { return(Math.Abs(node.X - X) == 0f && Math.Abs(node.Y - Y) == 0f && Math.Abs(node.Z - Z) == 0f); }
internal void Clear(CamNode node, int?index = null) { _nodes.Clear(); }
internal void Remove(CamNode node, int?index = null) { _nodes[index ?? _nodes.Count - 1] = node; }
internal void Update(CamNode node, int?index = null) { _nodes[index ?? _nodes.Count] = node; }
internal void AddBefore(CamNode node, int?index = null) { _nodes.Insert(index ?? 0, node); }
internal void Add(CamNode node) { _nodes.Add(node); }