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

#include <Silhouette.h>

Public Member Functions

 SShape ()
 
 SShape (SShape &iBrother)
 
virtual SShapeduplicate ()
 
virtual ~SShape ()
 
void AddEdge (FEdge *iEdge)
 
void AddNewVertex (SVertex *iv)
 
void AddChain (FEdge *iEdge)
 
SVertexCreateSVertex (const Vec3r &P3D, const Vec3r &P2D, const Id &id)
 
void SplitEdge (FEdge *fe, const vector< Vec2r > &iParameters, vector< FEdge * > &ioNewEdges)
 
FEdgeSplitEdgeIn2 (FEdge *ioEdge, SVertex *ioNewVertex)
 
void setBBox (const BBox< Vec3r > &iBBox)
 
void ComputeBBox ()
 
void RemoveEdgeFromChain (FEdge *iEdge)
 
void RemoveEdge (FEdge *iEdge)
 
vector< SVertex * > & getVertexList ()
 
vector< FEdge * > & getEdgeList ()
 
vector< FEdge * > & getChains ()
 
const BBox< Vec3r > & bbox ()
 
const FrsMaterialfrs_material (unsigned i) const
 
const vector< FrsMaterial > & frs_materials () const
 
ViewShapeviewShape ()
 
float importance () const
 
Id getId () const
 
const string & getName () const
 
const string & getLibraryPath () const
 
void setId (Id id)
 
void setName (const string &name)
 
void setLibraryPath (const string &path)
 
void setFrsMaterials (const vector< FrsMaterial > &iMaterials)
 
void setViewShape (ViewShape *iShape)
 
void setImportance (float importance)
 

Public Attributes

voiduserdata
 

Detailed Description

Class to define a feature shape. It is the gathering of feature elements from an identified input shape

Definition at line 1404 of file Silhouette.h.

Constructor & Destructor Documentation

◆ SShape() [1/2]

Freestyle::SShape::SShape ( )
inline

Default constructor

Definition at line 1426 of file Silhouette.h.

References NULL.

◆ SShape() [2/2]

Freestyle::SShape::SShape ( SShape iBrother)
inline

◆ ~SShape()

virtual Freestyle::SShape::~SShape ( )
inlinevirtual

Destructor.

Clear the chains list

Definition at line 1525 of file Silhouette.h.

References e.

Member Function Documentation

◆ AddChain()

void Freestyle::SShape::AddChain ( FEdge iEdge)
inline

Definition at line 1565 of file Silhouette.h.

Referenced by Freestyle::ViewMap::InsertViewVertex().

◆ AddEdge()

void Freestyle::SShape::AddEdge ( FEdge iEdge)
inline

Adds a FEdge to the list of FEdges.

Definition at line 1551 of file Silhouette.h.

Referenced by Freestyle::Chain::push_viewedge_back(), and Freestyle::Chain::push_viewedge_front().

◆ AddNewVertex()

void Freestyle::SShape::AddNewVertex ( SVertex iv)
inline

Adds a SVertex to the list of SVertex of this Shape. The SShape attribute of the SVertex is also set to 'this'.

Definition at line 1559 of file Silhouette.h.

References Freestyle::SVertex::setShape().

◆ bbox()

const BBox<Vec3r>& Freestyle::SShape::bbox ( )
inline

Returns the bounding box of the shape.

Definition at line 1860 of file Silhouette.h.

Referenced by SShape().

◆ ComputeBBox()

void Freestyle::SShape::ComputeBBox ( )
inline

Compute the bbox of the sshape

Definition at line 1769 of file Silhouette.h.

References v, x, y, and z.

Referenced by Freestyle::ViewMapBuilder::computeInitialViewEdges().

◆ CreateSVertex()

SVertex* Freestyle::SShape::CreateSVertex ( const Vec3r P3D,
const Vec3r P2D,
const Id id 
)
inline

Definition at line 1570 of file Silhouette.h.

References Freestyle::SVertex::setPoint2D().

Referenced by Freestyle::ViewMap::CreateTVertex().

◆ duplicate()

virtual SShape* Freestyle::SShape::duplicate ( )
inlinevirtual

Cloning method.

Definition at line 1518 of file Silhouette.h.

◆ frs_material()

const FrsMaterial& Freestyle::SShape::frs_material ( unsigned  i) const
inline

Returns the ith material of the shape.

Definition at line 1866 of file Silhouette.h.

Referenced by Freestyle::FEdgeSharp::aFrsMaterial(), Freestyle::FEdgeSharp::bFrsMaterial(), and Freestyle::FEdgeSmooth::frs_material().

◆ frs_materials()

const vector<FrsMaterial>& Freestyle::SShape::frs_materials ( ) const
inline

Returns the list of materials of the Shape.

Definition at line 1872 of file Silhouette.h.

◆ getChains()

vector<FEdge *>& Freestyle::SShape::getChains ( )
inline

Definition at line 1854 of file Silhouette.h.

Referenced by SShape().

◆ getEdgeList()

vector<FEdge *>& Freestyle::SShape::getEdgeList ( )
inline

Returns the list of FEdges of the Shape.

Definition at line 1849 of file Silhouette.h.

Referenced by SShape().

◆ getId()

Id Freestyle::SShape::getId ( ) const
inline

◆ getLibraryPath()

const string& Freestyle::SShape::getLibraryPath ( ) const
inline

Returns the library path of the Shape.

Definition at line 1900 of file Silhouette.h.

Referenced by Freestyle::ViewShape::getLibraryPath().

◆ getName()

const string& Freestyle::SShape::getName ( ) const
inline

Returns the name of the Shape.

Definition at line 1894 of file Silhouette.h.

Referenced by Freestyle::ViewShape::getName().

◆ getVertexList()

vector<SVertex *>& Freestyle::SShape::getVertexList ( )
inline

Returns the list of SVertex of the Shape.

Definition at line 1843 of file Silhouette.h.

Referenced by SShape().

◆ importance()

float Freestyle::SShape::importance ( ) const
inline

◆ RemoveEdge()

void Freestyle::SShape::RemoveEdge ( FEdge iEdge)
inline

Definition at line 1830 of file Silhouette.h.

Referenced by Freestyle::ViewShape::RemoveEdge().

◆ RemoveEdgeFromChain()

void Freestyle::SShape::RemoveEdgeFromChain ( FEdge iEdge)
inline

◆ setBBox()

void Freestyle::SShape::setBBox ( const BBox< Vec3r > &  iBBox)
inline

Sets the Bounding Box of the Shape

Definition at line 1763 of file Silhouette.h.

◆ setFrsMaterials()

void Freestyle::SShape::setFrsMaterials ( const vector< FrsMaterial > &  iMaterials)
inline

Sets the list of materials for the shape

Definition at line 1925 of file Silhouette.h.

Referenced by Freestyle::ViewMapBuilder::computeInitialViewEdges().

◆ setId()

void Freestyle::SShape::setId ( Id  id)
inline

Sets the Id of the shape.

Definition at line 1907 of file Silhouette.h.

References id.

Referenced by Freestyle::ViewMapBuilder::computeInitialViewEdges().

◆ setImportance()

void Freestyle::SShape::setImportance ( float  importance)
inline

Definition at line 1935 of file Silhouette.h.

◆ setLibraryPath()

void Freestyle::SShape::setLibraryPath ( const string &  path)
inline

Sets the library path of the shape.

Definition at line 1919 of file Silhouette.h.

Referenced by Freestyle::ViewMapBuilder::computeInitialViewEdges().

◆ setName()

void Freestyle::SShape::setName ( const string &  name)
inline

Sets the name of the shape.

Definition at line 1913 of file Silhouette.h.

Referenced by Freestyle::ViewMapBuilder::computeInitialViewEdges().

◆ setViewShape()

void Freestyle::SShape::setViewShape ( ViewShape iShape)
inline

Definition at line 1930 of file Silhouette.h.

◆ SplitEdge()

void Freestyle::SShape::SplitEdge ( FEdge fe,
const vector< Vec2r > &  iParameters,
vector< FEdge * > &  ioNewEdges 
)
inline

Splits an edge into several edges. The edge's vertices are passed rather than the edge itself. This way, all feature edges (SILHOUETTE, CREASE, BORDER) are split in the same time. The processed edges are flagged as done (using the user-data flag).One single new vertex is created whereas several split edges might created for the different kinds of edges. These new elements are added to the lists maintained by the shape. New chains are also created. ioA The first vertex for the edge that gets split. ioB The second vertex for the edge that gets split. iParameters A vector containing 2D real vectors indicating the parameters giving the intersections coordinates in 3D and in 2D. These intersections points must be sorted from B to A. Each parameter defines the intersection point I as I=A+T*AB. T<0 and T>1 are then incorrect insofar as they give intersections points that lie outside the segment. ioNewEdges The edges that are newly created (the initial edges are not included) are added to this list.

Definition at line 1596 of file Silhouette.h.

References A, Freestyle::a, Freestyle::FEdgeSharp::aFrsMaterialIndex(), B, usdtokens::b(), Freestyle::FEdgeSharp::bFrsMaterialIndex(), Freestyle::FEdgeSmooth::frs_materialIndex(), Freestyle::Id::getFirst(), Freestyle::SVertex::getId(), Freestyle::FEdge::getId(), Freestyle::Id::getSecond(), id, Freestyle::FEdge::isSmooth(), Freestyle::FEdge::nextEdge(), NULL, Freestyle::SVertex::point2D(), Freestyle::SVertex::point3D(), Freestyle::SVertex::Replace(), Freestyle::FEdgeSharp::setaFrsMaterialIndex(), Freestyle::FEdgeSharp::setbFrsMaterialIndex(), Freestyle::FEdgeSmooth::setFrsMaterialIndex(), Freestyle::FEdge::setId(), Freestyle::FEdge::setNature(), Freestyle::FEdge::setNextEdge(), Freestyle::SVertex::setPoint2D(), Freestyle::FEdge::setPreviousEdge(), T, t, Freestyle::FEdge::vertexA(), and Freestyle::FEdge::vertexB().

◆ SplitEdgeIn2()

FEdge* Freestyle::SShape::SplitEdgeIn2 ( FEdge ioEdge,
SVertex ioNewVertex 
)
inline

◆ viewShape()

ViewShape* Freestyle::SShape::viewShape ( )
inline

Definition at line 1877 of file Silhouette.h.

Member Data Documentation

◆ userdata

void* Freestyle::SShape::userdata

A field that can be used by the user to store any data. This field must be reset afterwards using ResetUserData().

Definition at line 1423 of file Silhouette.h.


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