Blender V4.3
Freestyle::TextureManager Class Referenceabstract

#include <StrokeRenderer.h>

Classes

struct  cmpBrushTexture
 
struct  Options
 

Public Member Functions

 TextureManager ()
 
virtual ~TextureManager ()
 
void load ()
 
uint getBrushTextureIndex (string name, Stroke::MediumType iType=Stroke::OPAQUE_MEDIUM)
 
bool hasLoaded () const
 
uint getDefaultTextureId () const
 

Static Public Member Functions

static TextureManagergetInstance ()
 

Protected Types

typedef std::pair< string, Stroke::MediumTypeBrushTexture
 
typedef std::map< BrushTexture, uint, cmpBrushTexturebrushesMap
 

Protected Member Functions

virtual void loadStandardBrushes ()=0
 
virtual uint loadBrush (string fileName, Stroke::MediumType=Stroke::OPAQUE_MEDIUM)=0
 

Protected Attributes

bool _hasLoadedTextures
 
brushesMap _brushesMap
 
uint _defaultTextureId
 

Static Protected Attributes

static TextureManager_pInstance = nullptr
 
static string _patterns_path
 
static string _brushes_path
 

Detailed Description

Class to load textures

Definition at line 38 of file StrokeRenderer.h.

Member Typedef Documentation

◆ brushesMap

Definition at line 86 of file StrokeRenderer.h.

◆ BrushTexture

typedef std::pair<string, Stroke::MediumType> Freestyle::TextureManager::BrushTexture
protected

Definition at line 73 of file StrokeRenderer.h.

Constructor & Destructor Documentation

◆ TextureManager()

Freestyle::TextureManager::TextureManager ( )

Definition at line 52 of file StrokeRenderer.cpp.

References _defaultTextureId, _hasLoadedTextures, and _pInstance.

◆ ~TextureManager()

Freestyle::TextureManager::~TextureManager ( )
virtual

Definition at line 59 of file StrokeRenderer.cpp.

References _brushesMap, and _pInstance.

Member Function Documentation

◆ getBrushTextureIndex()

uint Freestyle::TextureManager::getBrushTextureIndex ( string name,
Stroke::MediumType iType = Stroke::OPAQUE_MEDIUM )

Definition at line 76 of file StrokeRenderer.cpp.

References _brushesMap, b, and loadBrush().

◆ getDefaultTextureId()

uint Freestyle::TextureManager::getDefaultTextureId ( ) const
inline

◆ getInstance()

static TextureManager * Freestyle::TextureManager::getInstance ( )
inlinestatic

Definition at line 43 of file StrokeRenderer.h.

References _pInstance.

Referenced by Freestyle::StrokeRep::StrokeRep(), and Freestyle::StrokeRep::StrokeRep().

◆ hasLoaded()

bool Freestyle::TextureManager::hasLoaded ( ) const
inline

Definition at line 51 of file StrokeRenderer.h.

References _hasLoadedTextures.

◆ load()

void Freestyle::TextureManager::load ( )

◆ loadBrush()

virtual uint Freestyle::TextureManager::loadBrush ( string fileName,
Stroke::MediumType = Stroke::OPAQUE_MEDIUM )
protectedpure virtual

Referenced by getBrushTextureIndex().

◆ loadStandardBrushes()

virtual void Freestyle::TextureManager::loadStandardBrushes ( )
protectedpure virtual

Referenced by load().

Member Data Documentation

◆ _brushes_path

string Freestyle::TextureManager::_brushes_path
staticprotected

◆ _brushesMap

brushesMap Freestyle::TextureManager::_brushesMap
protected

Definition at line 90 of file StrokeRenderer.h.

Referenced by getBrushTextureIndex(), and ~TextureManager().

◆ _defaultTextureId

uint Freestyle::TextureManager::_defaultTextureId
protected

Definition at line 93 of file StrokeRenderer.h.

Referenced by getDefaultTextureId(), and TextureManager().

◆ _hasLoadedTextures

bool Freestyle::TextureManager::_hasLoadedTextures
protected

Definition at line 89 of file StrokeRenderer.h.

Referenced by hasLoaded(), load(), and TextureManager().

◆ _patterns_path

string Freestyle::TextureManager::_patterns_path
staticprotected

◆ _pInstance

TextureManager * Freestyle::TextureManager::_pInstance = nullptr
staticprotected

Definition at line 88 of file StrokeRenderer.h.

Referenced by getInstance(), TextureManager(), and ~TextureManager().


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