⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ogrecommonwrapper.h

📁 使用stl技术,(还没看,是听说的)
💻 H
字号:
#ifndef OGRECOMMONWRAPPER_H_INCLUDED
# define OGRECOMMONWRAPPER_H_INCLUDED

/* A big cut & paste of OgreCommon.h with just the enum definitions. 
   This change the generation time from 15 minutes to 1 second ! (pyste bug ?)
 */

namespace Ogre {

	enum ResourceType
    {
        /// All resource types
        RESTYPE_ALL,
        /// Textures
        RESTYPE_TEXTURES,
        /// Models
        RESTYPE_MODELS
    };

    /** Comparison functions used for the depth/stencil buffer operations and 
		others. */
    enum CompareFunction
    {
        CMPF_ALWAYS_FAIL,
        CMPF_ALWAYS_PASS,
        CMPF_LESS,
        CMPF_LESS_EQUAL,
        CMPF_EQUAL,
        CMPF_NOT_EQUAL,
        CMPF_GREATER_EQUAL,
        CMPF_GREATER
    };

    /** High-level filtering options providing shortcuts to settings the
        minification, magnification and mip filters. */
    enum TextureFilterOptions
    {
        /// Equal to: min=FO_POINT, mag=FO_POINT, mip=FO_NONE
        TFO_NONE,
        /// Equal to: min=FO_LINEAR, mag=FO_LINEAR, mip=FO_POINT
        TFO_BILINEAR,
        /// Equal to: min=FO_LINEAR, mag=FO_LINEAR, mip=FO_LINEAR
        TFO_TRILINEAR,
        /// Equal to: min=FO_ANISOTROPIC, max=FO_ANISOTROPIC, mip=FO_LINEAR
		TFO_ANISOTROPIC
    };

    enum FilterType
    {
        /// The filter used when shrinking a texture
        FT_MIN,
        /// The filter used when magnifiying a texture
        FT_MAG,
        /// The filter used when determining the mipmap
        FT_MIP
    };
    /** Filtering options for textures / mipmaps. */
    enum FilterOptions
    {
        /// No filtering, used for FILT_MIP to turn off mipmapping
        FO_NONE,
        /// Use the closest pixel
        FO_POINT,
        /// Average of a 2x2 pixel area, denotes bilinear for MIN and MAG, trilinear for MIP
        FO_LINEAR,
        /// Similar to FO_LINEAR, but compensates for the angle of the texture plane
        FO_ANISOTROPIC
    };



    /** Light shading modes. */
    enum ShadeOptions
    {
        SO_FLAT,
        SO_GOURAUD,
        SO_PHONG
    };

    /** Fog modes. */
    enum FogMode
    {
        /// No fog. Duh.
        FOG_NONE,
        /// Fog density increases  exponentially from the camera (fog = 1/e^(distance * density))
        FOG_EXP,
        /// Fog density increases at the square of FOG_EXP, i.e. even quicker (fog = 1/e^(distance * density)^2)
        FOG_EXP2,
        /// Fog density increases linearly between the start and end distances
        FOG_LINEAR
    };

    /** Hardware culling modes based on vertex winding.
        This setting applies to how the hardware API culls triangles it is sent. */
    enum CullingMode
    {
        /// Hardware never culls triangles and renders everything it receives.
        CULL_NONE = 1,
        /// Hardware culls triangles whose vertices are listed clockwise in the view (default).
        CULL_CLOCKWISE = 2,
        /// Hardware culls triangles whose vertices are listed anticlockwise in the view.
        CULL_ANTICLOCKWISE = 3
    };

    /** 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). */
    enum ManualCullingMode
    {
        /// No culling so everything is sent to the hardware.
        MANUAL_CULL_NONE = 1,
        /// Cull triangles whose normal is pointing away from the camera (default).
        MANUAL_CULL_BACK = 2,
        /// Cull triangles whose normal is pointing towards the camera.
        MANUAL_CULL_FRONT = 3
    };

    /** Enumerates the wave types usable with the Ogre engine. */
    enum WaveformType
    {
        /// Standard sine wave which smoothly changes from low to high and back again.
        WFT_SINE,
        /// An angular wave with a constant increase / decrease speed with pointed peaks.
        WFT_TRIANGLE,
        /// Half of the time is spent at the min, half at the max with instant transition between.
        WFT_SQUARE,
        /// Gradual steady increase from min to max over the period with an instant return to min at the end.
        WFT_SAWTOOTH,
        /// Gradual steady decrease from max to min over the period, with an instant return to max at the end.
        WFT_INVERSE_SAWTOOTH
    };

    /** The broad type of detail for rendering. */
    enum SceneDetailLevel
    {
		/// Only points are rendered.
        SDL_POINTS = 1,
		/// Wireframe models are rendered.
        SDL_WIREFRAME = 2,
		/// Solid polygons are rendered.
        SDL_SOLID = 3
    };

	/** The pixel format used for textures. */
	enum PixelFormat
	{
		/// Unknown pixel format.
		PF_UNKNOWN,
		/// 8-bit pixel format, all bits luminace.
		PF_L8,
		/// 8-bit pixel format, all bits alpha.
		PF_A8,
		/// 8-bit pixel format, 4 bits alpha, 4 bits luminace.
		PF_A4L4,
		/// 8-bit pixel format, 4 bits luminace, 4 bits alpha.
		PF_L4A4,
		/// 16-bit pixel format, 5 bits red, 6 bits green, 5 bits blue.
		PF_R5G6B5,
		/// 16-bit pixel format, 5 bits blue, 6 bits green, 5 bits red.
		PF_B5G6R5,
		/// 16-bit pixel format, 4 bits for alpha, red, green and blue.
		PF_A4R4G4B4,
		/// 16-bit pixel format, 4 bits for blue, green, red and alpha.
		PF_B4G4R4A4,
		/// 24-bit pixel format, 8 bits for red, green and blue.
		PF_R8G8B8,
		/// 24-bit pixel format, 8 bits for blue, green and red.
		PF_B8G8R8,
		/// 32-bit pixel format, 8 bits for alpha, red, green and blue.
		PF_A8R8G8B8,
		/// 32-bit pixel format, 8 bits for blue, green, red and alpha.
		PF_B8G8R8A8,
		/// 32-bit pixel format, 2 bits for alpha, 10 bits for red, green and blue.
		PF_A2R10G10B10,
		/// 32-bit pixel format, 10 bits for blue, green and red, 2 bits for alpha.
		PF_B10G10R10A2,
        /// DDS (DirectDraw Surface) DXT1 format
        PF_DXT1,
        /// DDS (DirectDraw Surface) DXT2 format
        PF_DXT2,
        /// DDS (DirectDraw Surface) DXT3 format
        PF_DXT3,
        /// DDS (DirectDraw Surface) DXT4 format
        PF_DXT4,
        /// DDS (DirectDraw Surface) DXT5 format
        PF_DXT5
	};

    /** An enumeration of broad shadow techniques */
    enum ShadowTechnique
    {
        /** No shadows */
        SHADOWTYPE_NONE,
        /** 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_MODULATIVE,
        /** 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_STENCIL_ADDITIVE,
        /** 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_MODULATIVE,
        /** Texture-based shadow technique which involves a render-to-texture
            of the shadow caster and a projection of that texture onto the 
            shadow receivers, followed by a depth test to detect the closest
            fragment to the light.
        SHADOWTYPE_TEXTURE_SHADOWMAP
        */
    };

	/** Enum identifying the texture type **/
	enum TextureType
	{
		TEX_TYPE_1D = 1,/** 1D texture, used in combination with 1D texture coordinates **/
		TEX_TYPE_2D, 	/** 2D texture, used in combination with 2D texture coordinates (default) **/
		TEX_TYPE_3D, 	/** 3D volume texture, used in combination with 3D texture coordinates **/
		TEX_TYPE_CUBE_MAP 	/** 3D cube map, used in combination with 3D texture coordinates **/
	};

} // namespace Ogre

#endif // OGRECOMMONWRAPPER_H_INCLUDED

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -