public PipeModelInfo(Knot knot, NodeMap nodeMap, Edge edge, Vector3 offset) : base("pipe1") { Knot = knot; NodeMap = nodeMap; Edge = edge; Node node1 = nodeMap.FromNode (edge); Node node2 = nodeMap.ToNode (edge); PositionFrom = node1.ToVector () + offset; PositionTo = node2.ToVector () + offset; Position = node1.CenterBetween (node2) + offset; Direction = PositionTo - PositionFrom; Direction.Normalize (); Scale = Vector3.One * 10f; // a pipe is movable IsMovable = true; }