예제 #1
0
 internal void AddAfter(CamNode node, int?index = null)
 {
     if (index is null)
     {
         _nodes.Add(node);
     }
     else
     {
         _nodes.Insert(index.Value + 1, node);
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
        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));
        }
예제 #4
0
 internal bool PositionEquals(CamNode node)
 {
     return(Math.Abs(node.X - X) == 0f &&
            Math.Abs(node.Y - Y) == 0f &&
            Math.Abs(node.Z - Z) == 0f);
 }
예제 #5
0
 internal void Clear(CamNode node, int?index = null)
 {
     _nodes.Clear();
 }
예제 #6
0
 internal void Remove(CamNode node, int?index = null)
 {
     _nodes[index ?? _nodes.Count - 1] = node;
 }
예제 #7
0
 internal void Update(CamNode node, int?index = null)
 {
     _nodes[index ?? _nodes.Count] = node;
 }
예제 #8
0
 internal void AddBefore(CamNode node, int?index = null)
 {
     _nodes.Insert(index ?? 0, node);
 }
예제 #9
0
 internal void Add(CamNode node)
 {
     _nodes.Add(node);
 }