Blender  V3.3
Public Types | Public Member Functions | Protected Attributes | List of all members
Freestyle::CurvePoint Class Reference

#include <Curve.h>

Inheritance diagram for Freestyle::CurvePoint:
Freestyle::Interface0D 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

Definition at line 182 of file Curve.h.

Constructor & Destructor Documentation

◆ CurvePoint() [1/4]

Freestyle::CurvePoint::CurvePoint ( )

Default Constructor.

Definition at line 27 of file Curve.cpp.

References __A, __B, and _t2d.

◆ 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 34 of file Curve.cpp.

References __A, __B, _Point2d, _Point3d, _t2d, Freestyle::SVertex::point2d(), Freestyle::SVertex::point3d(), and t.

◆ 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 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().

◆ CurvePoint() [4/4]

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

Copy Constructor.

Definition at line 162 of file Curve.cpp.

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

◆ ~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.

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.

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 Freestyle::NonTVertex::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.

◆ 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 Freestyle::TVertex::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 Freestyle::Interface0D::castToViewVertex().

◆ fedge()

FEdge * Freestyle::CurvePoint::fedge ( )

Definition at line 181 of file Curve.cpp.

References __A, Freestyle::SVertex::fedge(), 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 id.

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 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.

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.

◆ 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.

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.

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.

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.

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.

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.

Referenced by Freestyle::operator<<().

◆ normal()

Vec3r Freestyle::CurvePoint::normal ( ) const

◆ occluded_shape()

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

◆ occludee()

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

◆ occludee_empty()

bool Freestyle::CurvePoint::occludee_empty ( ) const

◆ occluders_begin()

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

◆ occluders_empty()

bool Freestyle::CurvePoint::occluders_empty ( ) const

◆ occluders_end()

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

◆ occluders_size()

int Freestyle::CurvePoint::occluders_size ( ) const

◆ operator=()

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

Operator =

Definition at line 171 of file Curve.cpp.

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

◆ operator==()

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

Operator ==

Definition at line 228 of file Curve.h.

References usdtokens::b().

◆ point2d()

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

◆ point3d()

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

Definition at line 294 of file Curve.h.

◆ 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.

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.

◆ setT2d()

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

Sets the 2D interpolation parameter to use.

Definition at line 273 of file Curve.h.

References t.

◆ shape()

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

Definition at line 315 of file Curve.cpp.

References __A, __B, and Freestyle::SVertex::shape().

◆ t2d()

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

Returns the interpolation parameter.

Definition at line 247 of file Curve.h.

Referenced by CurvePoint(), and getFEdge().

◆ z_discontinuity()

real Freestyle::CurvePoint::z_discontinuity ( ) const

Member Data Documentation

◆ __A

SVertex* Freestyle::CurvePoint::__A
protected

◆ __B

SVertex* Freestyle::CurvePoint::__B
protected

◆ _Point2d

Vec3r Freestyle::CurvePoint::_Point2d
protected

◆ _Point3d

Vec3r Freestyle::CurvePoint::_Point3d
protected

Definition at line 190 of file Curve.h.

Referenced by CurvePoint(), and operator=().

◆ _t2d

float Freestyle::CurvePoint::_t2d
protected

Definition at line 187 of file Curve.h.

Referenced by CurvePoint(), getFEdge(), normal(), and operator=().


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