Esempio n. 1
0
 public PointTrace(PointD point, TraceBase trace, int traceIndex, TracePointType pointType)
 {
     this.Point      = point;
     this.Trace      = trace;
     this.TraceIndex = traceIndex;
     this.PointType  = pointType;
 }
Esempio n. 2
0
 void AddTracePointAtPos(TracePointType tptype, Vector3 curPos)
 {
     if (_Trace.Count > 0)
     {
         _Trace.Add(new TracePoint(tptype, curPos, _Trace [_Trace.Count - 1]));
     }
     else
     {
         _Trace.Add(new TracePoint(tptype, curPos, null));
     }
 }
Esempio n. 3
0
 public TracePoint(TracePointType t, Vector3 p, TracePoint PrevTP = null)
 {
     Type = t;
     Pos  = p;
     if (PrevTP == null)
     {
         Dist = 0.0f;
     }
     else
     {
         Dist  = PrevTP.Dist;
         Dist += (Pos - PrevTP.Pos).magnitude;
     }
 }
Esempio n. 4
0
    void AddTracePoint(TracePointType tptype, Vector3 curPos)
    {
        Vector3 move = curPos - _LastPos;

        if (tptype == TracePointType.STROKE_END ||
            tptype == TracePointType.STROKE_START)
        {
        }

        if (move.magnitude > _StepMin)
        {
            AddTracePointAtPos(tptype, curPos);
        }
        else
        {
            if (tptype == TracePointType.STROKE_END || tptype == TracePointType.STROKE_START)
            {
                curPos += _StepMin * (Vector3)Random.insideUnitCircle;
                AddTracePointAtPos(tptype, curPos);
            }
        }
        _LastPos = curPos;
    }
Esempio n. 5
0
 public TracePoint(TracePointType t, Vector3 p)
 {
     Type = t;
     Pos  = p;
 }