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

二次ベジェ曲線 More...

#include <Bezier2.hpp>

Public Member Functions

SIV3D_NODISCARD_CXX20 Bezier2 ()=default
 
constexpr SIV3D_NODISCARD_CXX20 Bezier2 (const Vec2 &_p0, const Vec2 &_p1, const Vec2 &_p2) noexcept
 
constexpr Vec2p (size_t index) noexcept
 
constexpr const Vec2p (size_t index) const noexcept
 
constexpr Vec2 point (size_t index) const
 
constexpr Vec2 getPos (const double t) const noexcept
 
Vec2 getTangent (double t) const noexcept
 
LineString getLineString (const int32 quality=24) const
 
LineString getLineString (double start, double end, int32 quality=24) const
 
RectF boundingRect () const noexcept
 
size_t hash () const noexcept
 
template<class Shape2DType >
constexpr bool intersects (const Shape2DType &other) const
 
template<class Shape2DType >
Optional< Array< Vec2 > > intersectsAt (const Shape2DType &other) const
 
const Bezier2paint (Image &dst, const Color &color) const
 
const Bezier2paint (Image &dst, int32 thickness, const Color &color) const
 
const Bezier2overwrite (Image &dst, const Color &color, Antialiased antialiased=Antialiased::Yes) const
 
const Bezier2overwrite (Image &dst, int32 thickness, const Color &color, Antialiased antialiased=Antialiased::Yes) const
 
const Bezier2draw (const ColorF &color=Palette::White, int32 quality=24) const
 
const Bezier2draw (double thickness, const ColorF &color=Palette::White, int32 quality=24) const
 
const Bezier2draw (const LineStyle &style, double thickness, const ColorF &color=Palette::White, int32 quality=24) const
 

Public Attributes

Vec2 p0
 
Vec2 p1
 
Vec2 p2
 

Friends

template<class CharType >
std::basic_ostream< CharType > & operator<< (std::basic_ostream< CharType > &output, const Bezier2 &value)
 
template<class CharType >
std::basic_istream< CharType > & operator>> (std::basic_istream< CharType > &input, Bezier2 &value)
 
void Formatter (FormatData &formatData, const Bezier2 &value)
 

Detailed Description

二次ベジェ曲線

Constructor & Destructor Documentation

◆ Bezier2() [1/2]

SIV3D_NODISCARD_CXX20 s3d::Bezier2::Bezier2 ( )
default

◆ Bezier2() [2/2]

constexpr SIV3D_NODISCARD_CXX20 s3d::Bezier2::Bezier2 ( const Vec2 _p0,
const Vec2 _p1,
const Vec2 _p2 
)
constexprnoexcept

Member Function Documentation

◆ boundingRect()

RectF s3d::Bezier2::boundingRect ( ) const
noexcept

◆ draw() [1/3]

const Bezier2& s3d::Bezier2::draw ( const ColorF color = Palette::White,
int32  quality = 24 
) const

◆ draw() [2/3]

const Bezier2& s3d::Bezier2::draw ( const LineStyle style,
double  thickness,
const ColorF color = Palette::White,
int32  quality = 24 
) const

◆ draw() [3/3]

const Bezier2& s3d::Bezier2::draw ( double  thickness,
const ColorF color = Palette::White,
int32  quality = 24 
) const

◆ getLineString() [1/2]

LineString s3d::Bezier2::getLineString ( const int32  quality = 24) const

◆ getLineString() [2/2]

LineString s3d::Bezier2::getLineString ( double  start,
double  end,
int32  quality = 24 
) const

◆ getPos()

constexpr Vec2 s3d::Bezier2::getPos ( const double  t) const
constexprnoexcept

◆ getTangent()

Vec2 s3d::Bezier2::getTangent ( double  t) const
noexcept

◆ hash()

size_t s3d::Bezier2::hash ( ) const
noexcept

◆ intersects()

template<class Shape2DType >
constexpr bool s3d::Bezier2::intersects ( const Shape2DType &  other) const
constexpr

◆ intersectsAt()

template<class Shape2DType >
Optional<Array<Vec2> > s3d::Bezier2::intersectsAt ( const Shape2DType &  other) const

◆ overwrite() [1/2]

const Bezier2& s3d::Bezier2::overwrite ( Image dst,
const Color color,
Antialiased  antialiased = Antialiased::Yes 
) const

◆ overwrite() [2/2]

const Bezier2& s3d::Bezier2::overwrite ( Image dst,
int32  thickness,
const Color color,
Antialiased  antialiased = Antialiased::Yes 
) const

◆ p() [1/2]

constexpr const Vec2& s3d::Bezier2::p ( size_t  index) const
constexprnoexcept

◆ p() [2/2]

constexpr Vec2& s3d::Bezier2::p ( size_t  index)
constexprnoexcept

◆ paint() [1/2]

const Bezier2& s3d::Bezier2::paint ( Image dst,
const Color color 
) const

◆ paint() [2/2]

const Bezier2& s3d::Bezier2::paint ( Image dst,
int32  thickness,
const Color color 
) const

◆ point()

constexpr Vec2 s3d::Bezier2::point ( size_t  index) const
constexpr

Friends And Related Function Documentation

◆ Formatter

void Formatter ( FormatData formatData,
const Bezier2 value 
)
friend

◆ operator<<

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

◆ operator>>

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

Member Data Documentation

◆ p0

Vec2 s3d::Bezier2::p0

◆ p1

Vec2 s3d::Bezier2::p1

◆ p2

Vec2 s3d::Bezier2::p2

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