Blender V5.0
Freestyle::CurvePoint Class Reference

#include <Curve.h>

Inherits Freestyle::Interface0D.

Inherited by Freestyle::StrokeVertex.

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 FEdgegetFEdge (Interface0D &inter)
virtual Id getId () const
virtual Nature::VertexNature getNature () const
virtual SVertexcastToSVertex ()
virtual ViewVertexcastToViewVertex ()
virtual NonTVertexcastToNonTVertex ()
virtual TVertexcastToTVertex ()
 CurvePoint ()
 CurvePoint (SVertex *iA, SVertex *iB, float t)
 CurvePoint (CurvePoint *iA, CurvePoint *iB, float t)
 CurvePoint (const CurvePoint &iBrother)
CurvePointoperator= (const CurvePoint &iBrother)
virtual ~CurvePoint ()=default
bool operator== (const CurvePoint &b)
SVertexA ()
SVertexB ()
float t2d () const
void setA (SVertex *iA)
void setB (SVertex *iB)
void setT2d (float t)
FEdgefedge ()
const Vec3rpoint2d () const
const Vec3rpoint3d () const
Vec3r normal () const
const SShapeshape () const
occluder_container::const_iterator occluders_begin () const
occluder_container::const_iterator occluders_end () const
bool occluders_empty () const
int occluders_size () const
const Polygon3roccludee () const
const SShapeoccluded_shape () const
bool occludee_empty () const
real z_discontinuity () const
Public Member Functions inherited from Freestyle::Interface0D
 Interface0D ()
virtual ~Interface0D ()

Protected Attributes

SVertex__A
SVertex__B
float _t2d
Vec3r _Point2d
Vec3r _Point3d

Detailed Description

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.

Definition at line 48 of file Curve.h.

Member Typedef Documentation

◆ vertex_type

Constructor & Destructor Documentation

◆ CurvePoint() [1/4]

◆ CurvePoint() [2/4]

Freestyle::CurvePoint::CurvePoint ( SVertex * iA,
SVertex * iB,
float t )

Builds a CurvePoint from two SVertex and an interpolation parameter.

Parameters
iAThe first SVertex
iBThe second SVertex
tA 2D interpolation parameter used to linearly interpolate iA and iB

Definition at line 36 of file Curve.cpp.

References __A, __B, _Point2d, _Point3d, and _t2d.

◆ CurvePoint() [3/4]

Freestyle::CurvePoint::CurvePoint ( CurvePoint * iA,
CurvePoint * iB,
float t )

Builds a CurvePoint from two CurvePoint and an interpolation parameter.

Parameters
iAThe first CurvePoint
iBThe second CurvePoint
tThe 2D interpolation parameter used to linearly interpolate iA and iB.

Definition at line 55 of file Curve.cpp.

References __A, __B, _Point2d, _Point3d, _t2d, A(), B(), BLI_assert, CurvePoint(), G, G_DEBUG_FREESTYLE, getPoint2D(), Freestyle::SVertex::getPoint2D(), point2d(), Freestyle::SVertex::point3d(), printf, t2d(), Freestyle::VecMat::Vec2< T >::x(), and Freestyle::VecMat::Vec2< T >::y().

◆ CurvePoint() [4/4]

Freestyle::CurvePoint::CurvePoint ( const CurvePoint & iBrother)

Copy Constructor.

Definition at line 168 of file Curve.cpp.

References __A, __B, _Point2d, _Point3d, _t2d, and CurvePoint().

◆ ~CurvePoint()

virtual Freestyle::CurvePoint::~CurvePoint ( )
virtualdefault

Destructor

Member Function Documentation

◆ A()

SVertex * Freestyle::CurvePoint::A ( )
inline

Returns the first SVertex upon which the CurvePoint is built.

Definition at line 235 of file Curve.h.

References __A.

Referenced by CurvePoint(), CurvePoint_init(), getFEdge(), Freestyle::Chain::push_viewedge_front(), and StrokeVertex_init().

◆ B()

SVertex * Freestyle::CurvePoint::B ( )
inline

Returns the second SVertex upon which the CurvePoint is built.

Definition at line 241 of file Curve.h.

References __B.

Referenced by CurvePoint(), CurvePoint_init(), getFEdge(), and StrokeVertex_init().

◆ castToNonTVertex()

virtual NonTVertex * Freestyle::CurvePoint::castToNonTVertex ( )
inlinevirtual

Cast the Interface0D in NonTVertex if it can be.

Reimplemented from Freestyle::Interface0D.

Definition at line 158 of file Curve.h.

References __A, __B, _t2d, and Freestyle::Interface0D::castToNonTVertex().

◆ castToSVertex()

virtual SVertex * Freestyle::CurvePoint::castToSVertex ( )
inlinevirtual

Cast the Interface0D in SVertex if it can be.

Reimplemented from Freestyle::Interface0D.

Definition at line 134 of file Curve.h.

References __A, __B, _t2d, and Freestyle::Interface0D::castToSVertex().

◆ castToTVertex()

virtual TVertex * Freestyle::CurvePoint::castToTVertex ( )
inlinevirtual

Cast the Interface0D in TVertex if it can be.

Reimplemented from Freestyle::Interface0D.

Definition at line 170 of file Curve.h.

References __A, __B, _t2d, and Freestyle::Interface0D::castToTVertex().

◆ castToViewVertex()

virtual ViewVertex * Freestyle::CurvePoint::castToViewVertex ( )
inlinevirtual

Cast the Interface0D in ViewVertex if it can be.

Reimplemented from Freestyle::Interface0D.

Definition at line 146 of file Curve.h.

References __A, __B, _t2d, and Freestyle::Interface0D::castToViewVertex().

◆ fedge()

FEdge * Freestyle::CurvePoint::fedge ( )

Definition at line 187 of file Curve.cpp.

References __A, getNature(), and Freestyle::Nature::T_VERTEX.

◆ getExactTypeName()

virtual string Freestyle::CurvePoint::getExactTypeName ( ) const
inlinevirtual

Returns the string "CurvePoint".

Reimplemented from Freestyle::Interface0D.

Reimplemented in Freestyle::StrokeVertex.

Definition at line 51 of file Curve.h.

◆ getFEdge()

FEdge * Freestyle::CurvePoint::getFEdge ( Interface0D & )
virtual

◆ getId()

virtual Id Freestyle::CurvePoint::getId ( ) const
inlinevirtual

Returns the CurvePoint's Id

Reimplemented from Freestyle::Interface0D.

Definition at line 108 of file Curve.h.

References __A, __B, and _t2d.

Referenced by Freestyle::operator<<().

◆ getNature()

virtual Nature::VertexNature Freestyle::CurvePoint::getNature ( ) const
inlinevirtual

Returns the CurvePoint's Nature

Reimplemented from Freestyle::Interface0D.

Definition at line 121 of file Curve.h.

References __A, __B, _t2d, and Freestyle::Nature::POINT.

Referenced by fedge().

◆ getPoint2D()

virtual Vec2r Freestyle::CurvePoint::getPoint2D ( ) const
inlinevirtual

Returns the 2D point.

Reimplemented from Freestyle::Interface0D.

Definition at line 100 of file Curve.h.

References _Point2d.

Referenced by Freestyle::createStroke(), CurvePoint(), getFEdge(), and Freestyle::StrokeVertex::getPoint().

◆ getPoint3D()

virtual Vec3r Freestyle::CurvePoint::getPoint3D ( ) const
inlinevirtual

Returns the 3D point.

Reimplemented from Freestyle::Interface0D.

Definition at line 76 of file Curve.h.

References _Point3d.

◆ getProjectedX()

virtual real Freestyle::CurvePoint::getProjectedX ( ) const
inlinevirtual

Returns the projected 3D X coordinate of the point

Reimplemented from Freestyle::Interface0D.

Definition at line 82 of file Curve.h.

References _Point2d.

Referenced by Freestyle::operator<<().

◆ getProjectedY()

virtual real Freestyle::CurvePoint::getProjectedY ( ) const
inlinevirtual

Returns the projected 3D Y coordinate of the point

Reimplemented from Freestyle::Interface0D.

Definition at line 88 of file Curve.h.

References _Point2d.

Referenced by Freestyle::operator<<().

◆ getProjectedZ()

virtual real Freestyle::CurvePoint::getProjectedZ ( ) const
inlinevirtual

Returns the projected 3D Z coordinate of the point

Reimplemented from Freestyle::Interface0D.

Definition at line 94 of file Curve.h.

References _Point2d.

Referenced by Freestyle::operator<<().

◆ getX()

virtual real Freestyle::CurvePoint::getX ( ) const
inlinevirtual

Returns the 3D X coordinate of the point

Reimplemented from Freestyle::Interface0D.

Definition at line 58 of file Curve.h.

References _Point3d.

Referenced by Freestyle::operator<<().

◆ getY()

virtual real Freestyle::CurvePoint::getY ( ) const
inlinevirtual

Returns the 3D Y coordinate of the point

Reimplemented from Freestyle::Interface0D.

Definition at line 64 of file Curve.h.

References _Point3d.

Referenced by Freestyle::operator<<().

◆ getZ()

virtual real Freestyle::CurvePoint::getZ ( ) const
inlinevirtual

Returns the 3D Z coordinate of the point

Reimplemented from Freestyle::Interface0D.

Definition at line 70 of file Curve.h.

References _Point3d.

Referenced by Freestyle::operator<<().

◆ normal()

Vec3r Freestyle::CurvePoint::normal ( ) const

◆ occluded_shape()

const SShape * Freestyle::CurvePoint::occluded_shape ( ) const

Definition at line 395 of file Curve.cpp.

References __A, and __B.

◆ occludee()

const Polygon3r & Freestyle::CurvePoint::occludee ( ) const

Definition at line 406 of file Curve.cpp.

References __A, and __B.

◆ occludee_empty()

bool Freestyle::CurvePoint::occludee_empty ( ) const

Definition at line 417 of file Curve.cpp.

References __A, and __B.

◆ occluders_begin()

occluder_container::const_iterator Freestyle::CurvePoint::occluders_begin ( ) const

Definition at line 351 of file Curve.cpp.

References __A, and __B.

◆ occluders_empty()

bool Freestyle::CurvePoint::occluders_empty ( ) const

Definition at line 373 of file Curve.cpp.

References __A, and __B.

◆ occluders_end()

occluder_container::const_iterator Freestyle::CurvePoint::occluders_end ( ) const

Definition at line 362 of file Curve.cpp.

References __A, and __B.

◆ occluders_size()

int Freestyle::CurvePoint::occluders_size ( ) const

Definition at line 384 of file Curve.cpp.

References __A, and __B.

◆ operator=()

CurvePoint & Freestyle::CurvePoint::operator= ( const CurvePoint & iBrother)

Operator =

Definition at line 177 of file Curve.cpp.

References __A, __B, _Point2d, _Point3d, _t2d, and CurvePoint().

◆ operator==()

bool Freestyle::CurvePoint::operator== ( const CurvePoint & b)
inline

Operator ==

Definition at line 228 of file Curve.h.

References __A, __B, _t2d, b, and CurvePoint().

◆ point2d()

const Vec3r & Freestyle::CurvePoint::point2d ( ) const
inline

◆ point3d()

const Vec3r & Freestyle::CurvePoint::point3d ( ) const
inline

Definition at line 294 of file Curve.h.

References _Point3d.

◆ setA()

void Freestyle::CurvePoint::setA ( SVertex * iA)
inline

Sets the first SVertex upon which to build the CurvePoint.

Definition at line 261 of file Curve.h.

References __A.

Referenced by Freestyle::Chain::push_viewedge_back().

◆ setB()

void Freestyle::CurvePoint::setB ( SVertex * iB)
inline

Sets the second SVertex upon which to build the CurvePoint.

Definition at line 267 of file Curve.h.

References __B.

◆ setT2d()

void Freestyle::CurvePoint::setT2d ( float t)
inline

Sets the 2D interpolation parameter to use.

Definition at line 273 of file Curve.h.

References _t2d.

◆ shape()

const SShape * Freestyle::CurvePoint::shape ( ) const

Definition at line 322 of file Curve.cpp.

References __A, and __B.

◆ t2d()

float Freestyle::CurvePoint::t2d ( ) const
inline

Returns the interpolation parameter.

Definition at line 247 of file Curve.h.

References _t2d.

Referenced by CurvePoint(), and getFEdge().

◆ z_discontinuity()

real Freestyle::CurvePoint::z_discontinuity ( ) const

Definition at line 428 of file Curve.cpp.

References __A, and __B.

Member Data Documentation

◆ __A

◆ __B

◆ _Point2d

◆ _Point3d

Vec3r Freestyle::CurvePoint::_Point3d
protected

Definition at line 190 of file Curve.h.

Referenced by CurvePoint(), CurvePoint(), CurvePoint(), getPoint3D(), getX(), getY(), getZ(), operator=(), and point3d().

◆ _t2d


The documentation for this class was generated from the following files: