예제 #1
0
파일: Substance.cs 프로젝트: sjvannTMU/Sage
 /// <summary>
 /// Initializes a new instance of the <see cref="Substance"/> class.
 /// </summary>
 /// <param name="type">The MaterialType of the substance.</param>
 /// <param name="mass">The mass of substance to be created.</param>
 /// <param name="tempInCelsius">The temperature of the substance in celsius.</param>
 /// <param name="state">The material state of the substance.</param>
 public Substance(MaterialType type, double mass, double tempInCelsius, MaterialState state = MaterialState.Unknown)
 {
     if (mass > float.MaxValue)
     {
         mass = float.MaxValue;
     }
     m_ssh       = new MementoHelper(this, true);
     m_type      = type;
     m_mass      = mass;
     Temperature = tempInCelsius;
     State       = state;
 }
예제 #2
0
파일: Substance.cs 프로젝트: sjvannTMU/Sage
 /// <summary>
 /// Initializes a new instance of the <see cref="Substance"/> class.
 /// </summary>
 public Substance()
 {
     m_ssh = new MementoHelper(this, true);
 }