//TODO: deleted 'override' public bool MoveHandle(BaseObject op, BaseObject undo, ref double4x4 tm, int hit_id, QUALIFIER qualifier) { BaseContainer src = undo.GetDataInstance(); BaseContainer dst = op.GetDataInstance(); double3 handle_dir = new double3(1.0,0.0,0.0); handle_dir = SwapPoint(handle_dir,src.GetLong(C4dApi.PRIM_PLANE)); double val = double3.Dot(tm.Offset, handle_dir); dst.SetReal(CIRCLEOBJECT_RAD, M.Saturate(src.GetReal(CIRCLEOBJECT_RAD)+val, 0.0, C4dApi.MAXRANGE)); return true; }
public override SplineObject GetContour(BaseObject op, BaseDocument doc, double lod, BaseThread bt) { BaseContainer bc = op.GetDataInstance(); SplineObject bp = GenerateCircle(bc.GetReal(CIRCLEOBJECT_RAD)); if (bp == null) return null; BaseContainer bb = bp.GetDataInstance(); bb.SetLong(C4dApi.SPLINEOBJECT_INTERPOLATION, bc.GetLong(C4dApi.SPLINEOBJECT_INTERPOLATION)); bb.SetLong(C4dApi.SPLINEOBJECT_SUB, bc.GetLong(C4dApi.SPLINEOBJECT_SUB)); bb.SetReal(C4dApi.SPLINEOBJECT_ANGLE, bc.GetReal(C4dApi.SPLINEOBJECT_ANGLE)); bb.SetReal(C4dApi.SPLINEOBJECT_MAXIMUMLENGTH, bc.GetReal(C4dApi.SPLINEOBJECT_MAXIMUMLENGTH)); OrientObject(bp, bc.GetLong(C4dApi.PRIM_PLANE), bc.GetBool(C4dApi.PRIM_REVERSE)); return bp; }