![]() |
OGRE 14.3
Object-Oriented Graphics Rendering Engine
|
Patch specialisation of Mesh. More...
#include <OgrePatchMesh.h>
Inheritance diagram for Ogre::PatchMesh:Public Member Functions | |
| PatchMesh (ResourceManager *creator, const String &name, ResourceHandle handle, const String &group) | |
| Constructor. | |
| void | define (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=HBU_GPU_ONLY, HardwareBuffer::Usage ibUsage=HBU_CPU_TO_GPU, bool vbUseShadow=false, bool ibUseShadow=false) |
| Define the patch, as defined in MeshManager::createBezierPatch. | |
| void | setSubdivision (Real factor) |
| void | update (void *controlPointBuffer, size_t width, size_t height, size_t uMaxSubdivisionLevel, size_t vMaxSubdivisionLevel, PatchSurface::VisibleSide visibleSide) |
| Update the mesh with new control points positions. | |
Public Member Functions inherited from Ogre::Mesh | |
| Mesh (ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual=false, ManualResourceLoader *loader=0) | |
| Default constructor - used by MeshManager. | |
| ~Mesh () | |
| void | _calcBoundsFromVertexBuffer (VertexData *vertexData, AxisAlignedBox &outAABB, Real &outRadius, bool updateOnly=false) |
| Calculates. | |
| void | _compileBoneAssignments (void) |
| Internal method, be called once to compile bone assignments into geometry buffer. | |
| void | _computeBoneBoundingRadius () |
| Compute the bone bounding radius by looking at the vertices, vertex-bone-assignments, and skeleton bind pose. | |
| void | _convertVertexElement (VertexElementSemantic semantic, VertexElementType dstType) |
| void | _determineAnimationTypes (void) const |
| Internal method which, if animation types have not been determined, scans any vertex animations and determines the type for each set of vertex data (cannot have 2 different types). | |
| virtual Animation * | _getAnimationImpl (const String &name) const |
| Internal access to the named vertex Animation object - returns null if it does not exist. | |
| bool | _getAnimationTypesDirty (void) const |
| Are the derived animation types out of date? | |
| ushort | _getSubMeshIndex (const String &name) const |
| Gets the index of a submesh with a given name. | |
| void | _initAnimationState (AnimationStateSet *animSet) |
| Initialise an animation set suitable for use with this mesh. | |
| bool | _isManualLodLevel (unsigned short level) const |
| Internal methods for loading LOD, do not use. | |
| void | _notifySkeleton (const SkeletonPtr &pSkel) |
| Internal notification, used to tell the Mesh which Skeleton to use without loading it. | |
| unsigned short | _rationaliseBoneAssignments (size_t vertexCount, VertexBoneAssignmentList &assignments) |
| Rationalises the passed in bone assignment list. | |
| void | _refreshAnimationState (AnimationStateSet *animSet) |
| Refresh an animation set suitable for use with this mesh. | |
| void | _setBoneBoundingRadius (Real radius) |
| Manually set the bone bounding radius. | |
| void | _setBoundingSphereRadius (Real radius) |
| Manually set the bounding radius. | |
| void | _setBounds (const AxisAlignedBox &bounds, bool pad=true) |
| Manually set the bounding box for this Mesh. | |
| void | _setLodInfo (unsigned short numLevels) |
| Internal methods for loading LOD, do not use. | |
| void | _setLodUsage (unsigned short level, const MeshLodUsage &usage) |
| Internal methods for loading LOD, do not use. | |
| void | _setSubMeshLodFaceList (unsigned short subIdx, unsigned short level, IndexData *facedata) |
| Internal methods for loading LOD, do not use. | |
| void | _updateBoundsFromVertexBuffers (bool pad=false) |
| Automatically update the bounding radius and bounding box for this Mesh. | |
| void | _updateCompiledBoneAssignments (void) |
| Internal method, be called once to update the compiled bone assignments. | |
| void | addBoneAssignment (const VertexBoneAssignment &vertBoneAssign) |
| Assigns a vertex to a bone with a given weight, for skeletal animation. | |
| void | buildEdgeList (void) |
| Builds an edge list for this mesh, which can be used for generating a shadow volume among other things. | |
| void | buildTangentVectors (unsigned short sourceTexCoordSet=0, bool splitMirrored=false, bool splitRotated=false, bool storeParityInW=false) |
| This method builds a set of tangent vectors for a given mesh into a 3D texture coordinate buffer. | |
| void | buildTangentVectors (VertexElementSemantic targetSemantic, unsigned short sourceTexCoordSet=0, unsigned short index=0, bool splitMirrored=false, bool splitRotated=false, bool storeParityInW=false) |
| void | clearBoneAssignments (void) |
| Removes all bone assignments for this mesh. | |
| MeshPtr | clone (const String &newName, const String &newGroup=BLANKSTRING) |
| Makes a copy of this mesh object and gives it a new name. | |
| Animation * | createAnimation (const String &name, Real length) override |
| Create a new animation with a given length owned by this container. | |
| Pose * | createPose (ushort target, const String &name=BLANKSTRING) |
| Create a new Pose for this mesh or one of its submeshes. | |
| SubMesh * | createSubMesh (const String &name) |
| Creates a new SubMesh and gives it a name. | |
| SubMesh * | createSubMesh (void) |
| Creates a new SubMesh. | |
| void | createVertexData (HardwareBufferManagerBase *mgr=nullptr) |
| Creates a new shared vertex data object. | |
| void | destroySubMesh (const String &name) |
| Destroy a SubMesh with the given name. | |
| void | destroySubMesh (unsigned short index) |
| Destroy a SubMesh with the given index. | |
| void | freeEdgeList (void) |
| Destroys and frees the edge lists this mesh has built. | |
| Animation * | getAnimation (const String &name) const override |
| Looks up an Animation object previously created with createAnimation. | |
| Animation * | getAnimation (unsigned short index) const override |
| Retrieve an animation by index. | |
| bool | getAutoBuildEdgeLists (void) const |
| Sets whether or not this Mesh should automatically build edge lists when asked for them, or whether it should never build them if they are not already provided. | |
| BoneAssignmentIterator | getBoneAssignmentIterator (void) |
| const VertexBoneAssignmentList & | getBoneAssignments () const |
| Gets a const reference to the list of bone assignments. | |
| Real | getBoneBoundingRadius () const |
| Gets the radius used to inflate the bounding box around the bones. | |
| Real | getBoundingSphereRadius (void) const |
| Gets the radius of the bounding sphere surrounding this mesh. | |
| const AxisAlignedBox & | getBounds (void) const |
| Get the axis-aligned bounding box for this mesh. | |
| EdgeData * | getEdgeList (unsigned short lodIndex=0) |
| Return the edge list for this mesh, building it if required. | |
| const EdgeData * | getEdgeList (unsigned short lodIndex=0) const |
| Return the edge list for this mesh, building it if required. | |
| HardwareBufferManagerBase * | getHardwareBufferManager () |
| HardwareBufferUsage | getIndexBufferUsage (void) const |
| Gets the usage setting for this meshes index buffers. | |
| ushort | getLodIndex (Real value) const |
| Retrieves the level of detail index for the given LOD value. | |
| const MeshLodUsage & | getLodLevel (ushort index) const |
| Gets details of the numbered level of detail entry. | |
| const LodStrategy * | getLodStrategy () const |
| Get LOD strategy used by this mesh. | |
| unsigned short | getNumAnimations (void) const override |
| Gets the number of animations in this container. | |
| ushort | getNumLodLevels (void) const |
| Returns the number of levels of detail that this mesh supports. | |
| size_t | getNumSubMeshes (void) const |
| Gets the number of sub meshes which comprise this mesh. | |
| Pose * | getPose (const String &name) const |
| Retrieve an existing Pose by name. | |
| Pose * | getPose (size_t index) const |
| Retrieve an existing Pose by index. | |
| size_t | getPoseCount (void) const |
| Get the number of poses. | |
| PoseIterator | getPoseIterator (void) |
| Get an iterator over all the poses defined. | |
| ConstPoseIterator | getPoseIterator (void) const |
| Get an iterator over all the poses defined. | |
| const PoseList & | getPoseList (void) const |
| Get pose list. | |
| bool | getSharedVertexDataAnimationIncludesNormals () const |
| Returns whether animation on shared vertex data includes normals. | |
| virtual VertexAnimationType | getSharedVertexDataAnimationType (void) const |
| Gets the type of vertex animation the shared vertex data of this mesh supports. | |
| const SkeletonPtr & | getSkeleton (void) const |
| Gets a pointer to any linked Skeleton. | |
| const String & | getSkeletonName (void) const |
| Gets the name of any linked Skeleton. | |
| SubMesh * | getSubMesh (const String &name) const |
| Gets a SubMesh by name. | |
| SubMesh * | getSubMesh (size_t index) const |
| Gets a pointer to the submesh indicated by the index. | |
| const SubMeshList & | getSubMeshes () const |
| Gets the available submeshes. | |
| SubMeshIterator | getSubMeshIterator (void) |
| Gets an iterator over the available submeshes. | |
| const SubMeshNameMap & | getSubMeshNameMap (void) const |
| Gets a reference to the optional name assignments of the SubMeshes. | |
| UserObjectBindings & | getUserObjectBindings () |
| Class that provides convenient interface to establish a linkage between custom user application objects and Ogre core classes. | |
| const UserObjectBindings & | getUserObjectBindings () const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| HardwareBufferUsage | getVertexBufferUsage (void) const |
| Gets the usage setting for this meshes vertex buffers. | |
| VertexData * | getVertexDataByTrackHandle (unsigned short handle) |
| Gets a pointer to a vertex data element based on a morph animation track handle. | |
| bool | hasAnimation (const String &name) const override |
| Returns whether this object contains the named animation. | |
| bool | hasManualLodLevel (void) const |
| Returns true if this mesh has a manual LOD level. | |
| bool | hasSkeleton (void) const |
| Returns true if this Mesh has a linked Skeleton. | |
| bool | hasVertexAnimation (void) const |
| Returns whether or not this mesh has some kind of vertex animation. | |
| bool | isEdgeListBuilt (void) const |
| Returns whether this mesh has an attached edge list. | |
| bool | isIndexBufferShadowed (void) const |
| Gets whether or not this meshes index buffers are shadowed. | |
| bool | isPreparedForShadowVolumes (void) const |
| Returns whether this mesh has already had it's geometry prepared for use in rendering shadow volumes. | |
| bool | isVertexBufferShadowed (void) const |
| Gets whether or not this meshes vertex buffers are shadowed. | |
| void | mergeAdjacentTexcoords (unsigned short finalTexCoordSet, unsigned short texCoordSetToDestroy) |
| This method collapses two texcoords into one for all submeshes where this is possible. | |
| void | nameSubMesh (const String &name, ushort index) |
| Gives a name to a SubMesh. | |
| void | prepareForShadowVolume (void) |
| Modifies the vertex data to be suitable for use for rendering shadow geometry as in [mcguire2003fast]. | |
| void | reload (LoadingFlags flags=LF_DEFAULT) override |
| Reloads the resource, if it is already loaded. | |
| virtual void | removeAllAnimations (void) |
| Removes all morph Animations from this mesh. | |
| void | removeAllPoses (void) |
| Destroy all poses. | |
| void | removeAnimation (const String &name) override |
| Remove & destroy an Animation from this container. | |
| void | removeLodLevels (void) |
| Removes all LOD data from this Mesh. | |
| void | removePose (const String &name) |
| Destroy a pose by name. | |
| void | removePose (ushort index) |
| Destroy a pose by index. | |
| void | resetVertexData (VertexData *data=nullptr) |
| replace the shared vertex data with a new one | |
| void | setAutoBuildEdgeLists (bool autobuild) |
| Sets whether or not this Mesh should automatically build edge lists when asked for them, or whether it should never build them if they are not already provided. | |
| void | setHardwareBufferManager (HardwareBufferManagerBase *bufferManager) |
| Sets the manager for the vertex and index buffers to be used when loading this Mesh. | |
| void | setIndexBufferPolicy (HardwareBuffer::Usage usage, bool shadowBuffer=false) |
| Sets the policy for the index buffers to be used when loading this Mesh. | |
| void | setLodStrategy (LodStrategy *lodStrategy) |
| Set the lod strategy used by this mesh. | |
| void | setSkeletonName (const String &skelName) |
| Sets the name of the skeleton this Mesh uses for animation. | |
| void | setVertexBufferPolicy (HardwareBuffer::Usage usage, bool shadowBuffer=false) |
| Sets the policy for the vertex buffers to be used when loading this Mesh. | |
| bool | suggestTangentVectorBuildParams (unsigned short &outSourceCoordSet) |
| Ask the mesh to suggest a source texture coordinate set to a future buildTangentVectors call. | |
| bool | suggestTangentVectorBuildParams (VertexElementSemantic targetSemantic, unsigned short &outSourceCoordSet, unsigned short &outIndex) |
| void | unnameSubMesh (const String &name) |
| Removes a name from a SubMesh. | |
| void | updateManualLodLevel (ushort index, const String &meshName) |
| Changes the alternate mesh to use as a manual LOD at the given index. | |
Public Member Functions inherited from Ogre::Resource | |
| Resource (ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual=false, ManualResourceLoader *loader=0) | |
| Standard constructor. | |
| virtual | ~Resource () |
| Virtual destructor. | |
| virtual void | _dirtyState () |
| Manually mark the state of this resource as having been changed. | |
| void | _fireLoadingComplete (bool unused=false) |
| Firing of loading complete event. | |
| void | _firePreparingComplete (bool unused=false) |
| Firing of preparing complete event. | |
| void | _fireUnloadingComplete (void) |
| Firing of unloading complete event. | |
| void | _notifyOrigin (const String &origin) |
| Notify this resource of it's origin. | |
| virtual void | addListener (Listener *lis) |
| Register a listener on this resource. | |
| virtual void | changeGroupOwnership (const String &newGroup) |
| Change the resource group ownership of a Resource. | |
| virtual void | escalateLoading () |
| Escalates the loading of a background loaded resource. | |
| ResourceManager * | getCreator (void) |
| Gets the manager which created this resource. | |
| const String & | getGroup (void) const |
| Gets the group which this resource is a member of. | |
| ResourceHandle | getHandle (void) const |
| LoadingState | getLoadingState () const |
| Returns the current loading state. | |
| const String & | getName (void) const |
| Gets resource name. | |
| const String & | getOrigin (void) const |
| Get the origin of this resource, e.g. | |
| size_t | getSize (void) const |
| Retrieves info about the size of the resource. | |
| virtual size_t | getStateCount () const |
| Returns the number of times this resource has changed state, which generally means the number of times it has been loaded. | |
| bool | isBackgroundLoaded (void) const |
| Returns whether this Resource has been earmarked for background loading. | |
| bool | isLoaded (void) const |
| Returns true if the Resource has been loaded, false otherwise. | |
| bool | isLoading () const |
| Returns whether the resource is currently in the process of background loading. | |
| bool | isManuallyLoaded (void) const |
| Is this resource manually loaded? | |
| bool | isPrepared (void) const |
| Returns true if the Resource has been prepared, false otherwise. | |
| bool | isReloadable (void) const |
| Returns true if the Resource is reloadable, false otherwise. | |
| virtual void | load (bool backgroundThread=false) |
| Loads the resource, if it is not already. | |
| virtual void | prepare (bool backgroundThread=false) |
| Prepares the resource for load, if it is not already. | |
| virtual void | removeListener (Listener *lis) |
| Remove a listener on this resource. | |
| void | setBackgroundLoaded (bool bl) |
| Tells the resource whether it is background loaded or not. | |
| virtual void | touch (void) |
| 'Touches' the resource to indicate it has been used. | |
| virtual void | unload (void) |
| Unloads the resource; this is not permanent, the resource can be reloaded later if required. | |
Public Member Functions inherited from Ogre::StringInterface | |
| StringInterface () | |
| virtual | ~StringInterface () |
| Virtual destructor, see Effective C++. | |
| void | copyParametersTo (StringInterface *dest) const |
| Method for copying this object's parameters to another object. | |
| ParamDictionary * | getParamDictionary (void) |
| Retrieves the parameter dictionary for this class. | |
| const ParamDictionary * | getParamDictionary (void) const |
| String | getParameter (const String &name) const |
| Generic parameter retrieval method. | |
| const ParameterList & | getParameters (void) const |
| Retrieves a list of parameters valid for this object. | |
| bool | setParameter (const String &name, const String &value) |
| Generic parameter setting method. | |
| void | setParameterList (const NameValuePairList ¶mList) |
| Generic multiple parameter setting method. | |
Public Member Functions inherited from Ogre::AnimationContainer | |
| virtual | ~AnimationContainer () |
Additional Inherited Members | |
Public Types inherited from Ogre::Mesh | |
| typedef MapIterator< VertexBoneAssignmentList > | BoneAssignmentIterator |
| typedef ConstVectorIterator< PoseList > | ConstPoseIterator |
| typedef std::vector< unsigned short > | IndexMap |
| typedef std::vector< Real > | LodValueList |
| typedef std::vector< MeshLodUsage > | MeshLodUsageList |
| typedef VectorIterator< PoseList > | PoseIterator |
| typedef VectorIterator< SubMeshList > | SubMeshIterator |
| typedef std::vector< SubMesh * > | SubMeshList |
| typedef std::unordered_map< String, ushort > | SubMeshNameMap |
| A hashmap used to store optional SubMesh names. | |
| typedef std::multimap< size_t, VertexBoneAssignment > | VertexBoneAssignmentList |
| Multimap of vertex bone assignments (orders by vertex index). | |
Public Types inherited from Ogre::Resource | |
| enum | LoadingFlags { LF_DEFAULT = 0 , LF_INCLUDE_NON_RELOADABLE = 1 , LF_ONLY_UNREFERENCED = 2 , LF_ONLY_UNREFERENCED_INCLUDE_NON_RELOADABLE = 3 , LF_PRESERVE_STATE = 4 } |
| Enum that allow to choose subset of unloaded/reloaded resources and to adjust reloading behavior. More... | |
| enum | LoadingState { LOADSTATE_UNLOADED , LOADSTATE_LOADING , LOADSTATE_LOADED , LOADSTATE_UNLOADING , LOADSTATE_PREPARED , LOADSTATE_PREPARING } |
| Enum identifying the loading state of the resource. More... | |
Public Types inherited from Ogre::AnimationContainer | |
| typedef std::map< String, Animation * > | AnimationList |
Static Public Member Functions inherited from Ogre::Mesh | |
| static void | prepareMatricesForVertexBlend (const Affine3 **blendMatrices, const Affine3 *boneMatrices, const IndexMap &indexMap) |
| Prepare matrices for software indexed vertex blend. | |
| static void | softwareVertexBlend (const VertexData *sourceVertexData, const VertexData *targetVertexData, const Affine3 *const *blendMatrices, size_t numMatrices, bool blendNormals) |
| Performs a software indexed vertex blend, of the kind used for skeletal animation although it can be used for other purposes. | |
| static void | softwareVertexMorph (float t, const HardwareVertexBufferSharedPtr &b1, const HardwareVertexBufferSharedPtr &b2, VertexData *targetVertexData) |
| Performs a software vertex morph, of the kind used for morph animation although it can be used for other purposes. | |
| static void | softwareVertexPoseBlend (float weight, const std::map< uint32, Vector3f > &vertexOffsetMap, const std::map< uint32, Vector3f > &normalsMap, VertexData *targetVertexData) |
| Performs a software vertex pose blend, of the kind used for morph animation although it can be used for other purposes. | |
Static Public Member Functions inherited from Ogre::StringInterface | |
| static void | cleanupDictionary () |
| Cleans up the static 'msDictionary' required to reset Ogre, otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the ResourceManager implementers (e.g. | |
Public Attributes inherited from Ogre::Mesh | |
| IndexMap | sharedBlendIndexToBoneIndexMap |
| Shared index map for translating blend index to bone index. | |
| VertexData * | sharedVertexData |
| Shared vertex data. | |
Patch specialisation of Mesh.
Instances of this class should be created by calling MeshManager::createBezierPatch.
| Ogre::PatchMesh::PatchMesh | ( | ResourceManager * | creator, |
| const String & | name, | ||
| ResourceHandle | handle, | ||
| const String & | group ) |
Constructor.
| void Ogre::PatchMesh::update | ( | void * | controlPointBuffer, |
| size_t | width, | ||
| size_t | height, | ||
| size_t | uMaxSubdivisionLevel, | ||
| size_t | vMaxSubdivisionLevel, | ||
| PatchSurface::VisibleSide | visibleSide ) |
Update the mesh with new control points positions.
| void Ogre::PatchMesh::define | ( | 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 = HBU_GPU_ONLY, | ||
| HardwareBuffer::Usage | ibUsage = HBU_CPU_TO_GPU, | ||
| bool | vbUseShadow = false, | ||
| bool | ibUseShadow = false ) |
Define the patch, as defined in MeshManager::createBezierPatch.
References Ogre::PatchSurface::AUTO_LEVEL, Ogre::HBU_CPU_TO_GPU, Ogre::HBU_GPU_ONLY, and Ogre::PatchSurface::VS_FRONT.
| void Ogre::PatchMesh::setSubdivision | ( | Real | factor | ) |