protected override void DerivedDraw(MotionEditor editor) { CuboidMap sensor = GetCuboidMap(editor.GetCurrentFrame(), editor.Mirror); sensor.Draw(Color); if (DrawReferences) { sensor.DrawReferences(); } if (DrawDistribution) { sensor.DrawDistribution(Color, Rect); } }
protected override void DerivedDraw(MotionEditor editor) { if (Target.DrawGeometry || Target.DrawReferences || Target.DrawDistribution) { //DistanceMap sensor = Target.GetInteractionGeometry(editor.GetCurrentFrame(), editor.Mirror, 1f/editor.TargetFramerate); CuboidMap sensor = Target.GetInteractionGeometry(editor.GetCurrentFrame(), editor.Mirror, 1f / editor.TargetFramerate); /* * Interaction interaction = Target.FindInteraction(editor.GetCurrentFrame()); * CuboidMap sensor; * if(interaction == null) { * RootModule module = Data.GetModule(ID.Root) == null ? null : (RootModule)Data.GetModule(ID.Root); * sensor = new CuboidMap(new Vector3Int(Target.PropResolution, Target.PropResolution, Target.PropResolution)); * sensor.Sense(module == null ? Matrix4x4.identity : module.GetRootTransformation(editor.GetCurrentFrame(), editor.Mirror), interaction.gameObject.layer, Vector3.zero); * } else { * sensor = new CuboidMap(new Vector3Int(Target.PropResolution, Target.PropResolution, Target.PropResolution)); * sensor.Sense(interaction.GetCenter(), LayerMask.GetMask("Interaction"), interaction.GetExtents()); * Transformation transformation = interaction.GetComponent<Transformation>(); * if(transformation != null) { * sensor.Retransform(interaction.GetCenter(transformation.GetTransformation(Target.GetTargetFrame(editor.GetCurrentFrame(), 1f/editor.TargetFramerate), editor.Mirror))); * } * } */ if (Target.DrawGeometry) { sensor.Draw(UltiDraw.Cyan.Transparent(0.75f)); } if (Target.DrawReferences) { sensor.DrawReferences(); } if (Target.DrawDistribution) { sensor.DrawDistribution(UltiDraw.Black, new UltiDraw.GUIRect(0.5f, 0.1f, 0.9f, 0.1f)); } } }