Blender
V3.3
|
#include <Controller.h>
Public Attributes | |
ViewMap * | _ViewMap |
AppCanvas * | _Canvas |
Definition at line 39 of file Controller.h.
Freestyle::Controller::Controller | ( | ) |
Definition at line 60 of file Controller.cpp.
References _Canvas, _ViewMap, Freestyle::BaseObject::addRef(), Freestyle::Config::APPLICATION_NAME(), Freestyle::Nature::BORDER, Freestyle::Nature::CREASE, Freestyle::Config::DIR_SEP(), Freestyle::Config::Path::getHomeDir(), Freestyle::Config::Path::getInstance(), init_options(), NULL, Freestyle::Config::OPTIONS_CURRENT_DIRS_FILE(), Freestyle::Config::OPTIONS_DIR(), Freestyle::ViewMapBuilder::ray_casting_adaptive_traditional, and Freestyle::Nature::SILHOUETTE.
Freestyle::Controller::~Controller | ( | ) |
Definition at line 120 of file Controller.cpp.
References _Canvas, _ViewMap, Freestyle::NodeGroup::destroy(), and NULL.
void Freestyle::Controller::AddStyleModule | ( | const char * | iFileName | ) |
Definition at line 945 of file Controller.cpp.
NodeGroup * Freestyle::Controller::BuildRep | ( | vector< ViewEdge * >::iterator | vedges_begin, |
vector< ViewEdge * >::iterator | vedges_end | ||
) |
Definition at line 999 of file Controller.cpp.
References Freestyle::FrsMaterial::setDiffuse(), Freestyle::ViewMapTesselator::setFrsMaterial(), and Freestyle::ViewMapTesselator::Tesselate().
void Freestyle::Controller::Clear | ( | ) |
Definition at line 955 of file Controller.cpp.
References _Canvas, and Freestyle::Canvas::Clear().
Referenced by FRS_end_stroke_rendering(), and FRS_init().
void Freestyle::Controller::ClearRootNode | ( | ) |
Definition at line 378 of file Controller.cpp.
References Freestyle::BaseObject::addRef(), Freestyle::Node::clearBBox(), Freestyle::NodeGroup::destroy(), and Freestyle::AppView::DetachModel().
Referenced by CloseFile(), and LoadMesh().
void Freestyle::Controller::CloseFile | ( | ) |
Definition at line 360 of file Controller.cpp.
References _Canvas, Freestyle::Canvas::Clear(), ClearRootNode(), DeleteViewMap(), DeleteWingedEdge(), Freestyle::WShape::setCurrentId(), setPassDiffuse(), and setPassZ().
Referenced by FRS_do_stroke_rendering().
void Freestyle::Controller::ComputeSteerableViewMap | ( | ) |
Definition at line 623 of file Controller.cpp.
References _Canvas, _ViewMap, Freestyle::NodeGroup::AddChild(), Freestyle::SteerableViewMap::AddFEdge(), Freestyle::NodeShape::AddRep(), Freestyle::SteerableViewMap::buildImagesPyramids(), Freestyle::c, Freestyle::NodeGroup::destroy(), Freestyle::ViewMap::FEdges(), G, G_DEBUG_FREESTYLE, Freestyle::GrayImage::getArray(), Freestyle::Canvas::getSteerableViewMap(), Freestyle::AppView::height(), Freestyle::FrsImage::height(), Freestyle::Canvas::NB_STEERABLE_VIEWMAP, Freestyle::GrayImage::pixel(), Freestyle::SteerableViewMap::Reset(), Freestyle::GrayImage::setPixel(), v, Freestyle::AppView::width(), Freestyle::FrsImage::width(), Freestyle::x, and y.
Referenced by ComputeViewMap().
void Freestyle::Controller::ComputeViewMap | ( | ) |
Definition at line 454 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().
Definition at line 406 of file Controller.cpp.
References _ViewMap, Freestyle::ViewMap::Clean(), Freestyle::AppView::DetachDebug(), Freestyle::AppView::DetachSilhouette(), and NULL.
Referenced by CloseFile(), ComputeViewMap(), DrawStrokes(), and FRS_free_view_map_cache().
void Freestyle::Controller::DeleteWingedEdge | ( | ) |
Definition at line 390 of file Controller.cpp.
References Freestyle::FastGrid::clear().
Referenced by CloseFile(), ComputeViewMap(), and LoadMesh().
void Freestyle::Controller::displayDensityCurves | ( | int | x, |
int | y | ||
) |
Definition at line 1047 of file Controller.cpp.
References _Canvas, curves, Freestyle::SteerableViewMap::getNumberOfOrientations(), Freestyle::SteerableViewMap::getNumberOfPyramidLevels(), Freestyle::Canvas::getSteerableViewMap(), Freestyle::SteerableViewMap::readSteerableViewMapPixel(), Freestyle::x, and y.
int Freestyle::Controller::DrawStrokes | ( | ) |
Definition at line 863 of file Controller.cpp.
References _Canvas, _ViewMap, DeleteViewMap(), Freestyle::Canvas::Draw(), G, G_DEBUG_FREESTYLE, Freestyle::Canvas::getStrokeCount(), resetModified(), Freestyle::Chronometer::start(), and Freestyle::Chronometer::stop().
Referenced by FRS_do_stroke_rendering().
bool Freestyle::Controller::getComputeMaterialBoundariesFlag | ( | ) | const |
Definition at line 848 of file Controller.cpp.
Referenced by prepare().
bool Freestyle::Controller::getComputeRidgesAndValleysFlag | ( | ) | const |
Definition at line 828 of file Controller.cpp.
Referenced by prepare().
bool Freestyle::Controller::getComputeSteerableViewMapFlag | ( | ) | const |
Definition at line 858 of file Controller.cpp.
bool Freestyle::Controller::getComputeSuggestiveContoursFlag | ( | ) | const |
Definition at line 838 of file Controller.cpp.
Referenced by prepare().
|
inline |
Definition at line 128 of file Controller.h.
Referenced by prepare().
bool Freestyle::Controller::getFaceSmoothness | ( | ) | const |
Definition at line 818 of file Controller.cpp.
Referenced by prepare().
string Freestyle::Controller::getModelsDir | ( | ) | const |
Definition at line 1021 of file Controller.cpp.
string Freestyle::Controller::getModulesDir | ( | ) | const |
Definition at line 1033 of file Controller.cpp.
bool Freestyle::Controller::getQuantitativeInvisibility | ( | ) | const |
Definition at line 808 of file Controller.cpp.
|
inline |
Definition at line 136 of file Controller.h.
Referenced by prepare().
|
inline |
Definition at line 144 of file Controller.h.
Referenced by prepare().
bool Freestyle::Controller::getViewMapCache | ( | ) | const |
Definition at line 798 of file Controller.cpp.
int Freestyle::Controller::getVisibilityAlgo | ( | ) |
Definition at line 769 of file Controller.cpp.
References FREESTYLE_ALGO_ADAPTIVE_CUMULATIVE, FREESTYLE_ALGO_ADAPTIVE_TRADITIONAL, FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE, FREESTYLE_ALGO_CULLED_ADAPTIVE_TRADITIONAL, FREESTYLE_ALGO_FAST, FREESTYLE_ALGO_REGULAR, FREESTYLE_ALGO_VERYFAST, Freestyle::ViewMapBuilder::ray_casting, Freestyle::ViewMapBuilder::ray_casting_adaptive_cumulative, Freestyle::ViewMapBuilder::ray_casting_adaptive_traditional, Freestyle::ViewMapBuilder::ray_casting_culled_adaptive_cumulative, Freestyle::ViewMapBuilder::ray_casting_culled_adaptive_traditional, Freestyle::ViewMapBuilder::ray_casting_fast, and Freestyle::ViewMapBuilder::ray_casting_very_fast.
bool Freestyle::Controller::hitViewMapCache | ( | ) |
Definition at line 208 of file Controller.cpp.
References _ViewMap, Freestyle::SceneHash::match(), and Freestyle::SceneHash::store().
Referenced by LoadMesh(), and prepare().
void Freestyle::Controller::init_options | ( | ) |
Definition at line 1093 of file Controller.cpp.
References _Canvas, Freestyle::Config::Path::getInstance(), Freestyle::Config::Path::getModelsPath(), Freestyle::Config::Path::getPatternsPath(), Freestyle::AppCanvas::init(), Freestyle::TextureManager::Options::setBrushesPath(), setComputeSteerableViewMapFlag(), setPassDiffuse(), setPassZ(), Freestyle::TextureManager::Options::setPatternsPath(), and setQuantitativeInvisibility().
Referenced by Controller().
void Freestyle::Controller::InsertStyleModule | ( | unsigned | index, |
const char * | iFileName | ||
) |
Definition at line 922 of file Controller.cpp.
References _Canvas, BLI_path_extension_check(), and Freestyle::Canvas::InsertStyleModule().
Referenced by prepare().
void Freestyle::Controller::InsertStyleModule | ( | unsigned | index, |
const char * | iName, | ||
const char * | iBuffer | ||
) |
Definition at line 933 of file Controller.cpp.
References _Canvas, and Freestyle::Canvas::InsertStyleModule().
void Freestyle::Controller::InsertStyleModule | ( | unsigned | index, |
const char * | iName, | ||
struct Text * | iText | ||
) |
Definition at line 939 of file Controller.cpp.
References _Canvas, and Freestyle::Canvas::InsertStyleModule().
int Freestyle::Controller::Load3DSFile | ( | const char * | iFileName | ) |
Definition at line 220 of file Controller.cpp.
References _ViewMap, Freestyle::NodeGroup::accept(), Freestyle::NodeGroup::AddChild(), basename(), Freestyle::Node::bbox(), BLI_path_normalize(), BLI_strncpy(), ClearRootNode(), DeleteWingedEdge(), depsgraph, Freestyle::NodeGroup::destroy(), FILE_MAX, G, G_DEBUG_FREESTYLE, g_freestyle, Freestyle::WingedEdge::getNumFaces(), Freestyle::WingedEdgeBuilder::getWingedEdge(), hitViewMapCache(), Freestyle::BlenderFileLoader::Load(), norm(), NULL, Freestyle::NodeGroup::numberOfChildren(), Freestyle::BlenderFileLoader::numFacesRead(), FreestyleGlobals::proj, Freestyle::SceneHash::reset(), Render::scene, Freestyle::AppView::setDebug(), Freestyle::AppView::setModel(), Freestyle::NodeCamera::setProjectionMatrix(), Freestyle::BlenderFileLoader::setRenderMonitor(), Freestyle::WingedEdgeBuilder::setRenderMonitor(), Freestyle::Chronometer::start(), Freestyle::Chronometer::stop(), Freestyle::RenderMonitor::testBreak(), Freestyle::SceneHash::toString(), and Freestyle::NodeGroup::UpdateBBox().
Referenced by prepare().
void Freestyle::Controller::ReloadStyleModule | ( | unsigned | index, |
const char * | iFileName | ||
) |
Definition at line 960 of file Controller.cpp.
References _Canvas, and Freestyle::Canvas::ReplaceStyleModule().
void Freestyle::Controller::RemoveStyleModule | ( | unsigned | index | ) |
Definition at line 950 of file Controller.cpp.
References _Canvas, and Freestyle::Canvas::RemoveStyleModule().
Definition at line 890 of file Controller.cpp.
References _Canvas, G, G_DEBUG_FREESTYLE, Freestyle::BlenderStrokeRenderer::GenerateScene(), MEM_get_memory_in_use, MEM_get_peak_memory, mem_in_use, Freestyle::Canvas::Render(), Freestyle::BlenderStrokeRenderer::RenderScene(), Freestyle::Chronometer::start(), and Freestyle::Chronometer::stop().
Referenced by FRS_do_stroke_rendering().
void Freestyle::Controller::resetInterpreter | ( | ) |
Definition at line 1040 of file Controller.cpp.
References Freestyle::Interpreter::reset().
Definition at line 993 of file Controller.cpp.
References _Canvas, and Freestyle::Canvas::resetModified().
Referenced by ComputeViewMap(), and DrawStrokes().
void Freestyle::Controller::ResetRenderCount | ( | ) |
Definition at line 885 of file Controller.cpp.
Referenced by FRS_init_stroke_renderer().
void Freestyle::Controller::saveSteerableViewMapImages | ( | ) |
Definition at line 719 of file Controller.cpp.
References _Canvas, Freestyle::Canvas::getSteerableViewMap(), and Freestyle::SteerableViewMap::saveSteerableViewMap().
Definition at line 853 of file Controller.cpp.
Referenced by init_options().
Definition at line 202 of file Controller.cpp.
References C, and Freestyle::PythonInterpreter::setContext().
Referenced by FRS_set_context().
Definition at line 813 of file Controller.cpp.
Referenced by prepare().
void Freestyle::Controller::setModelsDir | ( | const string & | dir | ) |
Definition at line 1016 of file Controller.cpp.
Definition at line 976 of file Controller.cpp.
References _Canvas, Freestyle::Canvas::setModified(), and updateCausalStyleModules().
void Freestyle::Controller::setModulesDir | ( | const string & | dir | ) |
Definition at line 1028 of file Controller.cpp.
Definition at line 188 of file Controller.cpp.
References _Canvas, BLI_assert, height, Freestyle::AppCanvas::setPassDiffuse(), and width.
Referenced by CloseFile(), init_options(), and prepare().
Definition at line 195 of file Controller.cpp.
References _Canvas, BLI_assert, height, Freestyle::AppCanvas::setPassZ(), and width.
Referenced by CloseFile(), init_options(), and prepare().
Definition at line 803 of file Controller.cpp.
Referenced by init_options().
void Freestyle::Controller::setRenderMonitor | ( | RenderMonitor * | iRenderMonitor | ) |
Definition at line 183 of file Controller.cpp.
Referenced by FRS_do_stroke_rendering().
Definition at line 132 of file Controller.h.
Referenced by prepare().
Definition at line 140 of file Controller.h.
Referenced by prepare().
Definition at line 173 of file Controller.cpp.
References _Canvas, and Freestyle::AppCanvas::setViewer().
Referenced by FRS_init().
Definition at line 793 of file Controller.cpp.
Referenced by FRS_do_stroke_rendering().
void Freestyle::Controller::setVisibilityAlgo | ( | int | algo | ) |
Definition at line 742 of file Controller.cpp.
References FREESTYLE_ALGO_ADAPTIVE_CUMULATIVE, FREESTYLE_ALGO_ADAPTIVE_TRADITIONAL, FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE, FREESTYLE_ALGO_CULLED_ADAPTIVE_TRADITIONAL, FREESTYLE_ALGO_FAST, FREESTYLE_ALGO_REGULAR, FREESTYLE_ALGO_VERYFAST, Freestyle::ViewMapBuilder::ray_casting, Freestyle::ViewMapBuilder::ray_casting_adaptive_cumulative, Freestyle::ViewMapBuilder::ray_casting_adaptive_traditional, Freestyle::ViewMapBuilder::ray_casting_culled_adaptive_cumulative, Freestyle::ViewMapBuilder::ray_casting_culled_adaptive_traditional, Freestyle::ViewMapBuilder::ray_casting_fast, and Freestyle::ViewMapBuilder::ray_casting_very_fast.
Referenced by prepare().
void Freestyle::Controller::SwapStyleModules | ( | unsigned | i1, |
unsigned | i2 | ||
) |
Definition at line 966 of file Controller.cpp.
References _Canvas, i1, and Freestyle::Canvas::SwapStyleModules().
void Freestyle::Controller::toggleEdgeTesselationNature | ( | Nature::EdgeNature | iNature | ) |
Definition at line 1010 of file Controller.cpp.
References ComputeViewMap().
Definition at line 971 of file Controller.cpp.
References _Canvas, and Freestyle::Canvas::setVisible().
Referenced by prepare().
void Freestyle::Controller::toggleVisibilityAlgo | ( | ) |
Definition at line 729 of file Controller.cpp.
References Freestyle::ViewMapBuilder::ray_casting, Freestyle::ViewMapBuilder::ray_casting_fast, and Freestyle::ViewMapBuilder::ray_casting_very_fast.
void Freestyle::Controller::updateCausalStyleModules | ( | unsigned | index | ) |
Definition at line 983 of file Controller.cpp.
References _Canvas, Freestyle::Canvas::causalStyleModules(), and Freestyle::Canvas::setModified().
Referenced by setModified().
AppCanvas* Freestyle::Controller::_Canvas |
Definition at line 163 of file Controller.h.
Referenced by Clear(), CloseFile(), ComputeSteerableViewMap(), Controller(), displayDensityCurves(), DrawStrokes(), init_options(), InsertStyleModule(), ReloadStyleModule(), RemoveStyleModule(), RenderStrokes(), resetModified(), saveSteerableViewMapImages(), setModified(), setPassDiffuse(), setPassZ(), setView(), SwapStyleModules(), toggleLayer(), updateCausalStyleModules(), and ~Controller().
ViewMap* Freestyle::Controller::_ViewMap |
Definition at line 160 of file Controller.h.
Referenced by ComputeSteerableViewMap(), ComputeViewMap(), Controller(), DeleteViewMap(), DrawStrokes(), FRS_do_stroke_rendering(), hitViewMapCache(), LoadMesh(), and ~Controller().