/*
---------------------------------------------------------------------------
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2012, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following
conditions are met:
* Redistributions of source code must retain the above
copyright notice, this list of conditions and the
following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other
materials provided with the distribution.
* Neither the name of the assimp team, nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior
written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------------------------
*/
/** @file material.h
* @brief Defines the material system of the library
*/
#ifndef AI_MATERIAL_H_INC
#define AI_MATERIAL_H_INC
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
// Name for default materials (2nd is used if meshes have UV coords)
#define AI_DEFAULT_MATERIAL_NAME "DefaultMaterial"
// ---------------------------------------------------------------------------
/** @brief Defines how the Nth texture of a specific type is combined with
* the result of all previous layers.
*
* Example (left: key, right: value): <br>
* @code
* DiffColor0 - gray
* DiffTextureOp0 - aiTextureOpMultiply
* DiffTexture0 - tex1.png
* DiffTextureOp0 - aiTextureOpAdd
* DiffTexture1 - tex2.png
* @endcode
* Written as equation, the final diffuse term for a specific pixel would be:
* @code
* diffFinal = DiffColor0 * sampleTex(DiffTexture0,UV0) +
* sampleTex(DiffTexture1,UV0) * diffContrib;
* @endcode
* where 'diffContrib' is the intensity of the incoming light for that pixel.
*/
enum aiTextureOp
{
/** T = T1 * T2 */
aiTextureOp_Multiply = 0x0,
/** T = T1 + T2 */
aiTextureOp_Add = 0x1,
/** T = T1 - T2 */
aiTextureOp_Subtract = 0x2,
/** T = T1 / T2 */
aiTextureOp_Divide = 0x3,
/** T = (T1 + T2) - (T1 * T2) */
aiTextureOp_SmoothAdd = 0x4,
/** T = T1 + (T2-0.5) */
aiTextureOp_SignedAdd = 0x5,
/** @cond never
* This value is not used. It forces the compiler to use at least
* 32 Bit integers to represent this enum.
*/
#ifndef SWIG
_aiTextureOp_Force32Bit = INT_MAX
#endif
//! @endcond
};
// ---------------------------------------------------------------------------
/** @brief Defines how UV coordinates outside the [0...1] range are handled.
*
* Commonly refered to as 'wrapping mode'.
*/
enum aiTextureMapMode
{
/** A texture coordinate u|v is translated to u%1|v%1
*/
aiTextureMapMode_Wrap = 0x0,
/** Texture coordinates outside [0...1]
* are clamped to the nearest valid value.
*/
aiTextureMapMode_Clamp = 0x1,
/** If the texture coordinates for a pixel are outside [0...1]
* the texture is not applied to that pixel
*/
aiTextureMapMode_Decal = 0x3,
/** A texture coordinate u|v becomes u%1|v%1 if (u-(u%1))%2 is zero and
* 1-(u%1)|1-(v%1) otherwise
*/
aiTextureMapMode_Mirror = 0x2,
/** @cond never
* This value is not used. It forces the compiler to use at least
* 32 Bit integers to represent this enum.
*/
#ifndef SWIG
_aiTextureMapMode_Force32Bit = INT_MAX
#endif
//! @endcond
};
// ---------------------------------------------------------------------------
/** @brief Defines how the mapping coords for a texture are generated.
*
* Real-time applications typically require full UV coordinates, so the use of
* the aiProcess_GenUVCoords step is highly recommended. It generates proper
* UV channels for non-UV mapped objects, as long as an accurate description
* how the mapping should look like (e.g spherical) is given.
* See the #AI_MATKEY_MAPPING property for more details.
*/
enum aiTextureMapping
{
/** The mapping coordinates are taken from an UV channel.
*
* The #AI_MATKEY_UVWSRC key specifies from which UV channel
* the texture coordinates are to be taken from (remember,
* meshes can have more than one UV channel).
*/
aiTextureMapping_UV = 0x0,
/** Spherical mapping */
aiTextureMapping_SPHERE = 0x1,
/** Cylindrical mapping */
aiTextureMapping_CYLINDER = 0x2,
/** Cubic mapping */
aiTextureMapping_BOX = 0x3,
/** Planar mapping */
aiTextureMapping_PLANE = 0x4,
/** Undefined mapping. Have fun. */
aiTextureMapping_OTHER = 0x5,
/** @cond never
* This value is not used. It forces the compiler to use at least
* 32 Bit integers to represent this enum.
*/
#ifndef SWIG
_aiTextureMapping_Force32Bit = INT_MAX
#endif
//! @endcond
};
// ---------------------------------------------------------------------------
/** @brief Defines the purpose of a texture
*
* This is a very difficult topic. Different 3D packages support different
* kinds of textures. For very common texture types, such as bumpmaps, the
* rendering results depend on implementation details in the rendering
* pipelines of these applications. Assimp loads all texture references from
* the model file and tries to determine which of the predefined texture
* types below is the best choice to match the original use of the texture
* as closely as possible.<br>
*
* In content pipelines you'll usually define how textures have to be handled,
* and the artists working on models have to conform to this specification,
* regardless which 3D tool they're using.
*/
enum aiTextureType
{
/** Dummy value.
*
* No texture, but the value to be used as 'texture semantic'
* (#aiMaterialProperty::mSemantic) for all material properties
* *not* related to textures.
*/
aiTextureType_NONE = 0x0,
/** The texture is combined with the result of the diffuse
* lighting equation.
*/
aiTextureType_DIFFUSE = 0x1,
/** The texture is combined with the result of the specular
* lighting equation.
*/
aiTextureType_SPECULAR = 0x2,
/** The texture is combined with the result of the ambient
* lighting equation.
*/
aiTextureType_AMBIENT = 0x3,
/** The texture is added to the result of the lighting
* calculation. It isn't influenced by incoming light.
*/
aiTextureType_EMISSIVE = 0x4,
/** The texture is a height map.
*
* By convention, higher gray-scale values stand for
* higher elevations from the base height.
*/
aiTextureType_HEIGHT = 0x5,
/** The texture is a (tangent space) normal-map.
*
* Again, there are several conventions for tangent-space
* normal maps. Assimp does (intentionally) not
* distinguish here.
*/
aiTextureType_NORMALS = 0
遍地是牛
- 粉丝: 783
- 资源: 4
最新资源
- 深度学习配置,用于导入conda中
- 民宿预定管理系统20241105122503
- 企业平台生态嵌入数据集(2000-2023年).xlsx
- 离线OCR(此软件解压后双击即可运行, 免费)
- 公开整理-上市公司员工学历及工资数据(1999-2023年).xlsx
- 公开整理-上市公司员工学历及工资数据集(1999-2023年).dta
- GDAL-3.4.3-cp38-cp38-win-amd64.whl(GDAL轮子-免编译pip直接装,下载即用)
- 【源码+数据库+运行指导视频】基于SSM框架+mysql实现的影城票务管理系统
- 【Unity中世纪风格幻想武器模型】Medieval Weapons - Fantasy Poly Pack
- 基于Java实现WIFI探针的商业大数据分析技术
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈