Ejemplo n.º 1
0
 /// <summary>
 /// Constructor. The graphics device must be sent along, as it is needed to create new vertex buffers.
 /// The particle cloud system is also required, since the leaves are represented as a particle cloud.
 /// </summary>
 /// <param name="device">The graphics device.</param>
 /// <param name="cloudSystem">The particle cloud system. One system can be shared among many tree generators.</param>
 public TreeGenerator(GraphicsDevice device, ParticleCloudSystem cloudSystem, Effect trunk)
 {
     graphicsDevice   = device;
     this.cloudSystem = cloudSystem;
     //trunkEffect = new BasicEffect(device, new EffectPool());
     // Load the tree effect.
     trunkEffect = trunk;
 }
Ejemplo n.º 2
0
        } //? sortedTechnique : unsortedTechnique
        #endregion

        /// <summary>
        /// Creates an empty particle cloud.
        /// </summary>
        /// <param name="system">The particle cloud system used to draw the particles. You only need one system for all your clouds.</param>
        public ParticleCloud(ParticleCloudSystem system)
        {
            Debug.Assert(system != null, "A null ParticleCloudSystem was passed to a ParticleCloud. It must be non-null.");
            this.system = system;
        }