#region CPL License
/*
Nuclex Framework
Copyright (C) 2002-2009 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as
published by the IBM Corporation; either version 1.0 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
IBM Common Public License for more details.
You should have received a copy of the IBM Common Public
License along with this library
*/
#endregion
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
namespace Nuclex.Graphics.SpecialEffects.Particles {
/// Mass-modifies properties of particles
/// Data type of the particles
///
///
/// This interface provides some common operations typically applied to large
/// numbers of particles at once. Therefore, most methods in this interface
/// operate on batches to increase efficiency and avoid thousands of needless
/// virtual method calls.
///
///
/// If the exact operation you need isn't in here, either do it using
/// the lower granularity IParticleAccessor for the price of losing some
/// performance or write a specialized affector for you particle type.
///
///
public interface IParticleModifier : IParticleAccessor {
/// Adds each particle's velocity to its current position
/// Particles that will be modified
/// Index of the first particle that will be modified
/// Number of particles that will be modified
void AddVelocityToPosition(
ParticleType[] particles, int start, int count
);
/// Adds each particle's velocity to its current position scaled
/// Particles that will be modified
/// Index of the first particle that will be modified
/// Number of particles that will be modified
/// Scale by which to multiply the particle velocity
void AddScaledVelocityToPosition(
ParticleType[] particles, int start, int count, float scale
);
/// Adds a fixed amount to each particle's velocity
/// Particles that will be modified
/// Index of the first particle that will be modified
/// Number of particles that will be modified
///
/// Velocity adjustment that will be added to each particle's velocity
///
void AddToVelocity(
ParticleType[] particles, int start, int count, ref Vector3 velocityAdjustment
);
}
} // namespace Nuclex.Graphics.SpecialEffects.Particles