예제 #1
0
 /// <summary>
 /// Constructor takes the prefab to construct the visual out of, and a FrameVisual
 /// to creat the visual attached to.
 /// </summary>
 /// <param name="prefab">Prefab to create the visual out of.</param>
 /// <param name="spongyWorldVisual">Parent of created visuals.</param>
 public SpongyVisualCreator(SpongyAnchorVisual prefab, FrameVisual spongyWorldVisual)
 {
     Prefab_SpongyAnchorVisual = prefab;
     this.spongyWorldVisual    = spongyWorldVisual;
 }
예제 #2
0
            /// <summary>
            /// Create a visible line connecting the frozen anchor to the spongy anchor.
            /// </summary>
            /// <param name="id">The anchor id of the frozen and spongy anchors.</param>
            /// <param name="frozen">The frozen anchor.</param>
            /// <param name="spongy">The spongy anchor.</param>
            /// <returns></returns>
            public IdPair <AnchorId, ConnectingLine> CreateDisplacement(AnchorId id, FrozenAnchorVisual frozen, SpongyAnchorVisual spongy)
            {
                var newLine = ConnectingLine.Create(spongy.transform.parent,
                                                    frozen.transform,
                                                    spongy.transform,
                                                    0.01f, Color.red);

                return(new IdPair <AnchorId, ConnectingLine>()
                {
                    id = id,
                    target = newLine
                });
            }
 /// <summary>
 /// Constructor takes the prefab to construct the visual out of, and a FrameVisual
 /// to creat the visual attached to.
 /// </summary>
 /// <param name="prefab">Prefab to create the visual out of.</param>
 /// <param name="spongyWorldVisual">Parent of created visuals.</param>
 public SpongyVisualCreator(SpongyAnchorVisual prefab, FrameVisual spongyWorldVisual, float verticalDisplacement)
 {
     Prefab_SpongyAnchorVisual = prefab;
     this.spongyWorldVisual    = spongyWorldVisual;
     this.verticalDisplacement = verticalDisplacement;
 }