Exemplo n.º 1
0
 /// Pass:
 ///   frameKnot - the index of a knot; negative to index from the end.
 ///   offset - specified relative to the knot+frame, as a %age of brush size.
 ///   twist - in degrees-per-meter; rotates based on distance from initial knot
 ///   pressureAffectsOffset - true if the offset should be modulated by pressure, too.
 ///     For example, the rungs of a double-helix should be closer to the parent
 ///     when pressure makes the brush smaller; but maybe a tickertape should remain
 ///     constant-size and pressure only affects the stuff written on the tape.
 public PbChildWithOffset(int frameKnot, AttachFrame frame, TrTransform offset, float twist,
                          bool pressureAffectsOffset = true)
     : base(frameKnot, frame)
 {
     m_offset = offset;
     m_twist  = twist;
     m_pressureAffectsOffset = pressureAffectsOffset;
 }
Exemplo n.º 2
0
            public TrTransform GetFrame(AttachFrame frame)
            {
                switch (frame)
                {
                case AttachFrame.Pointer: return(CanvasFromTool);

                case AttachFrame.LineTangent: return(CanvasFromTangent);

                default: throw new NotImplementedException();
                }
            }
Exemplo n.º 3
0
 /// If frameKnot is < 0, it is relative to a knot at the current end of the stroke.
 public PbChildWithKnotBasedFrame(int frameKnot, AttachFrame frame)
 {
     m_frameKnot = frameKnot;
     m_frame     = frame;
 }
Exemplo n.º 4
0
            protected Plane m_plane; // in knot space

            /// Plane is in the frame of the knot
            public PbChildKnotBasedMirror(int frameKnot, AttachFrame frame, Plane plane)
                : base(frameKnot, frame)
            {
                m_plane = plane;
            }