示例#1
0
 /// <summary>
 /// Adds an OpenGl object to the scene
 /// </summary>
 /// <param name="objectToAdd"></param>
 public static void AddObjectToDrawList(OpenGlObject objectToAdd)
 {
     m_objectsToDraw.Add(objectToAdd);
 }
示例#2
0
 /// <summary>
 /// Adds an OpenGl object to the scene
 /// </summary>
 /// <param name="objectToAdd"></param>
 public static void AddObjectToDrawList(OpenGlObject objectToAdd)
 {
     _remoteDrawingList.Add(objectToAdd);
 }
 /// <summary>
 /// Replaces an object at a specified index with a new one.
 /// </summary>
 /// <param name="index"></param>
 /// <param name="newObject"></param>
 public void ReplaceAt(int index, OpenGlObject newObject)
 {
     m_objectsToDraw[index] = newObject;
 }
        /// <summary>
        /// Updates the UI controls with a selected object's properties
        /// </summary>
        /// <param name="currentObject"></param>
        private void PopulateUIWithObjectProperties(OpenGlObject currentObject)
        {
            //populate controls with current object properties
            numericUpDownObjectWidth.Value = Convert.ToDecimal(currentObject.Length);
            numericUpDownObjectDepth.Value = Convert.ToDecimal(Math.Abs(currentObject.Depth)); //TODO: Check why OpenGLObject.Depth return +ve and -ve values for different objects.
            numericUpDownDistanceFromGround.Value = Convert.ToDecimal(currentObject.Y);
            numericUpDownObjectHeight.Value = Convert.ToDecimal(currentObject.Height);
            txtBxLeftRightPosition.Text = Convert.ToString(currentObject.X);

        }
 /// <summary>
 /// Adds an OpenGl object to the drawing list.
 /// </summary>
 /// <param name="objectToAdd"></param>
 public void Add(OpenGlObject objectToAdd)
 {
     m_objectsToDraw.Add(objectToAdd);
 }