Blender V5.0
Freestyle::TextureManager Class Referenceabstract

#include <StrokeRenderer.h>

Classes

struct  Options
struct  cmpBrushTexture

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 36 of file StrokeRenderer.h.

Member Typedef Documentation

◆ brushesMap

◆ BrushTexture

Definition at line 71 of file StrokeRenderer.h.

Constructor & Destructor Documentation

◆ TextureManager()

Freestyle::TextureManager::TextureManager ( )

Definition at line 52 of file StrokeRenderer.cpp.

References _defaultTextureId, _hasLoadedTextures, and _pInstance.

Referenced by getInstance().

◆ ~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, loadBrush(), and name.

◆ getDefaultTextureId()

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

◆ getInstance()

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

◆ hasLoaded()

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

Definition at line 49 of file StrokeRenderer.h.

References _hasLoadedTextures.

◆ load()

void Freestyle::TextureManager::load ( )

Definition at line 67 of file StrokeRenderer.cpp.

References _hasLoadedTextures, and loadStandardBrushes().

◆ loadBrush()

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

◆ 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 88 of file StrokeRenderer.h.

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

◆ _defaultTextureId

uint Freestyle::TextureManager::_defaultTextureId
protected

Definition at line 91 of file StrokeRenderer.h.

Referenced by getDefaultTextureId(), and TextureManager().

◆ _hasLoadedTextures

bool Freestyle::TextureManager::_hasLoadedTextures
protected

Definition at line 87 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 86 of file StrokeRenderer.h.

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


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