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

AreaElement() public method

Constructora que inicializa el AreaElement 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 AreaElement ( AreaProps prototype, Joint j1, Joint j2, Joint j3, Joint j4 ) : System
prototype AreaProps Prototype properties to copy from
j1 Joint
j2 Joint
j3 Joint
j4 Joint
return System
        public AreaElement(AreaProps prototype, Joint j1, Joint j2, Joint j3, Joint j4)
        {
            props = (AreaProps)prototype.Clone();
            joints = new Joint[4];
            angle = 0;
            mass = 0;
            materialTemperature = 0;
            offsets = new float[4];
            //springs = new ManagedList<AreaSprings>();

            if (j1 == null || j2 == null || j3 == null)
                throw new NullReferenceException(Culture.Get("EM0021"));

            J1 = j1;
            J2 = j2;
            J3 = j3;
            J4 = j4;
        }

Same methods

AreaElement::AreaElement ( AreaElement src, Joint j1, Joint j2, Joint j3, Joint j4 ) : System
AreaElement::AreaElement ( AreaProps prototype ) : System