RelativisticParticle class
The RelativisticParticle
class represents a particle that is influenced by relativistic effects
within a particle system.
This class extends AnimatedParticle
and adds properties that allow for the simulation of
physical attributes such as angle, density, friction, restitution, and velocity. Additionally,
it incorporates a RelativisticPathTransformation
that dictates how the particle's position
is transformed over time based on relativistic principles.
- Inheritance
-
- Object
- AnimatedParticle
- RelativisticParticle
Constructors
-
RelativisticParticle({required double angle, required Density density, required Friction friction, required RelativisticPathTransformation pathTransformation, required Restitution restitution, required Velocity velocity, required bool onlyInteractWithEdges, required Duration animationDuration, required Duration elapsedTimeOnStart, required Curve fadeInCurve, required double fadeInThreshold, required Curve fadeOutCurve, required double fadeOutThreshold, required bool foreground, required Particle particle, required Curve scaleCurve, required Tween<
double> scaleRange, required Trail trail}) -
Creates a
RelativisticParticle
with the specified properties.
Properties
- angle → double
-
The initial angle of the particle, expressed in degrees.
final
- animationDuration → Duration
-
The duration of the animation for this particle.
finalinherited
- density → Density
-
The density of the particle, which influences its mass and how it interacts with forces within the system.
final
- elapsedTimeOnStart → Duration
-
The total elapsed time when the particle was emitted.
finalinherited
- fadeInCurve → Curve
-
The curve used to control the fade-in animation progress.
finalinherited
- fadeInThreshold → double
-
The progress threshold at which the particle starts to fade in during the animation.
finalinherited
- fadeOutCurve → Curve
-
The curve used to control the fade-out animation progress.
finalinherited
- fadeOutThreshold → double
-
The progress threshold at which the particle starts to fade out during the animation.
finalinherited
- foreground → bool
-
Should this particle be displayed in the foreground layer?
finalinherited
- friction → Friction
-
The friction coefficient applied to the particle, affecting its resistance to motion.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- onlyInteractWithEdges → bool
-
Determines whether the particle should only interact with the edges of the container.
final
- particle → Particle
-
The Particle associated with this animated particle.
finalinherited
- pathTransformation → RelativisticPathTransformation
-
The transformation that dictates how the particle's position changes over time, based on relativistic effects.
final
- restitution → Restitution
-
The restitution or bounciness of the particle, determining how it reacts upon collision.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scaleCurve → Curve
-
The curve used to control the scaling animation progress.
finalinherited
-
scaleRange
→ Tween<
double> -
The range of scaling applied to the particle during the animation.
finalinherited
- trail → Trail
-
The trail effect associated with the particle.
finalinherited
- velocity → Velocity
-
The velocity of the particle, defining its speed and direction.
final
Methods
-
drawExtra(
Canvas canvas) → void -
Draws additional shapes or effects, such as trails, associated with the particle.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onAnimationUpdate(
Duration totalElapsed) → void -
Updates the particle's animation based on the total elapsed time.
override
-
onParticleCreated(
) → void -
Called when the particle is created, allowing for any initialization.
inherited
-
onSurfaceSizeChanged(
Size oldSize, Size newSize) → void -
Called when the surface size changes to adjust the particle's position if needed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited