Verlet Intergration Soft Body
Loading...
Searching...
No Matches
PhysicsCSAlevlProject.OscillatingParticle(Vector2 position, float mass, bool isPinned, Color color, float amplitude, float frequency, float angle) Class Reference

the OscillatingParticle class extends DrawableParticle to include oscillation parameters such as amplitude, frequency, and angle, allowing it to move in a sinusoidal pattern around an anchor position. The UpdateOscillation method updates the particle's position based on the oscillation parameters and the elapsed time, creating a dynamic movement effect. The SetAnchorPosition method allows changing the anchor point around which the particle oscillates, providing flexibility in how the particle behaves within the simulation. More...

Inheritance diagram for PhysicsCSAlevlProject.OscillatingParticle:

Public Member Functions

void UpdateOscillation (float deltaTime)
void SetAnchorPosition (Vector2 newAnchor)

Public Attributes

float OscillationAmplitude = amplitude
 the amplitude of the oscillation,
float OscillationFrequency = frequency
 the frequency of the oscillation, which determines how fast the particle oscillates around its anchor position.
float OscillationAngle = angle
Vector2 anchorPosition = position

Private Attributes

float _oscillationTime = 0f

Detailed Description

the OscillatingParticle class extends DrawableParticle to include oscillation parameters such as amplitude, frequency, and angle, allowing it to move in a sinusoidal pattern around an anchor position. The UpdateOscillation method updates the particle's position based on the oscillation parameters and the elapsed time, creating a dynamic movement effect. The SetAnchorPosition method allows changing the anchor point around which the particle oscillates, providing flexibility in how the particle behaves within the simulation.

Parameters
position
mass
isPinned
color
amplitude
frequency
angle

The documentation for this class was generated from the following file:
  • PhysicsCSAlevlProject/Objects.Particles.cs