Brunot
Loading...
Searching...
No Matches
Line Class Reference

#include <Line.h>

Collaboration diagram for Line:
[legend]

Public Member Functions

 Line (Vector4D p1, Vector4D p2, Vector4D color={1.0f, 0.0f, 0.0f, 1.0f})
 Line (std::pair< float, float > p1, std::pair< float, float > p2, Vector4D color={1.0f, 0.f, 0.f, 1.f})
 Line (const Line &other)=default
 Line (Line &&other) noexcept=default
auto operator= (const Line &other) -> Line &=default
auto operator= (Line &&other) noexcept -> Line &=default
 operator std::pair< gfx::Vertex, gfx::Vertex > () const
 convertion operator to a pair of verts, intended for use when adding a line to a vertex Buffer
auto p1 () const -> const Vector4D &
auto p1 (const Vector4D &p1) -> void
auto p2 () const -> const Vector4D &
auto p2 (const Vector4D &p2) -> void
auto color () const -> const Vector4D &
auto color (const Vector4D &color) -> void

Private Attributes

Vector4D _p1 {0.f, 0.f, 0.f, 1.f}
Vector4D _p2 {0.f, 0.f, 0.f, 1.f}
Vector4D _color {1.0f, 0.0f, 0.0f, 1.0f}

Friends

auto operator* (const AffineMatrix &transform, const Line &line) ->Line
auto operator*= (Line &line, const AffineMatrix &transform) ->Line &

Constructor & Destructor Documentation

◆ Line() [1/4]

Line::Line ( Vector4D p1,
Vector4D p2,
Vector4D color = {1.0f, 0.0f, 0.0f, 1.0f} )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Line() [2/4]

Line::Line ( std::pair< float, float > p1,
std::pair< float, float > p2,
Vector4D color = {1.0f, 0.f, 0.f, 1.f} )
inline
Here is the call graph for this function:

◆ Line() [3/4]

Line::Line ( const Line & other)
default
Here is the call graph for this function:

◆ Line() [4/4]

Line::Line ( Line && other)
defaultnoexcept
Here is the call graph for this function:

Member Function Documentation

◆ color() [1/2]

auto Line::color ( ) const->constVector4D &
nodiscard
Here is the caller graph for this function:

◆ color() [2/2]

auto Line::color ( const Vector4D & color) ->void
Here is the call graph for this function:

◆ operator std::pair< gfx::Vertex, gfx::Vertex >()

Line::operator std::pair< gfx::Vertex, gfx::Vertex > ( ) const
explicit

convertion operator to a pair of verts, intended for use when adding a line to a vertex Buffer

Here is the call graph for this function:

◆ operator=() [1/2]

auto Line::operator= ( const Line & other) ->Line &=default
default
Here is the call graph for this function:

◆ operator=() [2/2]

auto Line::operator= ( Line && other) ->Line &=default
defaultnoexcept
Here is the call graph for this function:

◆ p1() [1/2]

auto Line::p1 ( ) const->constVector4D &
nodiscard
Here is the caller graph for this function:

◆ p1() [2/2]

auto Line::p1 ( const Vector4D & p1) ->void
Here is the call graph for this function:

◆ p2() [1/2]

auto Line::p2 ( ) const->constVector4D &
nodiscard
Here is the caller graph for this function:

◆ p2() [2/2]

auto Line::p2 ( const Vector4D & p2) ->void
Here is the call graph for this function:

◆ operator*

auto operator* ( const AffineMatrix & transform,
const Line & line )->Line
friend

◆ operator*=

auto operator*= ( Line & line,
const AffineMatrix & transform )->Line &
friend

Member Data Documentation

◆ _color

Vector4D Line::_color {1.0f, 0.0f, 0.0f, 1.0f}
private

◆ _p1

Vector4D Line::_p1 {0.f, 0.f, 0.f, 1.f}
private

◆ _p2

Vector4D Line::_p2 {0.f, 0.f, 0.f, 1.f}
private

The documentation for this class was generated from the following files:
  • /home/egrazil/sites/Brunot/The House/source/Graphics/Line.h
  • /home/egrazil/sites/Brunot/The House/source/Graphics/Line.cpp