79 void clear() noexcept;
89 bool empty() const noexcept;
94 std::
size_t width() const noexcept;
98 std::
size_t height() const noexcept;
102 std::
size_t size() const noexcept;
107 float dx() const noexcept;
111 float dy() const noexcept;
119 Value operator()(std::
size_t x, std::
size_t y) const noexcept;
125 Value at(std::
size_t x, std::
size_t y) const;
133 void set(std::
size_t x, std::
size_t y,
Value value) noexcept;
140 void setAt(std::
size_t x, std::
size_t y,
Value value);
175 std::uint64_t
revision() const noexcept;
272 float slitSeparation,
334 float phaseDegrees = 0.0f);
376 float straightLength,
386 std::
size_t index(std::
size_t x, std::
size_t y) const noexcept;
392 std::
size_t checkedIndex(std::
size_t x, std::
size_t y) const;
396 void touch() noexcept;
Owning Cartesian grid of complex scalar samples.
Implements the Potential Field2D component.
Value at(std::size_t x, std::size_t y) const
Performs at.
void addHarmonic(float centerX, float centerY, Value offset, float curvatureX, float curvatureY)
Adds harmonic.
std::size_t height() const noexcept
Returns height.
void addLinear(float centerX, float centerY, Value offset, float slopeX, float slopeY)
Adds linear.
void clear() noexcept
Performs clear.
void fill(Value value) noexcept
Performs fill.
std::uint64_t revision() const noexcept
Performs revision.
void resize(std::size_t width, std::size_t height, float dx=1.0f, float dy=1.0f)
Performs resize.
void addPolygon(const std::vector< PotentialPoint2D > &vertices, Value value)
Adds polygon.
void addRectangle(float centerX, float centerY, float width, float height, Value value)
Adds rectangle.
double xCoordinate(std::size_t x) const noexcept
Performs x coordinate.
std::size_t checkedIndex(std::size_t x, std::size_t y) const
Checks ed index.
Value minimum() const noexcept
Performs minimum.
std::size_t size() const noexcept
Returns size.
float dy() const noexcept
Performs dy.
void touch() noexcept
Performs touch.
bool matchesGrid(const ComplexField2D &field) const noexcept
Performs matches grid.
const Value * data() const noexcept
Performs data.
void setAt(std::size_t x, std::size_t y, Value value)
Sets at.
void addCircle(float centerX, float centerY, float radius, Value value)
Adds circle.
bool empty() const noexcept
Performs empty.
std::size_t index(std::size_t x, std::size_t y) const noexcept
Returns index.
void addGaussian(float centerX, float centerY, float sigmaX, float sigmaY, Value amplitude)
Adds gaussian.
std::size_t width() const noexcept
Returns width.
std::vector< Value > data_
void addStandingWaveX(float period, Value depth, float phaseDegrees=0.0f)
Adds standing wave x.
double yCoordinate(std::size_t y) const noexcept
Performs y coordinate.
float dx() const noexcept
Performs dx.
PotentialField2D()=default
Performs potential field2 d.
void addQuadrupole(float centerX, float centerY, Value q1, Value q2)
Adds quadrupole.
void addBarrier(float x1, float y1, float x2, float y2, float thickness, Value value)
Adds barrier.
void set(std::size_t x, std::size_t y, Value value) noexcept
Performs set.
void addStadiumExterior(float centerX, float centerY, float straightLength, float radius, Value value)
Adds stadium exterior.
void addSoftenedRadial(float centerX, float centerY, Value coupling, float softening)
Adds softened radial.
void accumulate(const PotentialField2D &other, Value scale=1.0f)
Performs accumulate.
void addDoubleSlit(float centerX, float barrierWidth, float slitCenterY, float slitSeparation, float slitHeight, Value value)
Adds double slit.
Value maximum() const noexcept
Performs maximum.
void addSingleSlit(float centerX, float barrierWidth, float slitCenterY, float slitHeight, Value value)
Adds single slit.
Data structure used by the Potential Point2D component.