#include <OgreMeshManager.h>
Inheritance diagram for Ogre::MeshManager:

Public Types | |||||||||||
| typedef HashMap< String, ResourcePtr > | ResourceMap | ||||||||||
| typedef std::map< ResourceHandle, ResourcePtr > | ResourceHandleMap | ||||||||||
| typedef MapIterator< ResourceHandleMap > | ResourceMapIterator | ||||||||||
Public Member Functions | |||||||||||
| MeshManager () | |||||||||||
| ~MeshManager () | |||||||||||
| void | _initialise (void) | ||||||||||
| Initialises the manager, only to be called by OGRE internally. | |||||||||||
| MeshPtr | load (const String &filename, const String &groupName, HardwareBuffer::Usage vertexBufferUsage=HardwareBuffer::HBU_STATIC_WRITE_ONLY, HardwareBuffer::Usage indexBufferUsage=HardwareBuffer::HBU_STATIC_WRITE_ONLY, bool vertexBufferShadowed=true, bool indexBufferShadowed=true) | ||||||||||
| Loads a mesh from a file, making it immediately available for use. | |||||||||||
| MeshPtr | createManual (const String &name, const String &groupName, ManualResourceLoader *loader=0) | ||||||||||
| Creates a new Mesh specifically for manual definition rather than loading from an object file. | |||||||||||
| MeshPtr | createPlane (const String &name, const String &groupName, const Plane &plane, Real width, Real height, int xsegments=1, int ysegments=1, bool normals=true, int numTexCoordSets=1, Real uTile=1.0f, Real vTile=1.0f, const Vector3 &upVector=Vector3::UNIT_Y, HardwareBuffer::Usage vertexBufferUsage=HardwareBuffer::HBU_STATIC_WRITE_ONLY, HardwareBuffer::Usage indexBufferUsage=HardwareBuffer::HBU_STATIC_WRITE_ONLY, bool vertexShadowBuffer=true, bool indexShadowBuffer=true) | ||||||||||
| Creates a basic plane, by default majoring on the x/y axes facing positive Z. | |||||||||||
| MeshPtr | createCurvedIllusionPlane (const String &name, const String &groupName, const Plane &plane, Real width, Real height, Real curvature, int xsegments=1, int ysegments=1, bool normals=true, int numTexCoordSets=1, Real uTile=1.0f, Real vTile=1.0f, const Vector3 &upVector=Vector3::UNIT_Y, const Quaternion &orientation=Quaternion::IDENTITY, HardwareBuffer::Usage vertexBufferUsage=HardwareBuffer::HBU_STATIC_WRITE_ONLY, HardwareBuffer::Usage indexBufferUsage=HardwareBuffer::HBU_STATIC_WRITE_ONLY, bool vertexShadowBuffer=true, bool indexShadowBuffer=true, int ySegmentsToKeep=-1) | ||||||||||
| Creates a plane, which because of it's texture coordinates looks like a curved surface, useful for skies in a skybox. | |||||||||||
| MeshPtr | createCurvedPlane (const String &name, const String &groupName, const Plane &plane, Real width, Real height, Real bow=0.5f, int xsegments=1, int ysegments=1, bool normals=false, int numTexCoordSets=1, Real xTile=1.0f, Real yTile=1.0f, const Vector3 &upVector=Vector3::UNIT_Y, HardwareBuffer::Usage vertexBufferUsage=HardwareBuffer::HBU_STATIC_WRITE_ONLY, HardwareBuffer::Usage indexBufferUsage=HardwareBuffer::HBU_STATIC_WRITE_ONLY, bool vertexShadowBuffer=true, bool indexShadowBuffer=true) | ||||||||||
| Creates a genuinely curved plane, by default majoring on the x/y axes facing positive Z. | |||||||||||
| PatchMeshPtr | createBezierPatch (const String &name, const String &groupName, void *controlPointBuffer, VertexDeclaration *declaration, size_t width, size_t height, size_t uMaxSubdivisionLevel=PatchSurface::AUTO_LEVEL, size_t vMaxSubdivisionLevel=PatchSurface::AUTO_LEVEL, PatchSurface::VisibleSide visibleSide=PatchSurface::VS_FRONT, HardwareBuffer::Usage vbUsage=HardwareBuffer::HBU_STATIC_WRITE_ONLY, HardwareBuffer::Usage ibUsage=HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY, bool vbUseShadow=true, bool ibUseShadow=true) | ||||||||||
| Creates a Bezier patch based on an array of control vertices. | |||||||||||
| void | setPrepareAllMeshesForShadowVolumes (bool enable) | ||||||||||
| Tells the mesh manager that all future meshes should prepare themselves for shadow volumes on loading. | |||||||||||
| bool | getPrepareAllMeshesForShadowVolumes (void) | ||||||||||
| Retrieves whether all Meshes should prepare themselves for shadow volumes. | |||||||||||
| Real | getBoundsPaddingFactor (void) | ||||||||||
| Gets the factor by which the bounding box of an entity is padded. | |||||||||||
| void | setBoundsPaddingFactor (Real paddingFactor) | ||||||||||
| Sets the factor by which the bounding box of an entity is padded. | |||||||||||
| void | loadResource (Resource *res) | ||||||||||
| virtual ResourcePtr | create (const String &name, const String &group, bool isManual=false, ManualResourceLoader *loader=0, const NameValuePairList *createParams=0) | ||||||||||
| Creates a new blank resource, but does not immediately load it. | |||||||||||
| virtual void | setMemoryBudget (size_t bytes) | ||||||||||
| Set a limit on the amount of memory this resource handler may use. | |||||||||||
| virtual size_t | getMemoryBudget (void) const | ||||||||||
| Get the limit on the amount of memory this resource handler may use. | |||||||||||
| virtual void | unload (const String &name) | ||||||||||
| Unloads a single resource by name. | |||||||||||
| virtual void | unload (ResourceHandle handle) | ||||||||||
| Unloads a single resource by handle. | |||||||||||
| virtual void | unloadAll (void) | ||||||||||
| Unloads all resources. | |||||||||||
| virtual void | reloadAll (void) | ||||||||||
| Caused all currently loaded resources to be reloaded. | |||||||||||
| virtual void | remove (ResourcePtr &r) | ||||||||||
| Remove a single resource. | |||||||||||
| virtual void | remove (const String &name) | ||||||||||
| Remove a single resource by name. | |||||||||||
| virtual void | remove (ResourceHandle handle) | ||||||||||
| Remove a single resource by handle. | |||||||||||
| virtual void | removeAll (void) | ||||||||||
| Removes all resources. | |||||||||||
| virtual ResourcePtr | getByName (const String &name) | ||||||||||
| Retrieves a pointer to a resource by name, or null if the resource does not exist. | |||||||||||
| virtual ResourcePtr | getByHandle (ResourceHandle handle) | ||||||||||
| Retrieves a pointer to a resource by handle, or null if the resource does not exist. | |||||||||||
| virtual bool | resourceExists (const String &name) | ||||||||||
| Returns whether the named resource exists in this manager. | |||||||||||
| virtual bool | resourceExists (ResourceHandle handle) | ||||||||||
| Returns whether a resource with the given handle exists in this manager. | |||||||||||
| virtual void | _notifyResourceTouched (Resource *res) | ||||||||||
| Notify this manager that a resource which it manages has been 'touched', ie used. | |||||||||||
| virtual void | _notifyResourceLoaded (Resource *res) | ||||||||||
| Notify this manager that a resource which it manages has been loaded. | |||||||||||
| virtual void | _notifyResourceUnloaded (Resource *res) | ||||||||||
| Notify this manager that a resource which it manages has been unloaded. | |||||||||||
| virtual ResourcePtr | load (const String &name, const String &group, bool isManual=false, ManualResourceLoader *loader=0, const NameValuePairList *loadParams=0) | ||||||||||
| Generic load method, used to create a Resource specific to this ResourceManager without using one of the specialised 'load' methods (containing per-Resource-type parameters). | |||||||||||
| virtual const StringVector & | getScriptPatterns (void) const | ||||||||||
| Gets the file patterns which should be used to find scripts for this ResourceManager. | |||||||||||
| virtual void | parseScript (DataStreamPtr &stream, const String &groupName) | ||||||||||
| Parse the definition of a set of resources from a script file. | |||||||||||
| virtual Real | getLoadingOrder (void) const | ||||||||||
| Gets the relative loading order of resources of this type. | |||||||||||
| const String & | getResourceType (void) const | ||||||||||
| Gets a string identifying the type of resource this manager handles. | |||||||||||
| ResourceMapIterator | getResourceIterator (void) | ||||||||||
| Returns an iterator over all resources in this manager. | |||||||||||
Static Public Member Functions | |||||||||||
| MeshManager & | getSingleton (void) | ||||||||||
| Override standard Singleton retrieval. | |||||||||||
| MeshManager * | getSingletonPtr (void) | ||||||||||
| Override standard Singleton retrieval. | |||||||||||
Protected Types | |||||||||||
| typedef std::map< Resource *, MeshBuildParams > | MeshBuildParamsMap | ||||||||||
| Map from resource pointer to parameter set. | |||||||||||
| enum | MeshBuildType { MBT_PLANE, MBT_CURVED_ILLUSION_PLANE, MBT_CURVED_PLANE } | ||||||||||
| Enum identifying the types of manual mesh built by this manager. More... | |||||||||||
Protected Member Functions | |||||||||||
| Resource * | createImpl (const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader, const NameValuePairList *createParams) | ||||||||||
| |||||||||||
| void | tesselate2DMesh (SubMesh *pSub, int meshWidth, int meshHeight, bool doubleSided=false, HardwareBuffer::Usage indexBufferUsage=HardwareBuffer::HBU_STATIC_WRITE_ONLY, bool indexSysMem=false) | ||||||||||
| Utility method for tesselating 2D meshes. | |||||||||||
| void | createPrefabPlane (void) | ||||||||||
| void | loadManualPlane (Mesh *pMesh, MeshBuildParams ¶ms) | ||||||||||
| Utility method for manual loading a plane. | |||||||||||
| void | loadManualCurvedPlane (Mesh *pMesh, MeshBuildParams ¶ms) | ||||||||||
| Utility method for manual loading a curved plane. | |||||||||||
| void | loadManualCurvedIllusionPlane (Mesh *pMesh, MeshBuildParams ¶ms) | ||||||||||
| Utility method for manual loading a curved illusion plane. | |||||||||||
| ResourceHandle | getNextHandle (void) | ||||||||||
| Allocates the next handle. | |||||||||||
| virtual void | addImpl (ResourcePtr &res) | ||||||||||
| Add a newly created resource to the manager (note weak reference). | |||||||||||
| virtual void | removeImpl (ResourcePtr &res) | ||||||||||
| Remove a resource from this manager; remove it from the lists. | |||||||||||
| virtual void | checkUsage (void) | ||||||||||
| Checks memory usage and pages out if required. | |||||||||||
| virtual size_t | getMemoryUsage (void) const | ||||||||||
| Gets the current memory usage, in bytes. | |||||||||||
Protected Attributes | |||||||||||
| MeshBuildParamsMap | mMeshBuildParams | ||||||||||
| bool | mPrepAllMeshesForShadowVolumes | ||||||||||
| Real | mBoundsPaddingFactor | ||||||||||
| ResourceHandleMap | mResourcesByHandle | ||||||||||
| ResourceMap | mResources | ||||||||||
| ResourceHandle | mNextHandle | ||||||||||
| size_t | mMemoryBudget | ||||||||||
| size_t | mMemoryUsage | ||||||||||
| StringVector | mScriptPatterns | ||||||||||
| Patterns to use to look for scripts if supported (e.g. *.overlay). | |||||||||||
| Real | mLoadOrder | ||||||||||
| Loading order relative to other managers, higher is later. | |||||||||||
| String | mResourceType | ||||||||||
| String identifying the resource type this manager handles. | |||||||||||
Static Protected Attributes | |||||||||||
| MeshManager * | ms_Singleton | ||||||||||
Definition at line 46 of file OgreMeshManager.h.
|
|
Map from resource pointer to parameter set.
Definition at line 404 of file OgreMeshManager.h. |
|
|
Definition at line 343 of file OgreResourceManager.h. |
|
|
Definition at line 342 of file OgreResourceManager.h. |
|
|
Definition at line 361 of file OgreResourceManager.h. Referenced by Ogre::ResourceManager::getResourceIterator(). |
|
|
Enum identifying the types of manual mesh built by this manager.
Definition at line 375 of file OgreMeshManager.h. |
|
|
|
|
|
|
|
|
Initialises the manager, only to be called by OGRE internally.
|
|
|
Notify this manager that a resource which it manages has been loaded.
|
|
|
Notify this manager that a resource which it manages has been 'touched', ie used.
|
|
|
Notify this manager that a resource which it manages has been unloaded.
|
|
|
Add a newly created resource to the manager (note weak reference).
|
|
|
Checks memory usage and pages out if required.
|
|
||||||||||||||||||||||||
|
Creates a new blank resource, but does not immediately load it.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Creates a Bezier patch based on an array of control vertices.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Creates a plane, which because of it's texture coordinates looks like a curved surface, useful for skies in a skybox.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Creates a genuinely curved plane, by default majoring on the x/y axes facing positive Z.
|
|
||||||||||||||||||||||||||||
|
Implements Ogre::ResourceManager. |
|
||||||||||||||||
|
Creates a new Mesh specifically for manual definition rather than loading from an object file.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Creates a basic plane, by default majoring on the x/y axes facing positive Z.
|
|
|
|
|
|
Gets the factor by which the bounding box of an entity is padded. Default is 0.01 |
|
|
Retrieves a pointer to a resource by handle, or null if the resource does not exist.
|
|
|
Retrieves a pointer to a resource by name, or null if the resource does not exist.
|
|
|
Gets the relative loading order of resources of this type.
Implements Ogre::ScriptLoader. Definition at line 296 of file OgreResourceManager.h. References Ogre::Real. |
|
|
Get the limit on the amount of memory this resource handler may use.
|
|
|
Gets the current memory usage, in bytes.
Definition at line 338 of file OgreResourceManager.h. |
|
|
Allocates the next handle.
|
|
|
Retrieves whether all Meshes should prepare themselves for shadow volumes.
|
|
|
Returns an iterator over all resources in this manager.
Definition at line 366 of file OgreResourceManager.h. References Ogre::ResourceManager::ResourceMapIterator. |
|
|
Gets a string identifying the type of resource this manager handles.
Definition at line 299 of file OgreResourceManager.h. References Ogre::String. |
|
|
Gets the file patterns which should be used to find scripts for this ResourceManager.
Implements Ogre::ScriptLoader. Definition at line 273 of file OgreResourceManager.h. References Ogre::StringVector. |
|
|
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< MeshManager >. |
|
|
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< MeshManager >. |
|
||||||||||||||||||||||||
|
Generic load method, used to create a Resource specific to this ResourceManager without using one of the specialised 'load' methods (containing per-Resource-type parameters).
Reimplemented in Ogre::BspResourceManager. |
|
||||||||||||||||||||||||||||
|
Loads a mesh from a file, making it immediately available for use.
|
|
||||||||||||
|
Utility method for manual loading a curved illusion plane.
|
|
||||||||||||
|
Utility method for manual loading a curved plane.
|
|
||||||||||||
|
Utility method for manual loading a plane.
|
|
|
Implements Ogre::ManualResourceLoader. |
|
||||||||||||
|
Parse the definition of a set of resources from a script file.
Implements Ogre::ScriptLoader. Reimplemented in Ogre::FontManager, and Ogre::MaterialManager. Definition at line 288 of file OgreResourceManager.h. References Ogre::DataStreamPtr, and Ogre::String. |
|
|
Caused all currently loaded resources to be reloaded.
|
|
|
Remove a single resource by handle.
|
|
|
Remove a single resource by name.
|
|
|
Remove a single resource.
|
|
|
Removes all resources.
|
|
|
Remove a resource from this manager; remove it from the lists.
|
|
|
Returns whether a resource with the given handle exists in this manager.
Definition at line 221 of file OgreResourceManager.h. References Ogre::SharedPtr< T >::isNull(), and Ogre::ResourceHandle. |
|
|
Returns whether the named resource exists in this manager.
Definition at line 216 of file OgreResourceManager.h. References Ogre::SharedPtr< T >::isNull(), and Ogre::String. |
|
|
Sets the factor by which the bounding box of an entity is padded.
|
|
|
Set a limit on the amount of memory this resource handler may use.
|
|
|
Tells the mesh manager that all future meshes should prepare themselves for shadow volumes on loading.
|
|
||||||||||||||||||||||||||||
|
Utility method for tesselating 2D meshes.
|
|
|
Unloads a single resource by handle.
|
|
|
Unloads a single resource by name.
|
|
|
Unloads all resources.
|
|
|
Definition at line 417 of file OgreMeshManager.h. |
|
|
Loading order relative to other managers, higher is later.
Definition at line 356 of file OgreResourceManager.h. |
|
|
Definition at line 348 of file OgreResourceManager.h. |
|
|
Definition at line 349 of file OgreResourceManager.h. |
|
|
Definition at line 405 of file OgreMeshManager.h. |
|
|
Definition at line 347 of file OgreResourceManager.h. |
|
|
Definition at line 414 of file OgreMeshManager.h. |
|
|
Definition at line 346 of file OgreResourceManager.h. |
|
|
Definition at line 345 of file OgreResourceManager.h. |
|
|
String identifying the resource type this manager handles.
Definition at line 358 of file OgreResourceManager.h. |
|
|
Definition at line 54 of file OgreSingleton.h. |
|
|
Patterns to use to look for scripts if supported (e.g. *.overlay).
Definition at line 354 of file OgreResourceManager.h. |
Copyright © 2000-2005 by The OGRE Team
Last modified Sun Nov 20 12:37:24 2005