OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::Line3D Struct Reference

#include <Line3D.hpp>

Public Types

using position_type = Vec3
 
using value_type = position_type::value_type
 

Public Member Functions

SIV3D_NODISCARD_CXX20 Line3D ()=default
 
SIV3D_NODISCARD_CXX20 Line3D (const Line3D &)=default
 
constexpr SIV3D_NODISCARD_CXX20 Line3D (value_type bx, value_type by, value_type bz, value_type ex, value_type ey, value_type ez) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Line3D (const position_type &_begin, value_type ex, value_type ey, value_type ez) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Line3D (value_type bx, value_type by, value_type bz, const position_type &_end) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Line3D (const position_type &_begin, const position_type &_end) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Line3D (const position_type &origin, Arg::direction_< position_type > direction) noexcept
 
Line3Doperator= (const Line3D &)=default
 
constexpr Line3Dset (value_type x0, value_type y0, value_type z0, value_type x1, value_type y1, value_type z1) noexcept
 
constexpr Line3Dset (position_type p0, value_type x1, value_type y1, value_type z1) noexcept
 
constexpr Line3Dset (value_type x0, value_type y0, value_type z0, position_type p1) noexcept
 
constexpr Line3Dset (position_type p0, position_type p1) noexcept
 
constexpr Line3Dset (const Line3D &line) noexcept
 
constexpr Line3D movedBy (value_type x, value_type y, value_type z) const noexcept
 
constexpr Line3D movedBy (position_type v) const noexcept
 
constexpr Line3DmoveBy (value_type x, value_type y, value_type z) noexcept
 
constexpr Line3DmoveBy (position_type v) noexcept
 
Line3D stretched (value_type length) const noexcept
 
Line3D stretched (value_type lengthBegin, value_type lengthEnd) const noexcept
 
constexpr position_type vector () const noexcept
 
constexpr Line3D reversed () const noexcept
 
constexpr Line3Dreverse () noexcept
 
constexpr bool hasLength () const noexcept
 
value_type length () const noexcept
 
constexpr value_type lengthSq () const noexcept
 
position_typep (size_t index) noexcept
 
const position_typep (size_t index) const noexcept
 
constexpr position_type point (size_t index)
 
constexpr position_type position (double t) const noexcept
 
constexpr position_type center () const noexcept
 
constexpr Line3D lerp (const Line3D &other, double f) const noexcept
 
Line3D toScreen (const Mat4x4 &vp) const noexcept
 
Line toScreenLine (const Mat4x4 &vp) const noexcept
 
const Line3Ddraw (const ColorF &color=Palette::White) const
 
const Line3Ddraw (const ColorF &colorBegin, const ColorF &colorEnd) const
 

Public Attributes

position_type begin
 
position_type end
 

Friends

constexpr friend bool operator== (const Line3D &lhs, const Line3D &rhs) noexcept
 
constexpr friend bool operator!= (const Line3D &lhs, const Line3D &rhs) noexcept
 
template<class CharType >
std::basic_ostream< CharType > & operator<< (std::basic_ostream< CharType > &output, const Line3D &value)
 
template<class CharType >
std::basic_istream< CharType > & operator>> (std::basic_istream< CharType > &input, Line3D &value)
 
void Formatter (FormatData &formatData, const Line3D &value)
 

Member Typedef Documentation

◆ position_type

◆ value_type

Constructor & Destructor Documentation

◆ Line3D() [1/7]

SIV3D_NODISCARD_CXX20 s3d::Line3D::Line3D ( )
default

◆ Line3D() [2/7]

SIV3D_NODISCARD_CXX20 s3d::Line3D::Line3D ( const Line3D )
default

◆ Line3D() [3/7]

constexpr SIV3D_NODISCARD_CXX20 s3d::Line3D::Line3D ( value_type  bx,
value_type  by,
value_type  bz,
value_type  ex,
value_type  ey,
value_type  ez 
)
constexprnoexcept

◆ Line3D() [4/7]

constexpr SIV3D_NODISCARD_CXX20 s3d::Line3D::Line3D ( const position_type _begin,
value_type  ex,
value_type  ey,
value_type  ez 
)
constexprnoexcept

◆ Line3D() [5/7]

constexpr SIV3D_NODISCARD_CXX20 s3d::Line3D::Line3D ( value_type  bx,
value_type  by,
value_type  bz,
const position_type _end 
)
constexprnoexcept

◆ Line3D() [6/7]

constexpr SIV3D_NODISCARD_CXX20 s3d::Line3D::Line3D ( const position_type _begin,
const position_type _end 
)
constexprnoexcept

◆ Line3D() [7/7]

constexpr SIV3D_NODISCARD_CXX20 s3d::Line3D::Line3D ( const position_type origin,
Arg::direction_< position_type direction 
)
constexprnoexcept

Member Function Documentation

◆ center()

constexpr position_type s3d::Line3D::center ( ) const
constexprnoexcept

◆ draw() [1/2]

const Line3D& s3d::Line3D::draw ( const ColorF color = Palette::White) const

◆ draw() [2/2]

const Line3D& s3d::Line3D::draw ( const ColorF colorBegin,
const ColorF colorEnd 
) const

◆ hasLength()

constexpr bool s3d::Line3D::hasLength ( ) const
constexprnoexcept

◆ length()

value_type s3d::Line3D::length ( ) const
noexcept

◆ lengthSq()

constexpr value_type s3d::Line3D::lengthSq ( ) const
constexprnoexcept

◆ lerp()

constexpr Line3D s3d::Line3D::lerp ( const Line3D other,
double  f 
) const
constexprnoexcept

◆ moveBy() [1/2]

constexpr Line3D& s3d::Line3D::moveBy ( position_type  v)
constexprnoexcept

◆ moveBy() [2/2]

constexpr Line3D& s3d::Line3D::moveBy ( value_type  x,
value_type  y,
value_type  z 
)
constexprnoexcept

◆ movedBy() [1/2]

constexpr Line3D s3d::Line3D::movedBy ( position_type  v) const
constexprnoexcept

◆ movedBy() [2/2]

constexpr Line3D s3d::Line3D::movedBy ( value_type  x,
value_type  y,
value_type  z 
) const
constexprnoexcept

◆ operator=()

Line3D& s3d::Line3D::operator= ( const Line3D )
default

◆ p() [1/2]

const position_type& s3d::Line3D::p ( size_t  index) const
noexcept

◆ p() [2/2]

position_type& s3d::Line3D::p ( size_t  index)
noexcept

◆ point()

constexpr position_type s3d::Line3D::point ( size_t  index)
constexpr

◆ position()

constexpr position_type s3d::Line3D::position ( double  t) const
constexprnoexcept

◆ reverse()

constexpr Line3D& s3d::Line3D::reverse ( )
constexprnoexcept

◆ reversed()

constexpr Line3D s3d::Line3D::reversed ( ) const
constexprnoexcept

◆ set() [1/5]

constexpr Line3D& s3d::Line3D::set ( const Line3D line)
constexprnoexcept

◆ set() [2/5]

constexpr Line3D& s3d::Line3D::set ( position_type  p0,
position_type  p1 
)
constexprnoexcept

◆ set() [3/5]

constexpr Line3D& s3d::Line3D::set ( position_type  p0,
value_type  x1,
value_type  y1,
value_type  z1 
)
constexprnoexcept

◆ set() [4/5]

constexpr Line3D& s3d::Line3D::set ( value_type  x0,
value_type  y0,
value_type  z0,
position_type  p1 
)
constexprnoexcept

◆ set() [5/5]

constexpr Line3D& s3d::Line3D::set ( value_type  x0,
value_type  y0,
value_type  z0,
value_type  x1,
value_type  y1,
value_type  z1 
)
constexprnoexcept

◆ stretched() [1/2]

Line3D s3d::Line3D::stretched ( value_type  length) const
noexcept

◆ stretched() [2/2]

Line3D s3d::Line3D::stretched ( value_type  lengthBegin,
value_type  lengthEnd 
) const
noexcept

◆ toScreen()

Line3D s3d::Line3D::toScreen ( const Mat4x4 vp) const
noexcept

◆ toScreenLine()

Line s3d::Line3D::toScreenLine ( const Mat4x4 vp) const
noexcept

◆ vector()

constexpr position_type s3d::Line3D::vector ( ) const
constexprnoexcept

Friends And Related Function Documentation

◆ Formatter

void Formatter ( FormatData formatData,
const Line3D value 
)
friend

◆ operator!=

constexpr friend bool operator!= ( const Line3D lhs,
const Line3D rhs 
)
friend

◆ operator<<

template<class CharType >
std::basic_ostream<CharType>& operator<< ( std::basic_ostream< CharType > &  output,
const Line3D value 
)
friend

◆ operator==

constexpr friend bool operator== ( const Line3D lhs,
const Line3D rhs 
)
friend

◆ operator>>

template<class CharType >
std::basic_istream<CharType>& operator>> ( std::basic_istream< CharType > &  input,
Line3D value 
)
friend

Member Data Documentation

◆ begin

position_type s3d::Line3D::begin

◆ end

position_type s3d::Line3D::end

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