예제 #1
0
 public EvaluateBBoxLinksVisitor(VisibilityObjectShape visShape, bool bTouching)
 {
     _visShape  = visShape;
     _srcLink   = (LinkSource)_visShape.GetVisibilityLinkSource();
     _bTouching = bTouching;
     visBBox    = _visShape.AbsoluteBoundingBox;
 }
        public override ShapeBase CreateShapeInstance()
        {
            VisibilityObjectShape box = new VisibilityObjectShape("Visibility object");

            box.Position = EditorManager.Scene.CurrentShapeSpawnPosition;
            return(box);
        }
예제 #3
0
        /// <summary>
        /// This function must be overridden, since we have to reset the hotspots
        /// </summary>
        /// <returns></returns>
        public override ShapeBase Clone()
        {
            VisibilityObjectShape copy = (VisibilityObjectShape)base.Clone();

            System.Diagnostics.Debug.Assert(!copy.Selected); // turned off in ShapeBase

            copy._hotSpotSizeX = null;
            copy._hotSpotSizeY = null;
            copy._hotSpotSizeZ = null;

            return(copy);
        }
예제 #4
0
 /// <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)
     {
         VisibilityObjectShape visobjShape = src.OwnerShape as VisibilityObjectShape;
         if (visobjShape != null && visobjShape._engineInstance != null) // at least the engine instance of the constraint can be null
         {
             EngineMirror.RemoveVisibilityObject(visobjShape._engineInstance as EngineInstanceVisibilityObject);
         }
     }
 }
 public override ShapeBase CreateShapeInstance()
 {
   VisibilityObjectShape box = new VisibilityObjectShape("Visibility object");
   box.Position = EditorManager.Scene.CurrentShapeSpawnPosition;
   return box;
 }
 public EvaluateBBoxLinksVisitor(VisibilityObjectShape visShape, bool bTouching)
 {
   _visShape = visShape;
   _srcLink = (LinkSource)_visShape.GetVisibilityLinkSource();
   _bTouching = bTouching;
   visBBox = _visShape.AbsoluteBoundingBox;
 }