Ejemplo n.º 1
0
        private void CreatePlaneProperties(object plane, bool externallySet)
        {
            if (propertyGrid.InvokeRequired)
            {
                var d = new ThreadSafePropertyGrid(CreatePlaneProperties);
                propertyGrid.Invoke(d, new object[] { plane });
            }
            else
            {
                if (plane != null)
                {
                    PlaneProperties planeProperties = new PlaneProperties();

                    var planeNode = (StaticModel)plane;
                    planeProperties.PulsarApplication = _mainApplication;
                    planeProperties.Scene             = _scene;
                    planeProperties.Node     = planeNode.Node;
                    planeProperties.Name     = planeNode.Node.Name;
                    planeProperties.Enabled  = planeNode.Enabled;
                    planeProperties.Position = planeNode.Node.Position;
                    planeProperties.Rotation = planeNode.Node.Rotation;
                    planeProperties.Scale    = planeNode.Node.Scale;

                    planeProperties.AnimationEnabled = planeNode.AnimationEnabled;
                    planeProperties.CastShadows      = planeNode.CastShadows;
                    planeProperties.DrawDistance     = planeNode.DrawDistance;
                    planeProperties.LightMask        = planeNode.LightMask;
                    planeProperties.LodBias          = planeNode.LodBias;
                    planeProperties.MaxLights        = planeNode.MaxLights;
                    planeProperties.Occludee         = planeNode.Occludee;
                    planeProperties.Occluder         = planeNode.Occluder;
                    planeProperties.ShadowDistance   = planeNode.ShadowDistance;
                    planeProperties.ShadowMask       = planeNode.ShadowMask;
                    planeProperties.SortValue        = planeNode.SortValue;
                    planeProperties.ViewMask         = planeNode.ViewMask;
                    planeProperties.ZoneMask         = planeNode.ZoneMask;
                    planeProperties.BlockEvents      = planeNode.BlockEvents;

                    propertyGrid.SelectedObject = planeProperties;
                    _currentPropertyNode        = planeProperties;
                }
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds an area section to the application.
 /// </summary>
 /// <param name="uniqueName">Name of the unique area.</param>
 /// <param name="properties">The properties.</param>
 /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
 /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception>
 public bool AddPlane(string uniqueName, PlaneProperties properties)
 {
     return(add(uniqueName, properties, Plane.Add));
 }