#include <Math.hpp>
Metody publiczne | |
| LINE2D () | |
| LINE2D (float a, float b, float c) | |
| LINE2D (const VEC2 &Normal, float c) | |
| LINE2D (const float *Arr) | |
| operator float * () | |
| operator const float * () const | |
| VEC2 & | GetNormal () |
| const VEC2 & | GetNormal () const |
| bool | operator== (const LINE2D &L) const |
| bool | operator!= (const LINE2D &L) const |
| LINE2D | operator+ () const |
| LINE2D | operator- () const |
| Zwraca prostą zwróconą w przeciwną stronę. | |
| LINE2D | operator* (float s) const |
| LINE2D | operator/ (float s) const |
| LINE2D & | operator*= (float s) |
| LINE2D & | operator/= (float s) |
| void | GetTangent (VEC2 *Out) |
| Zwraca wektor wskazujący w kierunku prostej. | |
| void | GetMemberPoint (VEC2 *Out) |
| Zwraca jakiś punkt leżący na tej prostej. | |
| void | RecalculateD (const VEC2 &p) |
| Zmienia odległość od początku układu współrzędnych. | |
Atrybuty publiczne | |
| float | a |
| float | b |
| float | c |
Reprezentuje prostą w przestrzeni 2D z jedną stroną dodatnią, a drugą ujemną. Opisana jest równaniem A x + B y + C = 0. Wektor [A,B] to wektor normalny wskazujący w kierunku dodatniej półpłaszczyzny. Jeśli prosta jest znormalizowana, wektor normalny jest znormalizowany, a C to odległość prostej od środka układu współrzędnych. Reprezentacja jako string to A,B,C, np. "2,0,2.1" Prosta mająca a = b = 0 (czyli np. stała ZERO) jest niepoprawna, zdegenerowana.
| common::LINE2D::LINE2D | ( | ) | [inline] |
| common::LINE2D::LINE2D | ( | float | a, | |
| float | b, | |||
| float | c | |||
| ) | [inline] |
| common::LINE2D::LINE2D | ( | const VEC2 & | Normal, | |
| float | c | |||
| ) | [inline] |
| common::LINE2D::LINE2D | ( | const float * | Arr | ) | [inline] |
| common::LINE2D::operator float * | ( | ) | [inline] |
| common::LINE2D::operator const float * | ( | ) | const [inline] |
| VEC2& common::LINE2D::GetNormal | ( | ) | [inline] |
| const VEC2& common::LINE2D::GetNormal | ( | ) | const [inline] |
| bool common::LINE2D::operator== | ( | const LINE2D & | L | ) | const [inline] |
| bool common::LINE2D::operator!= | ( | const LINE2D & | L | ) | const [inline] |
| LINE2D common::LINE2D::operator+ | ( | ) | const [inline] |
| LINE2D common::LINE2D::operator- | ( | ) | const [inline] |
Zwraca prostą zwróconą w przeciwną stronę.
| LINE2D common::LINE2D::operator* | ( | float | s | ) | const [inline] |
| LINE2D common::LINE2D::operator/ | ( | float | s | ) | const [inline] |
| LINE2D& common::LINE2D::operator*= | ( | float | s | ) | [inline] |
| LINE2D& common::LINE2D::operator/= | ( | float | s | ) | [inline] |
| void common::LINE2D::GetTangent | ( | VEC2 * | Out | ) | [inline] |
Zwraca wektor wskazujący w kierunku prostej.
| void common::LINE2D::GetMemberPoint | ( | VEC2 * | Out | ) | [inline] |
Zwraca jakiś punkt leżący na tej prostej.
Musi być znormalizowana.
| void common::LINE2D::RecalculateD | ( | const VEC2 & | p | ) | [inline] |
Zmienia odległość od początku układu współrzędnych.
Prosta pozostając tak samo zorientowana zostaje przesunięta tak, żeby zawierać w sobie podany punkt. Musi być znormalizowana.
| float common::LINE2D::a |
| float common::LINE2D::b |
| float common::LINE2D::c |
1.5.5