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

LineElement() public method

Al construir un LineElement se necesita un prototipo de Propiedades, que define el tipo de elemento que se forma. De esta manera, después de construir el elemento no se le puede cambiar el tipo, además de que se pueden crear varios elementos con las mismas propiedades. La constructora clona al prototipo, de manera que un objeto externo puede crear varios elementos con el mismo objeto de propiedades.
public LineElement ( LineProps prototype ) : System
prototype LineProps El prototipo de propiedades.
return System
        public LineElement(LineProps prototype)
        {
            props = (LineProps)prototype.Clone();
            joints = new Joint[2];
            angle = 0;
            dofI = new JointDOF(true);
            dofJ = new JointDOF(true);

            Joint j = Model.Instance.JointList[1];
            int i = 1;
            while (j == null && i < Model.Instance.JointList.Count)
                j = Model.Instance.JointList[i++];
            if (j != null)
            {
                I = j;
                J = j;
            }
            else
                throw new NullReferenceException(Culture.Get("EM0020"));
        }

Same methods

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