public void SetRemoveWhenFinished(bool value) { if (HasEngineInstance()) { EnginePGroup.SetRemoveWhenFinished(value); } }
public void Restart() { if (HasEngineInstance()) { EnginePGroup.Restart(); } }
public override void OnHotSpotDrag(HotSpotBase hotSpot, VisionViewBase view, float fDeltaX, float fDeltaY) { base.OnHotSpotDrag(hotSpot, view, fDeltaX, fDeltaY); if (hotSpot == _hotSpotWindSpeed) { // set on engine instance while dragging to see the effect if (HasEngineInstance()) { EnginePGroup.SetWindSpeed(_hotSpotWindSpeed.CurrentPosition, _bLocalSpaceWind); } } }
/// <summary> /// unlinks a target from a source. Either src or target has this shape as owner /// </summary> /// <param name="src">the link source</param> /// <param name="target">the link target</param> public override void OnUnlink(ShapeLink src, ShapeLink target) { base.OnUnlink(src, target); // perform the unlinking on the engine objects if (target.OwnerShape == this) { ConstraintShape constraint = src.OwnerShape as ConstraintShape; if (constraint != null && HasEngineInstance() && constraint.HasEngineInstance()) // at least the engine instance of the constraint can be null { EnginePGroup.RemoveConstraint(constraint._engineInstance as EngineInstanceConstraint); } } }
/// <summary> /// Perform the actual linking. Either src or target has this shape as owner /// </summary> /// <param name="src">the link source</param> /// <param name="target">the link target</param> public override void OnLink(ShapeLink src, ShapeLink target) { base.OnLink(src, target); // adds to collections if (HasEngineInstance()) { EnginePGroup.OnLinksChanged(); } // perform the linking on the engine objects if (target.OwnerShape == this) { ConstraintShape constraint = src.OwnerShape as ConstraintShape; if (constraint != null && HasEngineInstance() && constraint.HasEngineInstance()) // at least the engine instance of the constraint can be null { EnginePGroup.AddConstraint(constraint._engineInstance as EngineInstanceConstraint); } } }