Blender V4.3
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 50 of file Curve.h.

Member Typedef Documentation

◆ vertex_type

Definition at line 184 of file Curve.h.

Constructor & Destructor Documentation

◆ CurvePoint() [1/4]

Freestyle::CurvePoint::CurvePoint ( )

Default Constructor.

Definition at line 29 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 36 of file Curve.cpp.

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

◆ 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, G, G_DEBUG_FREESTYLE, getPoint2D(), Freestyle::SVertex::getPoint2D(), point2d(), Freestyle::SVertex::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, 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 237 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 243 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 160 of file Curve.h.

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

◆ castToSVertex()

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

Cast the Interface0D in SVertex if it can be.

Reimplemented from Freestyle::Interface0D.

Definition at line 136 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 172 of file Curve.h.

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

◆ castToViewVertex()

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

Cast the Interface0D in ViewVertex if it can be.

Reimplemented from Freestyle::Interface0D.

Definition at line 148 of file Curve.h.

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

◆ fedge()

FEdge * Freestyle::CurvePoint::fedge ( )

Definition at line 187 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 53 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 110 of file Curve.h.

References __A, __B, _t2d, and Freestyle::SVertex::getId().

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 123 of file Curve.h.

References __A, __B, _t2d, Freestyle::SVertex::getNature(), and Freestyle::Nature::POINT.

Referenced by fedge().

◆ getPoint2D()

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

◆ getPoint3D()

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

Returns the 3D point.

Reimplemented from Freestyle::Interface0D.

Definition at line 78 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 84 of file Curve.h.

References _Point2d, and Freestyle::VecMat::Vec3< T >::x().

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 90 of file Curve.h.

References _Point2d, and Freestyle::VecMat::Vec3< T >::y().

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 96 of file Curve.h.

References _Point2d, and Freestyle::VecMat::Vec3< T >::z().

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 60 of file Curve.h.

References _Point3d, and Freestyle::VecMat::Vec3< T >::x().

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 66 of file Curve.h.

References _Point3d, and Freestyle::VecMat::Vec3< T >::y().

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 72 of file Curve.h.

References _Point3d, and Freestyle::VecMat::Vec3< T >::z().

Referenced by Freestyle::operator<<().

◆ normal()

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

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

◆ operator==()

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

Operator ==

Definition at line 230 of file Curve.h.

References __A, __B, _t2d, and b.

◆ point2d()

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

◆ point3d()

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

Definition at line 296 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 263 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 269 of file Curve.h.

References __B.

◆ setT2d()

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

Sets the 2D interpolation parameter to use.

Definition at line 275 of file Curve.h.

References _t2d.

◆ shape()

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

Definition at line 322 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 249 of file Curve.h.

References _t2d.

Referenced by CurvePoint(), and getFEdge().

◆ z_discontinuity()

real Freestyle::CurvePoint::z_discontinuity ( ) const

Member Data Documentation

◆ __A

◆ __B

◆ _Point2d

◆ _Point3d

Vec3r Freestyle::CurvePoint::_Point3d
protected

Definition at line 192 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: