common::LINE2D Struct Reference
[Math ModuleProsta 2D]

Prosta 2D. More...

#include <Math.hpp>

List of all members.

Public Member Functions

 LINE2D ()
 LINE2D (float a, float b, float c)
 LINE2D (const VEC2 &Normal, float c)
 LINE2D (const float *Arr)
 operator float * ()
 operator const float * () const
VEC2GetNormal ()
const VEC2GetNormal () 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
LINE2Doperator*= (float s)
LINE2Doperator/= (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 RecalcD (const VEC2 &p)
 Zmienia odległość od początku układu współrzędnych.

Public Attributes

float a
float b
float c

Detailed Description

Prosta 2D.

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.


Constructor & Destructor Documentation

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]

Member Function Documentation

void common::LINE2D::GetMemberPoint ( VEC2 Out  )  [inline]

Zwraca jakiś punkt leżący na tej prostej.

Musi być znormalizowana.

const VEC2& common::LINE2D::GetNormal (  )  const [inline]
VEC2& common::LINE2D::GetNormal (  )  [inline]
void common::LINE2D::GetTangent ( VEC2 Out  )  [inline]

Zwraca wektor wskazujący w kierunku prostej.

common::LINE2D::operator const float * (  )  const [inline]
common::LINE2D::operator float * (  )  [inline]
bool common::LINE2D::operator!= ( const LINE2D L  )  const [inline]
LINE2D common::LINE2D::operator* ( float  s  )  const [inline]
LINE2D& common::LINE2D::operator*= ( float  s  )  [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  )  [inline]
bool common::LINE2D::operator== ( const LINE2D L  )  const [inline]
void common::LINE2D::RecalcD ( 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.


Member Data Documentation


The documentation for this struct was generated from the following file:

Generated on Wed Dec 16 20:44:55 2009 for CommonLib by  doxygen 1.6.1