OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgrePatchMesh.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4  (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2014 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 #ifndef __PatchMesh_H__
29 #define __PatchMesh_H__
30 
31 #include "OgrePrerequisites.h"
32 #include "OgreMesh.h"
33 #include "OgrePatchSurface.h"
34 
35 namespace Ogre {
36 
47  class _OgreExport PatchMesh : public Mesh
48  {
49  protected:
54  public:
56  PatchMesh(ResourceManager* creator, const String& name, ResourceHandle handle,
57  const String& group);
59  void update(void* controlPointBuffer, size_t width, size_t height,
60  size_t uMaxSubdivisionLevel, size_t vMaxSubdivisionLevel,
61  PatchSurface::VisibleSide visibleSide);
63  void define(void* controlPointBuffer,
64  VertexDeclaration *declaration, size_t width, size_t height,
65  size_t uMaxSubdivisionLevel = PatchSurface::AUTO_LEVEL,
66  size_t vMaxSubdivisionLevel = PatchSurface::AUTO_LEVEL,
70  bool vbUseShadow = false, bool ibUseShadow = false);
71 
72  /* Sets the current subdivision level as a proportion of full detail.
73  @param factor Subdivision factor as a value from 0 (control points only) to 1 (maximum
74  subdivision). */
75  void setSubdivision(Real factor);
76  protected:
78  void loadImpl(void);
80  void prepareImpl(void) {}
81 
82  };
86 }
87 
88 #endif
VertexDeclaration * mDeclaration
Vertex declaration, cloned from the input.
Definition: OgrePatchMesh.h:53
float Real
Software floating point type.
#define _OgreExport
Definition: OgrePlatform.h:255
void prepareImpl(void)
Overridden from Resource - do nothing (no disk caching)
Definition: OgrePatchMesh.h:80
PatchSurface mSurface
Internal surface definition.
Definition: OgrePatchMesh.h:51
Combination of HBU_STATIC and HBU_WRITE_ONLY.
A surface which is defined by curves of some kind to form a patch, e.g.
Combination of HBU_DYNAMIC and HBU_WRITE_ONLY.
Usage
Enums describing buffer usage; not mutually exclusive.
unsigned long long int ResourceHandle
Definition: OgreResource.h:39
This class declares the format of a set of vertex inputs, which can be issued to the rendering API th...
Defines a generic resource handler.
The side from which u goes right and v goes up (as in texture coords)
_StringBase String
Definition: OgreCommon.h:53
Patch specialisation of Mesh.
Definition: OgrePatchMesh.h:47
Resource holding data about 3D mesh.
Definition: OgreMesh.h:86