Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

# OgreCommon.h File Reference

`#include "OgreString.h"`
`#include <utility>`
`#include <vector>`
`#include <map>`

Go to the source code of this file.

## Namespaces
namespace | Ogre
## Typedefs
typedef int | TrackVertexColourType
| An enumeration describing which material properties should track the vertex colours.
typedef std::map< String, bool > | UnaryOptionList
typedef std::map< String, String > | BinaryOptionList
typedef std::map< String, String > | NameValuePairList
| Name / value parameter pair (first = name, second = value).
typedef std::map< String, String > | AliasTextureNamePairList
| Alias / Texture name pair (first = alias, second = texture name).
typedef TRect< float > | FloatRect
| Structure used to define a rectangle in a 2-D floating point space.
typedef TRect< long > | Rect
| Structure used to define a rectangle in a 2-D integer space.
## Enumerations
enum | CompareFunction { CMPF_ALWAYS_FAIL, CMPF_ALWAYS_PASS, CMPF_LESS, CMPF_LESS_EQUAL, CMPF_EQUAL, CMPF_NOT_EQUAL, CMPF_GREATER_EQUAL, CMPF_GREATER }
| Comparison functions used for the depth/stencil buffer operations and others. More...
enum | TextureFilterOptions { TFO_NONE, TFO_BILINEAR, TFO_TRILINEAR, TFO_ANISOTROPIC }
| High-level filtering options providing shortcuts to settings the minification, magnification and mip filters. More...
enum | FilterType { FT_MIN, FT_MAG, FT_MIP }
enum | FilterOptions { FO_NONE, FO_POINT, FO_LINEAR, FO_ANISOTROPIC }
| Filtering options for textures / mipmaps. More...
enum | ShadeOptions { SO_FLAT, SO_GOURAUD, SO_PHONG }
| Light shading modes. More...
enum | FogMode { FOG_NONE, FOG_EXP, FOG_EXP2, FOG_LINEAR }
| Fog modes. More...
enum | CullingMode { CULL_NONE = 1, CULL_CLOCKWISE = 2, CULL_ANTICLOCKWISE = 3 }
| Hardware culling modes based on vertex winding. More...
enum | ManualCullingMode { MANUAL_CULL_NONE = 1, MANUAL_CULL_BACK = 2, MANUAL_CULL_FRONT = 3 }
| Manual culling modes based on vertex normals. More...
enum | WaveformType { WFT_SINE, WFT_TRIANGLE, WFT_SQUARE, WFT_SAWTOOTH, WFT_INVERSE_SAWTOOTH, WFT_PWM }
| Enumerates the wave types usable with the Ogre engine. More...
enum | PolygonMode { PM_POINTS = 1, PM_WIREFRAME = 2, PM_SOLID = 3 }
| The polygon mode to use when rasterising. More...
enum | ShadowTechnique { SHADOWTYPE_NONE = 0x00, SHADOWDETAILTYPE_ADDITIVE = 0x01, SHADOWDETAILTYPE_MODULATIVE = 0x02, SHADOWDETAILTYPE_INTEGRATED = 0x04, SHADOWDETAILTYPE_STENCIL = 0x10, SHADOWDETAILTYPE_TEXTURE = 0x20, SHADOWTYPE_STENCIL_MODULATIVE = 0x12, SHADOWTYPE_STENCIL_ADDITIVE = 0x11, SHADOWTYPE_TEXTURE_MODULATIVE = 0x22, SHADOWTYPE_TEXTURE_ADDITIVE = 0x21, SHADOWTYPE_TEXTURE_ADDITIVE_INTEGRATED = 0x25, SHADOWTYPE_TEXTURE_MODULATIVE_INTEGRATED = 0x26 }
| An enumeration of broad shadow techniques. More...
enum | TrackVertexColourEnum { TVC_NONE = 0x0, TVC_AMBIENT = 0x1, TVC_DIFFUSE = 0x2, TVC_SPECULAR = 0x4, TVC_EMISSIVE = 0x8 }
enum | SortMode { SM_DIRECTION, SM_DISTANCE }
| Sort mode for billboard-set and particle-system. More...
enum | FrameBufferType { FBT_COLOUR = 0x1, FBT_DEPTH = 0x2, FBT_STENCIL = 0x4 }
| Defines the frame buffer types. More...
## Functions
int _OgreExport | findCommandLineOpts (int numargs, char **argv, UnaryOptionList &unaryOptList, BinaryOptionList &binOptList)
| Locate command-line options of the unary form '-blah' and of the binary form '-blah foo', passing back the index of the next non-option.
## Variables
typedef std::vector< Light * > | LightList

## Typedef Documentation

typedef std::map<String, String> Ogre::AliasTextureNamePairList

| Alias / Texture name pair (first = alias, second = texture name). Definition at line 300 of file OgreCommon.h.

typedef std::map<String, String> Ogre::BinaryOptionList

| Definition at line 294 of file OgreCommon.h.

typedef TRect<float> Ogre::FloatRect

| Structure used to define a rectangle in a 2-D floating point space. Definition at line 334 of file OgreCommon.h.

typedef std::map<String, String> Ogre::NameValuePairList

| Name / value parameter pair (first = name, second = value). Definition at line 297 of file OgreCommon.h.

typedef TRect< long > Ogre::Rect

| Structure used to define a rectangle in a 2-D integer space. Definition at line 338 of file OgreCommon.h.

typedef int Ogre::TrackVertexColourType

| An enumeration describing which material properties should track the vertex colours. Definition at line 264 of file OgreCommon.h.

typedef std::map<String, bool> Ogre::UnaryOptionList

| Definition at line 293 of file OgreCommon.h.

## Enumeration Type Documentation

enum Ogre::CompareFunction

  | Comparison functions used for the depth/stencil buffer operations and others. Enumeration values:
  CMPF_ALWAYS_FAIL |
  CMPF_ALWAYS_PASS |
  CMPF_LESS |
  CMPF_LESS_EQUAL |
  CMPF_EQUAL |
  CMPF_NOT_EQUAL |
  CMPF_GREATER_EQUAL |
  CMPF_GREATER |
Definition at line 52 of file OgreCommon.h.

enum Ogre::CullingMode

  | Hardware culling modes based on vertex winding. This setting applies to how the hardware API culls triangles it is sent. Enumeration values:
  CULL_NONE | Hardware never culls triangles and renders everything it receives.
  CULL_CLOCKWISE | Hardware culls triangles whose vertices are listed clockwise in the view (default).
  CULL_ANTICLOCKWISE | Hardware culls triangles whose vertices are listed anticlockwise in the view.
Definition at line 123 of file OgreCommon.h.

enum Ogre::FilterOptions

  | Filtering options for textures / mipmaps. Enumeration values:
  FO_NONE | No filtering, used for FILT_MIP to turn off mipmapping.
  FO_POINT | Use the closest pixel.
  FO_LINEAR | Average of a 2x2 pixel area, denotes bilinear for MIN and MAG, trilinear for MIP.
  FO_ANISOTROPIC | Similar to FO_LINEAR, but compensates for the angle of the texture plane.
Definition at line 88 of file OgreCommon.h.

enum Ogre::FilterType

  | Enumeration values:
  FT_MIN | The filter used when shrinking a texture.
  FT_MAG | The filter used when magnifiying a texture.
  FT_MIP | The filter used when determining the mipmap.
Definition at line 78 of file OgreCommon.h.

enum Ogre::FogMode

  | Fog modes. Enumeration values:
  FOG_NONE | No fog. Duh.
  FOG_EXP | Fog density increases exponentially from the camera (fog = 1/e^(distance * density)).
  FOG_EXP2 | Fog density increases at the square of FOG_EXP, i.e. even quicker (fog = 1/e^(distance * density)^2).
  FOG_LINEAR | Fog density increases linearly between the start and end distances.
Definition at line 109 of file OgreCommon.h.

enum Ogre::FrameBufferType

  | Defines the frame buffer types. Enumeration values:
  FBT_COLOUR |
  FBT_DEPTH |
  FBT_STENCIL |
Definition at line 283 of file OgreCommon.h.

enum Ogre::ManualCullingMode

  | Manual culling modes based on vertex normals. This setting applies to how the software culls triangles before sending them to the hardware API. This culling mode is used by scene managers which choose to implement it - normally those which deal with large amounts of fixed world geometry which is often planar (software culling movable variable geometry is expensive). Enumeration values:
  MANUAL_CULL_NONE | No culling so everything is sent to the hardware.
  MANUAL_CULL_BACK | Cull triangles whose normal is pointing away from the camera (default).
  MANUAL_CULL_FRONT | Cull triangles whose normal is pointing towards the camera.
Definition at line 138 of file OgreCommon.h.

enum Ogre::PolygonMode

  | The polygon mode to use when rasterising. Enumeration values:
  PM_POINTS | Only points are rendered.
  PM_WIREFRAME | Wireframe models are rendered.
  PM_SOLID | Solid polygons are rendered.
Definition at line 167 of file OgreCommon.h.

enum Ogre::ShadeOptions

  | Light shading modes. Enumeration values:
  SO_FLAT |
  SO_GOURAUD |
  SO_PHONG |
Definition at line 101 of file OgreCommon.h.

enum Ogre::ShadowTechnique

  | An enumeration of broad shadow techniques. Enumeration values:
  SHADOWTYPE_NONE | No shadows.
  SHADOWDETAILTYPE_ADDITIVE | Mask for additive shadows (not for direct use, use SHADOWTYPE_ enum instead).
  SHADOWDETAILTYPE_MODULATIVE | Mask for modulative shadows (not for direct use, use SHADOWTYPE_ enum instead).
  SHADOWDETAILTYPE_INTEGRATED | Mask for integrated shadows (not for direct use, use SHADOWTYPE_ enum instead).
  SHADOWDETAILTYPE_STENCIL | Mask for stencil shadows (not for direct use, use SHADOWTYPE_ enum instead).
  SHADOWDETAILTYPE_TEXTURE | Mask for texture shadows (not for direct use, use SHADOWTYPE_ enum instead).
  SHADOWTYPE_STENCIL_MODULATIVE | Stencil shadow technique which renders all shadow volumes as a modulation after all the non-transparent areas have been rendered. This technique is considerably less fillrate intensive than the additive stencil shadow approach when there are multiple lights, but is not an accurate model.
  SHADOWTYPE_STENCIL_ADDITIVE | Stencil shadow technique which renders each light as a separate additive pass to the scene. This technique can be very fillrate intensive because it requires at least 2 passes of the entire scene, more if there are multiple lights. However, it is a more accurate model than the modulative stencil approach and this is especially apparant when using coloured lights or bump mapping.
  SHADOWTYPE_TEXTURE_MODULATIVE | Texture-based shadow technique which involves a monochrome render-to-texture of the shadow caster and a projection of that texture onto the shadow receivers as a modulative pass.
  SHADOWTYPE_TEXTURE_ADDITIVE | Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projection of that texture onto the shadow receivers, built up per light as additive passes. This technique can be very fillrate intensive because it requires numLights + 2 passes of the entire scene. However, it is a more accurate model than the modulative approach and this is especially apparant when using coloured lights or bump mapping.
  SHADOWTYPE_TEXTURE_ADDITIVE_INTEGRATED | Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projection of that texture on to the shadow receivers, with the usage of those shadow textures completely controlled by the materials of the receivers. This technique is easily the most flexible of all techniques because the material author is in complete control over how the shadows are combined with regular rendering. It can perform shadows as accurately as SHADOWTYPE_TEXTURE_ADDITIVE but more efficiently because it requires less passes. However it also requires more expertise to use, and in almost all cases, shader capable hardware to really use to the full. Note: The 'additive' part of this mode means that the colour of the rendered shadow texture is by default plain black. It does not mean it does the adding on your receivers automatically though, how you use that result is up to you.
  SHADOWTYPE_TEXTURE_MODULATIVE_INTEGRATED | Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projection of that texture on to the shadow receivers, with the usage of those shadow textures completely controlled by the materials of the receivers. This technique is easily the most flexible of all techniques because the material author is in complete control over how the shadows are combined with regular rendering. It can perform shadows as accurately as SHADOWTYPE_TEXTURE_ADDITIVE but more efficiently because it requires less passes. However it also requires more expertise to use, and in almost all cases, shader capable hardware to really use to the full. Note: The 'modulative' part of this mode means that the colour of the rendered shadow texture is by default the 'shadow colour'. It does not mean it modulates on your receivers automatically though, how you use that result is up to you.
Definition at line 178 of file OgreCommon.h.

enum Ogre::SortMode

  | Sort mode for billboard-set and particle-system. Enumeration values:
  SM_DIRECTION | Sort by direction of the camera.
  SM_DISTANCE | Sort by distance from the camera.
Definition at line 274 of file OgreCommon.h.

enum Ogre::TextureFilterOptions

  | High-level filtering options providing shortcuts to settings the minification, magnification and mip filters. Enumeration values:
  TFO_NONE | Equal to: min=FO_POINT, mag=FO_POINT, mip=FO_NONE.
  TFO_BILINEAR | Equal to: min=FO_LINEAR, mag=FO_LINEAR, mip=FO_POINT.
  TFO_TRILINEAR | Equal to: min=FO_LINEAR, mag=FO_LINEAR, mip=FO_LINEAR.
  TFO_ANISOTROPIC | Equal to: min=FO_ANISOTROPIC, max=FO_ANISOTROPIC, mip=FO_LINEAR.
Definition at line 66 of file OgreCommon.h.

enum Ogre::TrackVertexColourEnum

  | Enumeration values:
  TVC_NONE |
  TVC_AMBIENT |
  TVC_DIFFUSE |
  TVC_SPECULAR |
  TVC_EMISSIVE |
Definition at line 265 of file OgreCommon.h.

enum Ogre::WaveformType

  | Enumerates the wave types usable with the Ogre engine. Enumeration values:
  WFT_SINE | Standard sine wave which smoothly changes from low to high and back again.
  WFT_TRIANGLE | An angular wave with a constant increase / decrease speed with pointed peaks.
  WFT_SQUARE | Half of the time is spent at the min, half at the max with instant transition between.
  WFT_SAWTOOTH | Gradual steady increase from min to max over the period with an instant return to min at the end.
  WFT_INVERSE_SAWTOOTH | Gradual steady decrease from max to min over the period, with an instant return to max at the end.
  WFT_PWM | Pulse Width Modulation. Works like WFT_SQUARE, except the high to low transition is controlled by duty cycle. With a duty cycle of 50% (0.5) will give the same output as WFT_SQUARE.
Definition at line 149 of file OgreCommon.h.

## Function Documentation

int _OgreExport findCommandLineOpts | ( | int | numargs,
|  | char ** | argv,
|  | UnaryOptionList & | unaryOptList,
|  | BinaryOptionList & | binOptList
| ) |

  | Locate command-line options of the unary form '-blah' and of the binary form '-blah foo', passing back the index of the next non-option. Parameters:
  | numargs,argv | The standard parameters passed to the main method
  | unaryOptList | Map of unary options (ie those that do not require a parameter). Should be pre-populated with, for example '-e' in the key and false in the value. Options which are found will be set to true on return.
  | binOptList | Map of binnary options (ie those that require a parameter e.g. '-e afile.txt'). Should be pre-populated with, for example '-e' and the default setting. Options which are found will have the value updated.

## Variable Documentation

class typedef std::vector<Light*> Ogre::LightList

| Definition at line 290 of file OgreCommon.h. Referenced by Ogre::OverlayElement::getLights(), Ogre::BorderRenderable::getLights(), and Ogre::MovableObject::Listener::objectQueryLights().

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Thu Mar 6 09:46:26 2008