 |
Gorgon Game Engine
|
Go to the documentation of this file.
9 namespace Gorgon {
namespace Geometry {
16 template<
class P_ = Po
intf>
148 throw std::out_of_range(
"List is empty");
155 const P_ &
Get(
long index)
const {
157 throw std::out_of_range(
"List is empty");
167 throw std::out_of_range(
"List is empty");
178 template<
class ...T_>
180 Points.emplace_back(std::forward<T_>(params)...);
195 for(
const auto &p : *
this) {
211 for(
auto &p : *
this) {
227 for(
const auto &p : *
this) {
243 for(
auto &p : *
this) {
257 for(
const auto &p : *
this) {
269 for(
auto &p : *
this) {
281 for(
const auto &p : *
this) {
293 for(
auto &p : *
this) {
305 for(
const auto &p : *
this) {
317 for(
auto &p : *
this) {
329 for(
const auto &p : *
this) {
341 for(
auto &p : *
this) {
PointList operator+(const PointList &right) const
Adds the coordinates of the points on the right list to the left.
Definition: PointList.h:191
auto end() const
End iterator to underlying points vector.
Definition: PointList.h:90
PointList operator*(const O_ &right) const
Adds a point to each element of the list.
Definition: PointList.h:302
PointList & operator+=(const PointList &right)
Adds the coordinates of the points on the right list to the left.
Definition: PointList.h:207
P_ & Front()
Accesses the first element in the list.
Definition: PointList.h:125
PointList operator-(const PointList &right) const
Subtracts the coordinates of the points on the right list to the left.
Definition: PointList.h:223
Line< P_ > GetLine(long index) const
Returns the line at the given index.
Definition: PointList.h:165
auto rbegin()
Begin iterator to underlying points vector.
Definition: PointList.h:95
std::vector< P_ > Points
Stored points. You may directly use this class as if it is a point vector.
Definition: PointList.h:356
const P_ & Front() const
Accesses the first element in the list.
Definition: PointList.h:135
void Pop()
Removes the last point from the list.
Definition: PointList.h:184
void Push(P_ point)
Adds a new point to the end of the point list.
Definition: PointList.h:173
void Destroy()
Destroys the storage used by this list.
Definition: PointList.h:56
PointList & operator*=(const O_ &right)
Adds a point to each element of the list.
Definition: PointList.h:314
This class represents a set of points.
Definition: Line.h:16
PointList(const PointList &)=delete
Due to relatively high cost, copying is disabled. Use Duplicate instead.
auto rend() const
End iterator to underlying points vector.
Definition: PointList.h:110
PointList & operator=(const PointList &)=delete
Due to relatively high cost, copying is disabled. Use Duplicate instead.
PointList & operator/=(const O_ &right)
Subtracts a point to each element of the list.
Definition: PointList.h:338
PointList operator/(const O_ &right) const
Subtracts a point to each element of the list.
Definition: PointList.h:326
PointList(std::vector< P_ > points)
Implicit vector to PointList casting. You may move in the data using std::move.
Definition: PointList.h:24
auto rend()
End iterator to underlying points vector.
Definition: PointList.h:100
bool operator>=(PointList< P_ > &left, const PointList< P_ > &right)
Comparison: this operation is expensive: O(n).
Definition: PointList.h:379
void swap(PointList< P_ > &left, PointList< P_ > &right)
Definition: PointList.h:396
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
PointList(PointList &&other)
Move constructor.
Definition: PointList.h:33
P_ & operator[](std::size_t index)
Accesses the elements in the list.
Definition: PointList.h:115
void Clear()
Clears the elements in this list.
Definition: PointList.h:65
const P_ & Back() const
Accesses the last element in the list.
Definition: PointList.h:140
auto GetSize() const
Returns the number of elements in the list.
Definition: PointList.h:70
bool operator!=(PointList< P_ > &left, const PointList< P_ > &right)
Comparison: this operation is expensive: O(n).
Definition: PointList.h:391
const P_ & Get(long index) const
Returns the element at the given index.
Definition: PointList.h:155
auto begin() const
Begin iterator to underlying points vector.
Definition: PointList.h:85
bool operator==(PointList< P_ > &left, const PointList< P_ > &right)
Comparison: this operation is expensive: O(n).
Definition: PointList.h:385
PointList()=default
Empty constructor.
P_ & Back()
Accesses the last element in the list.
Definition: PointList.h:130
PointList(std::initializer_list< P_ > points)
Initializer list.
Definition: PointList.h:27
void Push(T_ &&... params)
Adds a new point to the end of the point list.
Definition: PointList.h:179
void Swap(PointList< P_ > &right)
Swaps two lists, mainly for move operations.
Definition: PointList.h:349
PointList Duplicate() const
Duplicates this PointList.
Definition: PointList.h:38
auto rbegin() const
Begin iterator to underlying points vector.
Definition: PointList.h:105
P_ & Get(long index)
Returns the element at the given index.
Definition: PointList.h:146
auto end()
End iterator to underlying points vector.
Definition: PointList.h:80
T_ PositiveMod(T_ value, T_ mod)
Definition: Types.h:131
bool operator<=(PointList< P_ > &left, const PointList< P_ > &right)
Comparison: this operation is expensive: O(n).
Definition: PointList.h:373
auto begin()
Begin iterator to underlying points vector.
Definition: PointList.h:75
bool operator>(PointList< P_ > &left, const PointList< P_ > &right)
Comparison: this operation is expensive: O(n).
Definition: PointList.h:367
PointList & operator-=(const PointList &right)
Subtracts the coordinates of the points on the right list to the left.
Definition: PointList.h:239
This class represents a set of points.
Definition: PointList.h:17
bool operator<(PointList< P_ > &left, const PointList< P_ > &right)
Comparison: this operation is expensive: O(n).
Definition: PointList.h:361