Blender
V3.3
|
#include <Curve.h>
Public Types | |
typedef SVertex | vertex_type |
Public Member Functions | |
virtual string | getExactTypeName () const |
virtual real | getX () const |
virtual real | getY () const |
virtual real | getZ () const |
virtual Vec3r | getPoint3D () const |
virtual real | getProjectedX () const |
virtual real | getProjectedY () const |
virtual real | getProjectedZ () const |
virtual Vec2r | getPoint2D () const |
virtual FEdge * | getFEdge (Interface0D &inter) |
virtual Id | getId () const |
virtual Nature::VertexNature | getNature () const |
virtual SVertex * | castToSVertex () |
virtual ViewVertex * | castToViewVertex () |
virtual NonTVertex * | castToNonTVertex () |
virtual TVertex * | castToTVertex () |
CurvePoint () | |
CurvePoint (SVertex *iA, SVertex *iB, float t) | |
CurvePoint (CurvePoint *iA, CurvePoint *iB, float t) | |
CurvePoint (const CurvePoint &iBrother) | |
CurvePoint & | operator= (const CurvePoint &iBrother) |
virtual | ~CurvePoint ()=default |
bool | operator== (const CurvePoint &b) |
SVertex * | A () |
SVertex * | B () |
float | t2d () const |
void | setA (SVertex *iA) |
void | setB (SVertex *iB) |
void | setT2d (float t) |
FEdge * | fedge () |
const Vec3r & | point2d () const |
const Vec3r & | point3d () const |
Vec3r | normal () const |
const SShape * | shape () const |
occluder_container::const_iterator | occluders_begin () const |
occluder_container::const_iterator | occluders_end () const |
bool | occluders_empty () const |
int | occluders_size () const |
const Polygon3r & | occludee () const |
const SShape * | occluded_shape () const |
bool | occludee_empty () const |
real | z_discontinuity () const |
![]() | |
Interface0D () | |
virtual | ~Interface0D () |
Protected Attributes | |
SVertex * | __A |
SVertex * | __B |
float | _t2d |
Vec3r | _Point2d |
Vec3r | _Point3d |
Class to represent a point of a curve. A CurvePoint can be any point of a 1D curve (it doesn't have to be a vertex of the curve). Any Interface1D is built upon ViewEdges, themselves built upon FEdges. Therefore, a curve is basically a polyline made of a list SVertex. Thus, a CurvePoint is built by linearly interpolating two SVertex. CurvePoint can be used as virtual points while querying 0D information along a curve at a given resolution.
Freestyle::CurvePoint::CurvePoint | ( | ) |
Builds a CurvePoint from two SVertex and an interpolation parameter.
iA | The first SVertex |
iB | The second SVertex |
t | A 2D interpolation parameter used to linearly interpolate iA and iB |
Definition at line 34 of file Curve.cpp.
References __A, __B, _Point2d, _Point3d, _t2d, Freestyle::SVertex::point2d(), Freestyle::SVertex::point3d(), and t.
Freestyle::CurvePoint::CurvePoint | ( | CurvePoint * | iA, |
CurvePoint * | iB, | ||
float | t | ||
) |
Builds a CurvePoint from two CurvePoint and an interpolation parameter.
iA | The first CurvePoint |
iB | The second CurvePoint |
t | The 2D interpolation parameter used to linearly interpolate iA and iB. |
Definition at line 53 of file Curve.cpp.
References __A, __B, _Point2d, _Point3d, _t2d, A(), B(), BLI_assert, G, G_DEBUG_FREESTYLE, getPoint2D(), Freestyle::SVertex::getPoint2D(), point2d(), Freestyle::SVertex::point2d(), Freestyle::SVertex::point3d(), t2d(), Freestyle::VecMat::Vec2< T >::x(), and Freestyle::VecMat::Vec2< T >::y().
Freestyle::CurvePoint::CurvePoint | ( | const CurvePoint & | iBrother | ) |
|
virtualdefault |
Destructor
|
inline |
Returns the first SVertex upon which the CurvePoint is built.
Definition at line 235 of file Curve.h.
Referenced by CurvePoint(), CurvePoint_init(), getFEdge(), Freestyle::Chain::push_viewedge_front(), and StrokeVertex_init().
|
inline |
Returns the second SVertex upon which the CurvePoint is built.
Definition at line 241 of file Curve.h.
Referenced by CurvePoint(), CurvePoint_init(), getFEdge(), and StrokeVertex_init().
|
inlinevirtual |
Cast the Interface0D in NonTVertex if it can be.
Reimplemented from Freestyle::Interface0D.
Definition at line 158 of file Curve.h.
References Freestyle::NonTVertex::castToNonTVertex().
|
inlinevirtual |
Cast the Interface0D in SVertex if it can be.
Reimplemented from Freestyle::Interface0D.
|
inlinevirtual |
Cast the Interface0D in TVertex if it can be.
Reimplemented from Freestyle::Interface0D.
Definition at line 170 of file Curve.h.
References Freestyle::TVertex::castToTVertex().
|
inlinevirtual |
Cast the Interface0D in ViewVertex if it can be.
Reimplemented from Freestyle::Interface0D.
Definition at line 146 of file Curve.h.
References Freestyle::Interface0D::castToViewVertex().
FEdge * Freestyle::CurvePoint::fedge | ( | ) |
Definition at line 181 of file Curve.cpp.
References __A, Freestyle::SVertex::fedge(), getNature(), and Freestyle::Nature::T_VERTEX.
|
inlinevirtual |
Returns the string "CurvePoint".
Reimplemented from Freestyle::Interface0D.
Reimplemented in Freestyle::StrokeVertex.
|
virtual |
Returns the FEdge that lies between this Interface0D and the Interface0D given as argument.
Reimplemented from Freestyle::Interface0D.
Definition at line 189 of file Curve.cpp.
References __A, __B, _t2d, A(), B(), G, G_DEBUG_FREESTYLE, Freestyle::SVertex::getFEdge(), getPoint2D(), Freestyle::SVertex::getPoint2D(), t2d(), Freestyle::VecMat::Vec2< T >::x(), Freestyle::x, Freestyle::VecMat::Vec2< T >::y(), and y.
|
inlinevirtual |
Returns the CurvePoint's Id
Reimplemented from Freestyle::Interface0D.
Definition at line 108 of file Curve.h.
References id.
Referenced by Freestyle::operator<<().
|
inlinevirtual |
Returns the CurvePoint's Nature
Reimplemented from Freestyle::Interface0D.
Definition at line 121 of file Curve.h.
References Freestyle::Nature::POINT.
Referenced by fedge().
|
inlinevirtual |
Returns the 2D point.
Reimplemented from Freestyle::Interface0D.
Definition at line 100 of file Curve.h.
Referenced by Freestyle::createStroke(), CurvePoint(), getFEdge(), and Freestyle::StrokeVertex::getPoint().
|
inlinevirtual |
Returns the 3D point.
Reimplemented from Freestyle::Interface0D.
|
inlinevirtual |
Returns the projected 3D X coordinate of the point
Reimplemented from Freestyle::Interface0D.
Definition at line 82 of file Curve.h.
Referenced by Freestyle::operator<<().
|
inlinevirtual |
Returns the projected 3D Y coordinate of the point
Reimplemented from Freestyle::Interface0D.
Definition at line 88 of file Curve.h.
Referenced by Freestyle::operator<<().
|
inlinevirtual |
Returns the projected 3D Z coordinate of the point
Reimplemented from Freestyle::Interface0D.
Definition at line 94 of file Curve.h.
Referenced by Freestyle::operator<<().
|
inlinevirtual |
Returns the 3D X coordinate of the point
Reimplemented from Freestyle::Interface0D.
Definition at line 58 of file Curve.h.
Referenced by Freestyle::operator<<().
|
inlinevirtual |
Returns the 3D Y coordinate of the point
Reimplemented from Freestyle::Interface0D.
Definition at line 64 of file Curve.h.
Referenced by Freestyle::operator<<().
|
inlinevirtual |
Returns the 3D Z coordinate of the point
Reimplemented from Freestyle::Interface0D.
Definition at line 70 of file Curve.h.
Referenced by Freestyle::operator<<().
Vec3r Freestyle::CurvePoint::normal | ( | ) | const |
Definition at line 276 of file Curve.cpp.
References __A, __B, _t2d, Freestyle::Exception::getException(), Freestyle::SVertex::getFEdge(), Freestyle::SilhouetteGeomEngine::ImageToWorldParameter(), and Freestyle::SVertex::normal().
const SShape * Freestyle::CurvePoint::occluded_shape | ( | ) | const |
Definition at line 388 of file Curve.cpp.
References __A, __B, Freestyle::SVertex::getFEdge(), Freestyle::SVertex::occluded_shape(), and Freestyle::FEdge::occluded_shape().
const Polygon3r & Freestyle::CurvePoint::occludee | ( | ) | const |
Definition at line 399 of file Curve.cpp.
References __A, __B, Freestyle::SVertex::getFEdge(), Freestyle::SVertex::occludee(), and Freestyle::FEdge::occludee().
bool Freestyle::CurvePoint::occludee_empty | ( | ) | const |
Definition at line 410 of file Curve.cpp.
References __A, __B, Freestyle::SVertex::getFEdge(), Freestyle::SVertex::occludee_empty(), and Freestyle::FEdge::occludee_empty().
occluder_container::const_iterator Freestyle::CurvePoint::occluders_begin | ( | ) | const |
Definition at line 344 of file Curve.cpp.
References __A, __B, Freestyle::SVertex::getFEdge(), Freestyle::SVertex::occluders_begin(), and Freestyle::FEdge::occluders_begin().
bool Freestyle::CurvePoint::occluders_empty | ( | ) | const |
Definition at line 366 of file Curve.cpp.
References __A, __B, Freestyle::SVertex::getFEdge(), Freestyle::SVertex::occluders_empty(), and Freestyle::FEdge::occluders_empty().
occluder_container::const_iterator Freestyle::CurvePoint::occluders_end | ( | ) | const |
Definition at line 355 of file Curve.cpp.
References __A, __B, Freestyle::SVertex::getFEdge(), Freestyle::SVertex::occluders_end(), and Freestyle::FEdge::occluders_end().
int Freestyle::CurvePoint::occluders_size | ( | ) | const |
Definition at line 377 of file Curve.cpp.
References __A, __B, Freestyle::SVertex::getFEdge(), Freestyle::SVertex::occluders_size(), and Freestyle::FEdge::occluders_size().
CurvePoint & Freestyle::CurvePoint::operator= | ( | const CurvePoint & | iBrother | ) |
|
inline |
|
inline |
Definition at line 289 of file Curve.h.
Referenced by CurvePoint(), Freestyle::Curve::push_vertex_back(), and Freestyle::Curve::push_vertex_front().
|
inline |
Sets the first SVertex upon which to build the CurvePoint.
Definition at line 261 of file Curve.h.
Referenced by Freestyle::Chain::push_viewedge_back().
Sets the second SVertex upon which to build the CurvePoint.
const SShape * Freestyle::CurvePoint::shape | ( | ) | const |
Definition at line 315 of file Curve.cpp.
References __A, __B, and Freestyle::SVertex::shape().
|
inline |
Returns the interpolation parameter.
Definition at line 247 of file Curve.h.
Referenced by CurvePoint(), and getFEdge().
real Freestyle::CurvePoint::z_discontinuity | ( | ) | const |
Definition at line 421 of file Curve.cpp.
References __A, __B, Freestyle::SVertex::getFEdge(), Freestyle::SVertex::z_discontinuity(), and Freestyle::FEdge::z_discontinuity().
|
protected |
Definition at line 185 of file Curve.h.
Referenced by CurvePoint(), fedge(), getFEdge(), normal(), occluded_shape(), occludee(), occludee_empty(), occluders_begin(), occluders_empty(), occluders_end(), occluders_size(), operator=(), Freestyle::CurveInternal::CurvePointIterator::operator==(), shape(), and z_discontinuity().
|
protected |
Definition at line 186 of file Curve.h.
Referenced by CurvePoint(), getFEdge(), normal(), occluded_shape(), occludee(), occludee_empty(), occluders_begin(), occluders_empty(), occluders_end(), occluders_size(), operator=(), Freestyle::CurveInternal::CurvePointIterator::operator==(), shape(), and z_discontinuity().
|
protected |
Definition at line 189 of file Curve.h.
Referenced by CurvePoint(), operator=(), Freestyle::StrokeVertex::operator[](), Freestyle::StrokeVertex::setPoint(), Freestyle::StrokeVertex::setX(), Freestyle::StrokeVertex::setY(), Freestyle::StrokeVertex::x(), and Freestyle::StrokeVertex::y().
|
protected |
Definition at line 190 of file Curve.h.
Referenced by CurvePoint(), and operator=().
|
protected |
Definition at line 187 of file Curve.h.
Referenced by CurvePoint(), getFEdge(), normal(), and operator=().