Go to the documentation of this file.
28 #ifndef __MeshManager_H__
29 #define __MeshManager_H__
43 class MeshSerializerListener;
98 bool vertexBufferShadowed =
true,
bool indexBufferShadowed =
true);
124 bool vertexBufferShadowed =
true,
bool indexBufferShadowed =
true);
150 bool vertexBufferShadowed =
true,
bool indexBufferShadowed =
true);
211 int xsegments = 1,
int ysegments = 1,
212 bool normals =
true,
unsigned short numTexCoordSets = 1,
216 bool vertexShadowBuffer =
true,
bool indexShadowBuffer =
true);
272 int xsegments = 1,
int ysegments = 1,
273 bool normals =
true,
unsigned short numTexCoordSets = 1,
278 bool vertexShadowBuffer =
true,
bool indexShadowBuffer =
true,
279 int ySegmentsToKeep = -1);
325 int xsegments = 1,
int ysegments = 1,
326 bool normals =
false,
unsigned short numTexCoordSets = 1,
330 bool vertexShadowBuffer =
true,
bool indexShadowBuffer =
true);
369 const String& name,
const String& groupName,
void* controlPointBuffer,
376 bool vbUseShadow =
true,
bool ibUseShadow =
true);
447 bool doubleSided =
false,
449 bool indexSysMem =
false);
static const Vector3 UNIT_Y
unsigned long long int ResourceHandle
static MeshManager * getSingletonPtr(void)
Override standard Singleton retrieval.
void setListener(MeshSerializerListener *listener)
Sets the listener used to control mesh loading through the serializer.
HardwareBuffer::Usage vertexBufferUsage
Defines a plane in 3D space.
bool mPrepAllMeshesForShadowVolumes
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, unsigned short 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 genuinely curved plane, by default majoring on the x/y axes facing positive Z.
void loadResource(Resource *res)
Real mBoundsPaddingFactor
void loadManualCurvedIllusionPlane(Mesh *pMesh, MeshBuildParams ¶ms)
Utility method for manual loading a curved illusion plane.
void createPrefabSphere(void)
void createPrefabPlane(void)
unsigned short numTexCoordSets
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.
MeshBuildType
Enum identifying the types of manual mesh built by this manager.
static String AUTODETECT_RESOURCE_GROUP_NAME
Special resource group name which causes resource group to be automatically determined based on searc...
void _initialise(void)
Initialises the manager, only to be called by OGRE internally.
@ MBT_CURVED_ILLUSION_PLANE
@ HBU_DYNAMIC_WRITE_ONLY
Combination of HBU_DYNAMIC and HBU_WRITE_ONLY.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
@ VS_FRONT
The side from which u goes right and v goes up (as in texture coords)
HardwareBuffer::Usage indexBufferUsage
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, unsigned short 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,...
Implementation of a Quaternion, i.e.
@ HBU_STATIC_WRITE_ONLY
Combination of HBU_STATIC and HBU_WRITE_ONLY.
ResourceCreateOrRetrieveResult createOrRetrieve(const String &name, const String &group, bool isManual=false, ManualResourceLoader *loader=0, const NameValuePairList *params=0, HardwareBuffer::Usage vertexBufferUsage=HardwareBuffer::HBU_STATIC_WRITE_ONLY, HardwareBuffer::Usage indexBufferUsage=HardwareBuffer::HBU_STATIC_WRITE_ONLY, bool vertexBufferShadowed=true, bool indexBufferShadowed=true)
Create a new mesh, or retrieve an existing one with the same name if it already exists.
map< Resource *, MeshBuildParams >::type MeshBuildParamsMap
Map from resource pointer to parameter set.
MeshSerializerListener * getListener()
Gets the listener used to control mesh loading through the serializer.
This class declares the format of a set of vertex inputs, which can be issued to the rendering API th...
Defines a part of a complete mesh.
void createPrefabCube(void)
void setBoundsPaddingFactor(Real paddingFactor)
Sets the factor by which the bounding box of an entity is padded.
Template class for creating single-instance global classes.
Resource * createImpl(const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader, const NameValuePairList *createParams)
Create a new resource instance compatible with this manager (no custom parameters are populated at th...
MeshPtr create(const String &name, const String &group, bool isManual=false, ManualResourceLoader *loader=0, const NameValuePairList *createParams=0)
Create a new mesh.
MeshPtr prepare(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)
Prepares a mesh for loading from a file.
Defines a generic resource handler.
void loadManualPlane(Mesh *pMesh, MeshBuildParams ¶ms)
Utility method for manual loading a plane.
MeshBuildParamsMap mMeshBuildParams
MeshPtr createPlane(const String &name, const String &groupName, const Plane &plane, Real width, Real height, int xsegments=1, int ysegments=1, bool normals=true, unsigned short 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.
Real getBoundsPaddingFactor(void)
Gets the factor by which the bounding box of an entity is padded.
MeshPtr getByName(const String &name, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
Get a resource by name.
Abstract class representing a loadable resource (e.g.
Saved parameters used to (re)build a manual mesh built by this class.
std::pair< ResourcePtr, bool > ResourceCreateOrRetrieveResult
Handles the management of mesh resources.
void setPrepareAllMeshesForShadowVolumes(bool enable)
Tells the mesh manager that all future meshes should prepare themselves for shadow volumes on loading...
Usage
Enums describing buffer usage; not mutually exclusive.
Resource holding data about 3D mesh.
static const Quaternion IDENTITY
float Real
Software floating point type.
MeshSerializerListener * mListener
void tesselate2DMesh(SubMesh *pSub, unsigned short meshWidth, unsigned short meshHeight, bool doubleSided=false, HardwareBuffer::Usage indexBufferUsage=HardwareBuffer::HBU_STATIC_WRITE_ONLY, bool indexSysMem=false)
Utility method for tessellating 2D meshes.
static MeshManager & getSingleton(void)
Override standard Singleton retrieval.
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.
Interface describing a manual resource loader.
bool getPrepareAllMeshesForShadowVolumes(void)
Retrieves whether all Meshes should prepare themselves for shadow volumes.
Standard 3-dimensional vector.
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.
void loadManualCurvedPlane(Mesh *pMesh, MeshBuildParams ¶ms)
Utility method for manual loading a curved plane.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.