Canguro.Model.LineElement.LineElement C# (CSharp) Method

LineElement() public method

Constructora que inicializa el LineElement con un clon de las propiedades indicadas y los nodos indicados. Si los nodos no están en la lista correspondiente, en la posición adecuada, se lanza una NullReferenceException Se recomienda usar esta constructora para minimizar el consumo de memoria en Model.Undo
public LineElement ( LineProps prototype, Joint i, Joint j ) : System
prototype LineProps
i Joint
j Joint
return System
        public LineElement(LineProps prototype, Joint i, Joint j)
        {
            props = (LineProps)prototype.Clone();
            joints = new Joint[2];
            angle = 0;
            dofI = new JointDOF(true);
            dofJ = new JointDOF(true);

            if (i == null || j == null || 
                Model.Instance.JointList[i.Id] != i || Model.Instance.JointList[j.Id] != j)
                throw new NullReferenceException(Culture.Get("EM0021"));
            I = i;
            J = j;
        }

Same methods

LineElement::LineElement ( LineElement src, Joint i, Joint j ) : System
LineElement::LineElement ( LineProps prototype ) : System