public PointTrace(PointD point, TraceBase trace, int traceIndex, TracePointType pointType) { this.Point = point; this.Trace = trace; this.TraceIndex = traceIndex; this.PointType = pointType; }
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)); } }
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; } }
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; }
public TracePoint(TracePointType t, Vector3 p) { Type = t; Pos = p; }