protected override IVLink MakeLink(UUID from, UUID to, Parameters parameters, float weight, bool bidirectional) { Logger.Debug("Creating link between '" + GetNode(from).Name + "' and '" + GetNode(to).Name + "'."); VLink link = new VLink(_factory, GetNode(from), GetNode(to), weight, parameters, bidirectional); Logger.Info("Created '" + link.Name + "'."); return(link); }
private void Configure() { float distance = _link.Length; float movesPerUnit = DefaultMovesPerUnit; if (!_link.Weight.Equals(distance)) { float movesPerUnitRange = MaxMovesPerUnit - MinMovesPerUnit; float weightAdjustedMovesPerUnit = movesPerUnitRange * _link.Weight; movesPerUnit = MinMovesPerUnit + weightAdjustedMovesPerUnit; } _numSteps = (int)(distance * movesPerUnit); _shiftPerStep = Vector3.Divide(Vector3.Subtract(_to.Pos, _from.Pos), _numSteps); Prim.Rotation = VLink.GetRotatation(_from, _to); Prim.Scale = GetScale(_link); }