Blender  V2.93
Public Member Functions | Public Attributes | List of all members
Freestyle::Controller Class Reference

#include <Controller.h>

Public Member Functions

 Controller ()
 
 ~Controller ()
 
void setView (AppView *iView)
 
void setRenderMonitor (RenderMonitor *iRenderMonitor)
 
void setPassDiffuse (float *buf, int width, int height)
 
void setPassZ (float *buf, int width, int height)
 
void setContext (bContext *C)
 
void init_options ()
 
int LoadMesh (Render *re, ViewLayer *view_layer, Depsgraph *depsgraph)
 
int Load3DSFile (const char *iFileName)
 
void CloseFile ()
 
void ComputeViewMap ()
 
void ComputeSteerableViewMap ()
 
void saveSteerableViewMapImages ()
 
void toggleEdgeTesselationNature (Nature::EdgeNature iNature)
 
int DrawStrokes ()
 
void ResetRenderCount ()
 
RenderRenderStrokes (Render *re, bool render)
 
void SwapStyleModules (unsigned i1, unsigned i2)
 
void InsertStyleModule (unsigned index, const char *iFileName)
 
void InsertStyleModule (unsigned index, const char *iName, const char *iBuffer)
 
void InsertStyleModule (unsigned index, const char *iName, struct Text *iText)
 
void AddStyleModule (const char *iFileName)
 
void RemoveStyleModule (unsigned index)
 
void ReloadStyleModule (unsigned index, const char *iFileName)
 
void Clear ()
 
void ClearRootNode ()
 
void DeleteWingedEdge ()
 
void DeleteViewMap (bool freeCache=false)
 
void toggleLayer (unsigned index, bool iDisplay)
 
void setModified (unsigned index, bool iMod)
 
void resetModified (bool iMod=false)
 
void updateCausalStyleModules (unsigned index)
 
void displayDensityCurves (int x, int y)
 
ViewEdgeSelectViewEdge (real x, real y)
 
FEdgeSelectFEdge (real x, real y)
 
NodeGroupBuildRep (vector< ViewEdge * >::iterator vedges_begin, vector< ViewEdge * >::iterator vedges_end)
 
void toggleVisibilityAlgo ()
 
void setVisibilityAlgo (int algo)
 
int getVisibilityAlgo ()
 
void setViewMapCache (bool iBool)
 
bool getViewMapCache () const
 
void setQuantitativeInvisibility (bool iBool)
 
bool getQuantitativeInvisibility () const
 
void setFaceSmoothness (bool iBool)
 
bool getFaceSmoothness () const
 
void setComputeRidgesAndValleysFlag (bool b)
 
bool getComputeRidgesAndValleysFlag () const
 
void setComputeSuggestiveContoursFlag (bool b)
 
bool getComputeSuggestiveContoursFlag () const
 
void setComputeMaterialBoundariesFlag (bool b)
 
bool getComputeMaterialBoundariesFlag () const
 
void setComputeSteerableViewMapFlag (bool iBool)
 
bool getComputeSteerableViewMapFlag () const
 
void setCreaseAngle (float angle)
 
float getCreaseAngle () const
 
void setSphereRadius (float s)
 
float getSphereRadius () const
 
void setSuggestiveContourKrDerivativeEpsilon (float dkr)
 
float getSuggestiveContourKrDerivativeEpsilon () const
 
void setModelsDir (const string &dir)
 
string getModelsDir () const
 
void setModulesDir (const string &dir)
 
string getModulesDir () const
 
bool hitViewMapCache ()
 
void resetInterpreter ()
 

Public Attributes

ViewMap_ViewMap
 
AppCanvas_Canvas
 

Detailed Description

Definition at line 49 of file Controller.h.

Constructor & Destructor Documentation

◆ Controller()

Freestyle::Controller::Controller ( )

◆ ~Controller()

Freestyle::Controller::~Controller ( )

Definition at line 135 of file Controller.cpp.

References _Canvas, _ViewMap, Freestyle::NodeGroup::destroy(), and NULL.

Member Function Documentation

◆ AddStyleModule()

void Freestyle::Controller::AddStyleModule ( const char *  iFileName)

Definition at line 960 of file Controller.cpp.

◆ BuildRep()

NodeGroup * Freestyle::Controller::BuildRep ( vector< ViewEdge * >::iterator  vedges_begin,
vector< ViewEdge * >::iterator  vedges_end 
)

◆ Clear()

void Freestyle::Controller::Clear ( )

Definition at line 970 of file Controller.cpp.

References _Canvas, and Freestyle::Canvas::Clear().

Referenced by FRS_end_stroke_rendering(), and FRS_init().

◆ ClearRootNode()

void Freestyle::Controller::ClearRootNode ( )

◆ CloseFile()

void Freestyle::Controller::CloseFile ( )

◆ ComputeSteerableViewMap()

void Freestyle::Controller::ComputeSteerableViewMap ( )

◆ ComputeViewMap()

void Freestyle::Controller::ComputeViewMap ( )

Definition at line 469 of file Controller.cpp.

References _ViewMap, Freestyle::AppView::Add2DSilhouette(), Freestyle::AppView::Add2DVisibleSilhouette(), Freestyle::AppView::AddDebug(), Freestyle::BaseObject::addRef(), Freestyle::AppView::AddSilhouette(), Freestyle::ViewMapBuilder::BuildViewMap(), ComputeSteerableViewMap(), DeleteViewMap(), DeleteWingedEdge(), Freestyle::FEdgeXDetector::enableFaceSmoothness(), Freestyle::FEdgeXDetector::enableMaterialBoundaries(), Freestyle::FEdgeXDetector::enableOrthographicProjection(), Freestyle::FEdgeXDetector::enableRidgesAndValleysFlag(), Freestyle::FEdgeXDetector::enableSuggestiveContours(), G, G_DEBUG_FREESTYLE, g_freestyle, Freestyle::AppView::GetAspect(), Freestyle::AppView::GetFocalLength(), Freestyle::AppView::GetFovyRadian(), FreestyleGlobals::mv, Freestyle::FEdgeXDetector::processShapes(), FreestyleGlobals::proj, resetModified(), Freestyle::FEdgeXDetector::setCreaseAngle(), Freestyle::ViewMapBuilder::setEnableQI(), Freestyle::ViewMapBuilder::setFrustum(), Freestyle::ViewMapBuilder::setGrid(), Freestyle::ViewMapTesselator::setNature(), Freestyle::FEdgeXDetector::setRenderMonitor(), Freestyle::ViewMapBuilder::setRenderMonitor(), Freestyle::ViewMap::setScene3dBBox(), Freestyle::FEdgeXDetector::setSphereRadius(), Freestyle::FEdgeXDetector::setSuggestiveContourKrDerivativeEpsilon(), Freestyle::ViewMapBuilder::setTransform(), Freestyle::FEdgeXDetector::setViewpoint(), Freestyle::ViewMapBuilder::setViewpoint(), Freestyle::Chronometer::start(), Freestyle::Chronometer::stop(), Freestyle::ViewMapTesselator::Tesselate(), Freestyle::RenderMonitor::testBreak(), UNPACK3, Freestyle::ViewMap::viewedges_size(), FreestyleGlobals::viewpoint, FreestyleGlobals::viewport, Freestyle::AppView::zfar(), and Freestyle::AppView::znear().

Referenced by prepare(), and toggleEdgeTesselationNature().

◆ DeleteViewMap()

void Freestyle::Controller::DeleteViewMap ( bool  freeCache = false)

◆ DeleteWingedEdge()

void Freestyle::Controller::DeleteWingedEdge ( )

Definition at line 405 of file Controller.cpp.

References Freestyle::FastGrid::clear().

Referenced by CloseFile(), ComputeViewMap(), and LoadMesh().

◆ displayDensityCurves()

void Freestyle::Controller::displayDensityCurves ( int  x,
int  y 
)

◆ DrawStrokes()

int Freestyle::Controller::DrawStrokes ( )

◆ getComputeMaterialBoundariesFlag()

bool Freestyle::Controller::getComputeMaterialBoundariesFlag ( ) const

Definition at line 863 of file Controller.cpp.

Referenced by prepare().

◆ getComputeRidgesAndValleysFlag()

bool Freestyle::Controller::getComputeRidgesAndValleysFlag ( ) const

Definition at line 843 of file Controller.cpp.

Referenced by prepare().

◆ getComputeSteerableViewMapFlag()

bool Freestyle::Controller::getComputeSteerableViewMapFlag ( ) const

Definition at line 873 of file Controller.cpp.

◆ getComputeSuggestiveContoursFlag()

bool Freestyle::Controller::getComputeSuggestiveContoursFlag ( ) const

Definition at line 853 of file Controller.cpp.

Referenced by prepare().

◆ getCreaseAngle()

float Freestyle::Controller::getCreaseAngle ( ) const
inline

Definition at line 138 of file Controller.h.

Referenced by prepare().

◆ getFaceSmoothness()

bool Freestyle::Controller::getFaceSmoothness ( ) const

Definition at line 833 of file Controller.cpp.

Referenced by prepare().

◆ getModelsDir()

string Freestyle::Controller::getModelsDir ( ) const

Definition at line 1036 of file Controller.cpp.

◆ getModulesDir()

string Freestyle::Controller::getModulesDir ( ) const

Definition at line 1048 of file Controller.cpp.

◆ getQuantitativeInvisibility()

bool Freestyle::Controller::getQuantitativeInvisibility ( ) const

Definition at line 823 of file Controller.cpp.

◆ getSphereRadius()

float Freestyle::Controller::getSphereRadius ( ) const
inline

Definition at line 146 of file Controller.h.

Referenced by prepare().

◆ getSuggestiveContourKrDerivativeEpsilon()

float Freestyle::Controller::getSuggestiveContourKrDerivativeEpsilon ( ) const
inline

Definition at line 154 of file Controller.h.

Referenced by prepare().

◆ getViewMapCache()

bool Freestyle::Controller::getViewMapCache ( ) const

Definition at line 813 of file Controller.cpp.

◆ getVisibilityAlgo()

int Freestyle::Controller::getVisibilityAlgo ( )

◆ hitViewMapCache()

bool Freestyle::Controller::hitViewMapCache ( )

Definition at line 223 of file Controller.cpp.

References _ViewMap, Freestyle::SceneHash::match(), and Freestyle::SceneHash::store().

Referenced by LoadMesh(), and prepare().

◆ init_options()

void Freestyle::Controller::init_options ( )

◆ InsertStyleModule() [1/3]

void Freestyle::Controller::InsertStyleModule ( unsigned  index,
const char *  iFileName 
)

Definition at line 937 of file Controller.cpp.

References _Canvas, BLI_path_extension_check(), and Freestyle::Canvas::InsertStyleModule().

Referenced by prepare().

◆ InsertStyleModule() [2/3]

void Freestyle::Controller::InsertStyleModule ( unsigned  index,
const char *  iName,
const char *  iBuffer 
)

Definition at line 948 of file Controller.cpp.

References _Canvas, and Freestyle::Canvas::InsertStyleModule().

◆ InsertStyleModule() [3/3]

void Freestyle::Controller::InsertStyleModule ( unsigned  index,
const char *  iName,
struct Text iText 
)

Definition at line 954 of file Controller.cpp.

References _Canvas, and Freestyle::Canvas::InsertStyleModule().

◆ Load3DSFile()

int Freestyle::Controller::Load3DSFile ( const char *  iFileName)

◆ LoadMesh()

int Freestyle::Controller::LoadMesh ( Render re,
ViewLayer view_layer,
Depsgraph depsgraph 
)

◆ ReloadStyleModule()

void Freestyle::Controller::ReloadStyleModule ( unsigned  index,
const char *  iFileName 
)

Definition at line 975 of file Controller.cpp.

References _Canvas, and Freestyle::Canvas::ReplaceStyleModule().

◆ RemoveStyleModule()

void Freestyle::Controller::RemoveStyleModule ( unsigned  index)

Definition at line 965 of file Controller.cpp.

References _Canvas, and Freestyle::Canvas::RemoveStyleModule().

◆ RenderStrokes()

Render * Freestyle::Controller::RenderStrokes ( Render re,
bool  render 
)

◆ resetInterpreter()

void Freestyle::Controller::resetInterpreter ( )

Definition at line 1055 of file Controller.cpp.

References Freestyle::Interpreter::reset().

◆ resetModified()

void Freestyle::Controller::resetModified ( bool  iMod = false)

Definition at line 1008 of file Controller.cpp.

References _Canvas, and Freestyle::Canvas::resetModified().

Referenced by ComputeViewMap(), and DrawStrokes().

◆ ResetRenderCount()

void Freestyle::Controller::ResetRenderCount ( )

Definition at line 900 of file Controller.cpp.

Referenced by FRS_init_stroke_renderer().

◆ saveSteerableViewMapImages()

void Freestyle::Controller::saveSteerableViewMapImages ( )

◆ SelectFEdge()

FEdge* Freestyle::Controller::SelectFEdge ( real  x,
real  y 
)

◆ SelectViewEdge()

ViewEdge* Freestyle::Controller::SelectViewEdge ( real  x,
real  y 
)

◆ setComputeMaterialBoundariesFlag()

void Freestyle::Controller::setComputeMaterialBoundariesFlag ( bool  b)

Definition at line 858 of file Controller.cpp.

Referenced by prepare().

◆ setComputeRidgesAndValleysFlag()

void Freestyle::Controller::setComputeRidgesAndValleysFlag ( bool  b)

Definition at line 838 of file Controller.cpp.

Referenced by prepare().

◆ setComputeSteerableViewMapFlag()

void Freestyle::Controller::setComputeSteerableViewMapFlag ( bool  iBool)

Definition at line 868 of file Controller.cpp.

Referenced by init_options().

◆ setComputeSuggestiveContoursFlag()

void Freestyle::Controller::setComputeSuggestiveContoursFlag ( bool  b)

Definition at line 848 of file Controller.cpp.

Referenced by prepare().

◆ setContext()

void Freestyle::Controller::setContext ( bContext C)

Definition at line 217 of file Controller.cpp.

References C, and Freestyle::PythonInterpreter::setContext().

Referenced by FRS_set_context().

◆ setCreaseAngle()

void Freestyle::Controller::setCreaseAngle ( float  angle)
inline

Definition at line 134 of file Controller.h.

References angle().

Referenced by prepare().

◆ setFaceSmoothness()

void Freestyle::Controller::setFaceSmoothness ( bool  iBool)

Definition at line 828 of file Controller.cpp.

Referenced by prepare().

◆ setModelsDir()

void Freestyle::Controller::setModelsDir ( const string &  dir)

Definition at line 1031 of file Controller.cpp.

◆ setModified()

void Freestyle::Controller::setModified ( unsigned  index,
bool  iMod 
)

◆ setModulesDir()

void Freestyle::Controller::setModulesDir ( const string &  dir)

Definition at line 1043 of file Controller.cpp.

◆ setPassDiffuse()

void Freestyle::Controller::setPassDiffuse ( float buf,
int  width,
int  height 
)

Definition at line 203 of file Controller.cpp.

References _Canvas, BLI_assert, height, Freestyle::AppCanvas::setPassDiffuse(), and width.

Referenced by CloseFile(), init_options(), and prepare().

◆ setPassZ()

void Freestyle::Controller::setPassZ ( float buf,
int  width,
int  height 
)

Definition at line 210 of file Controller.cpp.

References _Canvas, BLI_assert, height, Freestyle::AppCanvas::setPassZ(), and width.

Referenced by CloseFile(), init_options(), and prepare().

◆ setQuantitativeInvisibility()

void Freestyle::Controller::setQuantitativeInvisibility ( bool  iBool)

Definition at line 818 of file Controller.cpp.

Referenced by init_options().

◆ setRenderMonitor()

void Freestyle::Controller::setRenderMonitor ( RenderMonitor iRenderMonitor)

Definition at line 198 of file Controller.cpp.

Referenced by FRS_do_stroke_rendering().

◆ setSphereRadius()

void Freestyle::Controller::setSphereRadius ( float  s)
inline

Definition at line 142 of file Controller.h.

Referenced by prepare().

◆ setSuggestiveContourKrDerivativeEpsilon()

void Freestyle::Controller::setSuggestiveContourKrDerivativeEpsilon ( float  dkr)
inline

Definition at line 150 of file Controller.h.

Referenced by prepare().

◆ setView()

void Freestyle::Controller::setView ( AppView iView)

Definition at line 188 of file Controller.cpp.

References _Canvas, and Freestyle::AppCanvas::setViewer().

Referenced by FRS_init().

◆ setViewMapCache()

void Freestyle::Controller::setViewMapCache ( bool  iBool)

Definition at line 808 of file Controller.cpp.

Referenced by FRS_do_stroke_rendering().

◆ setVisibilityAlgo()

void Freestyle::Controller::setVisibilityAlgo ( int  algo)

◆ SwapStyleModules()

void Freestyle::Controller::SwapStyleModules ( unsigned  i1,
unsigned  i2 
)

Definition at line 981 of file Controller.cpp.

References _Canvas, i1, and Freestyle::Canvas::SwapStyleModules().

◆ toggleEdgeTesselationNature()

void Freestyle::Controller::toggleEdgeTesselationNature ( Nature::EdgeNature  iNature)

Definition at line 1025 of file Controller.cpp.

References ComputeViewMap().

◆ toggleLayer()

void Freestyle::Controller::toggleLayer ( unsigned  index,
bool  iDisplay 
)

Definition at line 986 of file Controller.cpp.

References _Canvas, and Freestyle::Canvas::setVisible().

Referenced by prepare().

◆ toggleVisibilityAlgo()

void Freestyle::Controller::toggleVisibilityAlgo ( )

◆ updateCausalStyleModules()

void Freestyle::Controller::updateCausalStyleModules ( unsigned  index)

Member Data Documentation

◆ _Canvas

AppCanvas* Freestyle::Controller::_Canvas

◆ _ViewMap

ViewMap* Freestyle::Controller::_ViewMap

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