/// 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; }
public TrTransform GetFrame(AttachFrame frame) { switch (frame) { case AttachFrame.Pointer: return(CanvasFromTool); case AttachFrame.LineTangent: return(CanvasFromTangent); default: throw new NotImplementedException(); } }
/// 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; }
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; }