OgreStaticFaceGroup.h
Go to the documentation of this file.
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __StaticFaceGroup_H__
#define __StaticFaceGroup_H__
#include "OgrePrerequisites.h"
#include "OgrePlane.h"
#include "OgrePatchSurface.h"
namespace Ogre {
enum FaceGroupType {
FGT_FACE_LIST,
FGT_PATCH,
FGT_UNKNOWN
};
struct StaticFaceGroup {
// Type of face group.
FaceGroupType fType;
bool isSky;
int vertexStart;
int numVertices;
int elementStart;
int numElements;
ResourceHandle materialHandle;
Plane plane;
PatchSurface* patchSurf;
_OgreExport friend std::ostream& operator<<(std::ostream& o, const StaticFaceGroup& s)
{
o << "StaticFaceGroup(";
if (s.fType == FGT_FACE_LIST)
{
o << "faceList, numVertices=" << s.numVertices << ", vertexStart=" << s.vertexStart;
o << ", numElements=" << s.numElements << ", elementStart=" << s.elementStart;
o << ", normal=" << s.plane.normal;
}
else if (s.fType == FGT_PATCH)
{
o << "bezierPatch, numVertices=" << s.numVertices << ", vertexStart=" << s.vertexStart;
// TODO
}
o << ", materialHandle=" << s.materialHandle;
o << ")";
return o;
}
};
} // namespace
#endif
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::StaticFaceGroup::elementStart
int elementStart
Index into a buffer containing vertex indices.
Definition: OgreStaticFaceGroup.h:94
Ogre::StaticFaceGroup::vertexStart
int vertexStart
Index into a buffer containing vertex definitions.
Definition: OgreStaticFaceGroup.h:79
OgrePlane.h
Ogre::Plane::normal
Vector3 normal
Definition: OgrePlane.h:144
Ogre::FGT_UNKNOWN
Definition: OgreStaticFaceGroup.h:48
Ogre::ResourceHandle
unsigned long long int ResourceHandle
Definition: OgreResource.h:41
Ogre::StaticFaceGroup::fType
FaceGroupType fType
Definition: OgreStaticFaceGroup.h:71
Ogre::Plane
Defines a plane in 3D space.
Definition: OgrePlane.h:61
Ogre::StaticFaceGroup::numVertices
int numVertices
The range of vertices in the buffer this facegroup references.
Definition: OgreStaticFaceGroup.h:85
Ogre::FGT_PATCH
Definition: OgreStaticFaceGroup.h:47
Ogre::StaticFaceGroup::patchSurf
PatchSurface * patchSurf
Patch surface (only applicable when fType = FGT_PATCH)
Definition: OgreStaticFaceGroup.h:110
OgrePrerequisites.h
Ogre::StaticFaceGroup::isSky
bool isSky
Is this a sky surface?
Definition: OgreStaticFaceGroup.h:74
Ogre::StaticFaceGroup::operator<<
_OgreExport friend std::ostream & operator<<(std::ostream &o, const StaticFaceGroup &s)
Definition: OgreStaticFaceGroup.h:113
Ogre::FGT_FACE_LIST
Definition: OgreStaticFaceGroup.h:46
Ogre::StaticFaceGroup
Collects a group of static i.e.
Definition: OgreStaticFaceGroup.h:69
Ogre::StaticFaceGroup::plane
Plane plane
Definition: OgreStaticFaceGroup.h:107
Ogre::StaticFaceGroup::numElements
int numElements
The number of vertex indices.
Definition: OgreStaticFaceGroup.h:99
Ogre
Definition: OgreAndroidLogListener.h:34
OgrePatchSurface.h
Ogre::PatchSurface
A surface which is defined by curves of some kind to form a patch, e.g.
Definition: OgrePatchSurface.h:53
Ogre::StaticFaceGroup::materialHandle
ResourceHandle materialHandle
Handle to material used by this group.
Definition: OgreStaticFaceGroup.h:105
Ogre::FaceGroupType
FaceGroupType
A type of face group, i.e.
Definition: OgreStaticFaceGroup.h:45

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.