#include <shape_bank_user.h>
Inheritance diagram for NL3D::CShapeBankUser:

Nevrax France
Definition at line 46 of file shape_bank_user.h.
Public Member Functions | |
| virtual void | addShapeCache (const std::string &shapeCacheName) |
| virtual UShape | getShape (const std::string &shapeName) |
| virtual void | linkShapeToShapeCache (const std::string &shapeName, const std::string &shapeCacheName) |
| virtual void | preLoadShapesFromBNP (const std::string &shapeCacheName, const std::string &bnpName, const std::string &wildCard, NLMISC::IProgressCallback *progress=NULL, bool flushTextures=false) |
| virtual void | preLoadShapesFromDirectory (const std::string &shapeCacheName, const std::string &path, const std::string &wildCard, bool recurs, NLMISC::IProgressCallback *progress=NULL, bool flushTextures=false) |
| virtual void | removeShapeCache (const std::string &shapeCacheName) |
| virtual void | reset () |
| virtual void | setShapeCacheSize (const std::string &shapeCacheName, sint32 maxSize) |
| virtual | ~CShapeBankUser () |
Data Fields | |
| CDriverUser * | _DriverUser |
| CShapeBank | _ShapeBank |
|
|
Definition at line 49 of file shape_bank_user.h. References NL3D_MEM_SHAPE_BANK.
00050 {
00051 NL3D_MEM_SHAPE_BANK
00052 }
|
|
|
Add a new ShapeCache. If already exist do nothing. Implements NL3D::UShapeBank. Definition at line 42 of file shape_bank_user.cpp. References NL3D::CShapeBank::addShapeCache(), and NL3D_MEM_SHAPE_BANK.
00043 {
00044 NL3D_MEM_SHAPE_BANK
00045 _ShapeBank.addShapeCache( shapeCacheName );
00046 }
|
|
|
Return a UShape proxy from this name. NB: if not found the mesh is not loaded, and the proxy returned will be empty Implements NL3D::UShapeBank. Definition at line 107 of file shape_bank_user.cpp. References NL3D::UShape::attach(), and NL3D::CShapeBank::getShape().
00108 {
00109 // get the IShape from the bank
00110 UShape ret;
00111 ret.attach(_ShapeBank.getShape(shapeName));
00112
00113 return ret;
00114 }
|
|
||||||||||||
|
Link a shape to a ShapeCache. The ShapeCache must exist and must not contains the shape. Implements NL3D::UShapeBank. Definition at line 74 of file shape_bank_user.cpp. References NL3D::CShapeBank::linkShapeToShapeCache(), and NL3D_MEM_SHAPE_BANK.
00075 {
00076 NL3D_MEM_SHAPE_BANK
00077 _ShapeBank.linkShapeToShapeCache( shapeName, shapeCacheName );
00078 }
|
|
||||||||||||||||||||||||
|
PreLoad all shapes (.shape, .ps, .skel...) files from a directory into a shapeCache. same as preLoadShapesFromDirectory() but take a BNP name which must have been added with CBigFile::add() or through CPath::addSearchBigFile()
Implements NL3D::UShapeBank. Definition at line 94 of file shape_bank_user.cpp. References NL3D::CDriverUser::getDriver(), and NL3D::CShapeBank::preLoadShapes().
00096 {
00097 // List all files From the bnp
00098 vector<string> listFile;
00099 CBigFile::getInstance().list(bnpName, listFile);
00100
00101 // preLoad
00102 if(!listFile.empty())
00103 _ShapeBank.preLoadShapes(shapeCacheName, listFile, wildCardNotLwr, progress, flushTextures, _DriverUser->getDriver());
00104 }
|
|
||||||||||||||||||||||||||||
|
PreLoad all shapes (.shape, .ps, .skel...) files from a directory into a shapeCache. Shapes are Loaded if not present, assigned to the given cache, and fit in the cache Size as max possible. NB: crash if you try to load a non shape file (eg: a .dds etc...)
Implements NL3D::UShapeBank. Definition at line 81 of file shape_bank_user.cpp. References NL3D::CDriverUser::getDriver(), and NL3D::CShapeBank::preLoadShapes().
00083 {
00084 // List all files From the path
00085 vector<string> listFile;
00086 CPath::getPathContent(path, recurs, false, true, listFile);
00087
00088 // preLoad
00089 if(!listFile.empty())
00090 _ShapeBank.preLoadShapes(shapeCacheName, listFile, wildCardNotLwr, progress, flushTextures, _DriverUser->getDriver());
00091 }
|
|
|
Remove a ShapeCache. All shapes in the shape cache are deleted. All links are redirected to the default ShapeCache. Implements NL3D::UShapeBank. Definition at line 50 of file shape_bank_user.cpp. References NL3D_MEM_SHAPE_BANK, and NL3D::CShapeBank::removeShapeCache().
00051 {
00052 NL3D_MEM_SHAPE_BANK
00053 _ShapeBank.removeShapeCache( shapeCacheName );
00054 }
|
|
|
Remove all ShapeCache and suppress all links (even the link to the default cache are removed) Implements NL3D::UShapeBank. Definition at line 58 of file shape_bank_user.cpp. References NL3D_MEM_SHAPE_BANK, and NL3D::CShapeBank::reset().
00059 {
00060 NL3D_MEM_SHAPE_BANK
00061 _ShapeBank.reset();
00062 }
|
|
||||||||||||
|
Set the shapeCache shapeCacheName the new size.(delete shapes if maxsize<shapeCacheSize). Implements NL3D::UShapeBank. Definition at line 66 of file shape_bank_user.cpp. References NL3D_MEM_SHAPE_BANK, NL3D::CShapeBank::setShapeCacheSize(), and sint32.
00067 {
00068 NL3D_MEM_SHAPE_BANK
00069 _ShapeBank.setShapeCacheSize( shapeCacheName, maxSize );
00070 }
|
|
|
Definition at line 67 of file shape_bank_user.h. Referenced by NL3D::CDriverUser::CDriverUser(). |
|
|
Definition at line 66 of file shape_bank_user.h. Referenced by NL3D::CDriverUser::createScene(). |
1.3.6