/// <summary> /// Explicit Constructor /// </summary> /// <param name="cPositionData">The 3D Position, Velocity, and Acceleration of the Magnet</param> /// <param name="eMode">The Mode that the Magnet should be in</param> /// <param name="eDistanceFunction">The Function to use to determine how much a Particle should be affected by /// the Magnet based on how far away from the Magnet it is</param> /// <param name="fMinDistance">The Min Distance that the Magnet should be able to affect Particles at. If the /// Particle is closer to the Magnet than this distance, the Magnet will not affect the Particle.</param> /// <param name="fMaxDistance">The Max Distance that the Magnet should be able to affect Particles at. If the /// Particle is further away from the Magnet tan this distance, the Manget will not affect the Particle.</param> /// <param name="fMaxForce">The Max Force that the Magnet is able to exert on a Particle</param> /// <param name="iType">The Type of Magnet this is. This may be used in conjunction with the "Other" Magnet /// Mode to distinguish which type of custom user effect the Magnet should have on the Particles.</param> public MagnetPoint(Position3D cPositionData, MagnetModes eMode, DistanceFunctions eDistanceFunction, float fMinDistance, float fMaxDistance, float fMaxForce, int iType) : base(eMode, eDistanceFunction, fMinDistance, fMaxDistance, fMaxForce, iType) { meMagnetType = MagnetTypes.PointMagnet; PositionData = cPositionData; }
/// <summary> /// Explicit Constructor /// </summary> /// <param name="sPosition">The 3D Position of the Magnet</param> /// <param name="eMode">The Mode that the Magnet should be in</param> /// <param name="eDistanceFunction">The Function to use to determine how much a Particle should be affected by /// the Magnet based on how far away from the Magnet it is</param> /// <param name="fMinDistance">The Min Distance that the Magnet should be able to affect Particles at. If the /// Particle is closer to the Magnet than this distance, the Magnet will not affect the Particle.</param> /// <param name="fMaxDistance">The Max Distance that the Magnet should be able to affect Particles at. If the /// Particle is further away from the Magnet tan this distance, the Manget will not affect the Particle.</param> /// <param name="fMaxForce">The Max Force that the Magnet is able to exert on a Particle</param> /// <param name="iType">The Type of Magnet this is. This may be used in conjunction with the "Other" Magnet /// Mode to distinguish which type of custom user effect the Magnet should have on the Particles.</param> public MagnetPoint(Vector3 sPosition, MagnetModes eMode, DistanceFunctions eDistanceFunction, float fMinDistance, float fMaxDistance, float fMaxForce, int iType) : base(eMode, eDistanceFunction, fMinDistance, fMaxDistance, fMaxForce, iType) { meMagnetType = MagnetTypes.PointMagnet; PositionData.Position = sPosition; }
/// <summary> /// Explicit Constructor /// </summary> /// <param name="sPositionOnPlane">A 3D Position on the Plane Magnet's Plane</param> /// <param name="sNormal">The Normal direction of the Plane (i.e. the up direction away from the plane)</param> /// <param name="eMode">The Mode that the Magnet should be in</param> /// <param name="eDistanceFunction">The Function to use to determine how much a Particle should be affected by /// the Magnet based on how far away from the Magnet it is</param> /// <param name="fMinDistance">The Min Distance that the Magnet should be able to affect Particles at. If the /// Particle is closer to the Magnet than this distance, the Magnet will not affect the Particle.</param> /// <param name="fMaxDistance">The Max Distance that the Magnet should be able to affect Particles at. If the /// Particle is further away from the Magnet than this distance, the Magnet will not affect the Particle.</param> /// <param name="fMaxForce">The Max Force that the Magnet is able to exert on a Particle</param> /// <param name="iType">The Type of Magnet this is. This may be used in conjunction with the "Other" Magnet /// Mode to distinguish which type of custom user effect the Magnet should have on the Particles.</param> public MagnetPlane(Vector3 sPositionOnPlane, Vector3 sNormal, MagnetModes eMode, DistanceFunctions eDistanceFunction, float fMinDistance, float fMaxDistance, float fMaxForce, int iType) : base(eMode, eDistanceFunction, fMinDistance, fMaxDistance, fMaxForce, iType) { meMagnetType = MagnetTypes.PlaneMagnet; PositionOnPlane = sPositionOnPlane; Normal = sNormal; }
/// <summary> /// Explicit Constructor /// </summary> /// <param name="sPositionOnLine">A 3D Position that the Line Magnet passes through</param> /// <param name="sDirection">The Direction that the Line points in</param> /// <param name="eMode">The Mode that the Magnet should be in</param> /// <param name="eDistanceFunction">The Function to use to determine how much a Particle should be affected by /// the Magnet based on how far away from the Magnet it is</param> /// <param name="fMinDistance">The Min Distance that the Magnet should be able to affect Particles at. If the /// Particle is closer to the Magnet than this distance, the Magnet will not affect the Particle.</param> /// <param name="fMaxDistance">The Max Distance that the Magnet should be able to affect Particles at. If the /// Particle is further away from the Magnet tan this distance, the Manget will not affect the Particle.</param> /// <param name="fMaxForce">The Max Force that the Magnet is able to exert on a Particle</param> /// <param name="iType">The Type of Magnet this is. This may be used in conjunction with the "Other" Magnet /// Mode to distinguish which type of custom user effect the Magnet should have on the Particles.</param> public MagnetLine(Vector3 sPositionOnLine, Vector3 sDirection, MagnetModes eMode, DistanceFunctions eDistanceFunction, float fMinDistance, float fMaxDistance, float fMaxForce, int iType) : base(eMode, eDistanceFunction, fMinDistance, fMaxDistance, fMaxForce, iType) { meMagnetType = MagnetTypes.LineMagnet; PositionOnLine = sPositionOnLine; Direction = sDirection; }
/// <summary> /// Copies the given Magnet's data into this Magnet's data /// </summary> /// <param name="cMagnetToCopy">The Magnet to copy from</param> public void CopyFrom(DefaultParticleSystemMagnet cMagnetToCopy) { Mode = cMagnetToCopy.Mode; DistanceFunction = cMagnetToCopy.DistanceFunction; meMagnetType = cMagnetToCopy.MagnetType; MinDistance = cMagnetToCopy.MinDistance; MaxDistance = cMagnetToCopy.MaxDistance; MaxForce = cMagnetToCopy.MaxForce; UserDefinedMagnetType = cMagnetToCopy.UserDefinedMagnetType; }
/// <summary> /// Explicit Constructor /// </summary> /// <param name="eMode">The Mode that the Magnet should be in</param> /// <param name="eDistanceFunction">The Function to use to determine how much a Particle should be affected by /// the Magnet based on how far away from the Magnet it is</param> /// <param name="fMinDistance">The Min Distance that the Magnet should be able to affect Particles at. If the /// Particle is closer to the Magnet than this distance, the Magnet will not affect the Particle.</param> /// <param name="fMaxDistance">The Max Distance that the Magnet should be able to affect Particles at. If the /// Particle is further away from the Magnet than this distance, the Magnet will not affect the Particle.</param> /// <param name="fMaxForce">The Max Force that the Magnet is able to exert on a Particle</param> /// <param name="iType">The Type of Magnet this is. This may be used in conjunction with the "Other" Magnet /// Mode to distinguish which type of custom user effect the Magnet should have on the Particles.</param> protected DefaultParticleSystemMagnet(MagnetModes eMode, DistanceFunctions eDistanceFunction, float fMinDistance, float fMaxDistance, float fMaxForce, int iType) { Mode = eMode; DistanceFunction = eDistanceFunction; MinDistance = fMinDistance; MaxDistance = fMaxDistance; MaxForce = fMaxForce; UserDefinedMagnetType = iType; }
/// <summary> /// Explicit Constructor /// </summary> /// <param name="sPositionOnPlane">A 3D Position on the Plane Magnet's Plane</param> /// <param name="sNormal">The Normal direction of the Plane (i.e. the up direction away from the plane)</param> /// <param name="eMode">The Mode that the Magnet should be in</param> /// <param name="eDistanceFunction">The Function to use to determine how much a Particle should be affected by /// the Magnet based on how far away from the Magnet it is</param> /// <param name="fMinDistance">The Min Distance that the Magnet should be able to affect Particles at. If the /// Particle is closer to the Magnet than this distance, the Magnet will not affect the Particle.</param> /// <param name="fMaxDistance">The Max Distance that the Magnet should be able to affect Particles at. If the /// Particle is further away from the Magnet tan this distance, the Manget will not affect the Particle.</param> /// <param name="fMaxForce">The Max Force that the Magnet is able to exert on a Particle</param> /// <param name="iType">The Type of Magnet this is. This may be used in conjunction with the "Other" Magnet /// Mode to distinguish which type of custom user effect the Magnet should have on the Particles.</param> public MagnetPlane(Vector3 sPositionOnPlane, Vector3 sNormal, MagnetModes eMode, DistanceFunctions eDistanceFunction, float fMinDistance, float fMaxDistance, float fMaxForce, int iType) : base(eMode, eDistanceFunction, fMinDistance, fMaxDistance, fMaxForce, iType) { meMagnetType = MagnetTypes.PlaneMagnet; PositionOnPlane = sPositionOnPlane; Normal = sNormal; }
/// <summary> /// Explicit Constructor /// </summary> /// <param name="sEndPoint1Position">The 3D position of the first End Point of the Line Segment Magnet</param> /// <param name="sEndPoint2Position">The 3D position of the second End Point of the Line Segment Magnet</param> /// <param name="eMode">The Mode that the Magnet should be in</param> /// <param name="eDistanceFunction">The Function to use to determine how much a Particle should be affected by /// the Magnet based on how far away from the Magnet it is</param> /// <param name="fMinDistance">The Min Distance that the Magnet should be able to affect Particles at. If the /// Particle is closer to the Magnet than this distance, the Magnet will not affect the Particle.</param> /// <param name="fMaxDistance">The Max Distance that the Magnet should be able to affect Particles at. If the /// Particle is further away from the Magnet tan this distance, the Manget will not affect the Particle.</param> /// <param name="fMaxForce">The Max Force that the Magnet is able to exert on a Particle</param> /// <param name="iType">The Type of Magnet this is. This may be used in conjunction with the "Other" Magnet /// Mode to distinguish which type of custom user effect the Magnet should have on the Particles.</param> public MagnetLineSegment(Vector3 sEndPoint1Position, Vector3 sEndPoint2Position, MagnetModes eMode, DistanceFunctions eDistanceFunction, float fMinDistance, float fMaxDistance, float fMaxForce, int iType) : base(eMode, eDistanceFunction, fMinDistance, fMaxDistance, fMaxForce, iType) { meMagnetType = MagnetTypes.LineSegmentMagnet; EndPoint1 = sEndPoint1Position; EndPoint2 = sEndPoint2Position; }
/// <summary> /// Explicit Constructor /// </summary> /// <param name="eMode">The Mode that the Magnet should be in</param> /// <param name="eDistanceFunction">The Function to use to determine how much a Particle should be affected by /// the Magnet based on how far away from the Magnet it is</param> /// <param name="fMinDistance">The Min Distance that the Magnet should be able to affect Particles at. If the /// Particle is closer to the Magnet than this distance, the Magnet will not affect the Particle.</param> /// <param name="fMaxDistance">The Max Distance that the Magnet should be able to affect Particles at. If the /// Particle is further away from the Magnet tan this distance, the Manget will not affect the Particle.</param> /// <param name="fMaxForce">The Max Force that the Magnet is able to exert on a Particle</param> /// <param name="iType">The Type of Magnet this is. This may be used in conjunction with the "Other" Magnet /// Mode to distinguish which type of custom user effect the Magnet should have on the Particles.</param> public DefaultParticleSystemMagnet(MagnetModes eMode, DistanceFunctions eDistanceFunction, float fMinDistance, float fMaxDistance, float fMaxForce, int iType) { Mode = eMode; DistanceFunction = eDistanceFunction; MinDistance = fMinDistance; MaxDistance = fMaxDistance; MaxForce = fMaxForce; UserDefinedMagnetType = iType; }
/// <summary> /// Explicit Constructor /// </summary> /// <param name="sEndPoint1Position">The 3D position of the first End Point of the Line Segment Magnet</param> /// <param name="sEndPoint2Position">The 3D position of the second End Point of the Line Segment Magnet</param> /// <param name="eMode">The Mode that the Magnet should be in</param> /// <param name="eDistanceFunction">The Function to use to determine how much a Particle should be affected by /// the Magnet based on how far away from the Magnet it is</param> /// <param name="fMinDistance">The Min Distance that the Magnet should be able to affect Particles at. If the /// Particle is closer to the Magnet than this distance, the Magnet will not affect the Particle.</param> /// <param name="fMaxDistance">The Max Distance that the Magnet should be able to affect Particles at. If the /// Particle is further away from the Magnet than this distance, the Magnet will not affect the Particle.</param> /// <param name="fMaxForce">The Max Force that the Magnet is able to exert on a Particle</param> /// <param name="iType">The Type of Magnet this is. This may be used in conjunction with the "Other" Magnet /// Mode to distinguish which type of custom user effect the Magnet should have on the Particles.</param> public MagnetLineSegment(Vector3 sEndPoint1Position, Vector3 sEndPoint2Position, MagnetModes eMode, DistanceFunctions eDistanceFunction, float fMinDistance, float fMaxDistance, float fMaxForce, int iType) : base(eMode, eDistanceFunction, fMinDistance, fMaxDistance, fMaxForce, iType) { meMagnetType = MagnetTypes.LineSegmentMagnet; EndPoint1 = sEndPoint1Position; EndPoint2 = sEndPoint2Position; }