SceneParameters.h 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. // Copyright (C) 2002-2012 Nikolaus Gebhardt
  2. // This file is part of the "Irrlicht Engine".
  3. // For conditions of distribution and use, see copyright notice in irrlicht.h
  4. #ifndef IRR_I_SCENE_PARAMETERS_H_INCLUDED
  5. #define IRR_I_SCENE_PARAMETERS_H_INCLUDED
  6. #include "irrTypes.h"
  7. /*! \file SceneParameters.h
  8. \brief Header file containing all scene parameters for modifying mesh loading etc.
  9. This file includes all parameter names which can be set using ISceneManager::getParameters()
  10. to modify the behavior of plugins and mesh loaders.
  11. */
  12. namespace irr
  13. {
  14. namespace scene
  15. {
  16. //! Name of the parameter for changing how Irrlicht handles the ZWrite flag for transparent (blending) materials
  17. /** The default behavior in Irrlicht is to disable writing to the
  18. z-buffer for all really transparent, i.e. blending materials. This
  19. avoids problems with intersecting faces, but can also break renderings.
  20. If transparent materials should use the SMaterial flag for ZWriteEnable
  21. just as other material types use this attribute.
  22. Use it like this:
  23. \code
  24. SceneManager->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true);
  25. \endcode
  26. **/
  27. const c8* const ALLOW_ZWRITE_ON_TRANSPARENT = "Allow_ZWrite_On_Transparent";
  28. //! Deprecated, use IMeshLoader::getMeshTextureLoader()->setTexturePath instead.
  29. /** Was used for changing the texture path of the built-in csm loader like this:
  30. \code
  31. SceneManager->getParameters()->setAttribute(scene::CSM_TEXTURE_PATH, "path/to/your/textures");
  32. \endcode
  33. **/
  34. const c8* const CSM_TEXTURE_PATH = "CSM_TexturePath";
  35. //! Deprecated, use IMeshLoader::getMeshTextureLoader()->setTexturePath instead.
  36. /** Was used for changing the texture path of the built-in lmts loader like this:
  37. \code
  38. SceneManager->getParameters()->setAttribute(scene::LMTS_TEXTURE_PATH, "path/to/your/textures");
  39. \endcode
  40. **/
  41. const c8* const LMTS_TEXTURE_PATH = "LMTS_TexturePath";
  42. //! Deprecated, use IMeshLoader::getMeshTextureLoader()->setTexturePath instead.
  43. /** Was used for changing the texture path of the built-in MY3D loader like this:
  44. \code
  45. SceneManager->getParameters()->setAttribute(scene::MY3D_TEXTURE_PATH, "path/to/your/textures");
  46. \endcode
  47. **/
  48. const c8* const MY3D_TEXTURE_PATH = "MY3D_TexturePath";
  49. //! Name of the parameter specifying the COLLADA mesh loading mode
  50. /**
  51. Specifies if the COLLADA loader should create instances of the models, lights and
  52. cameras when loading COLLADA meshes. By default, this is set to false. If this is
  53. set to true, the ISceneManager::getMesh() method will only return a pointer to a
  54. dummy mesh and create instances of all meshes and lights and cameras in the collada
  55. file by itself. Example:
  56. \code
  57. SceneManager->getParameters()->setAttribute(scene::COLLADA_CREATE_SCENE_INSTANCES, true);
  58. \endcode
  59. */
  60. const c8* const COLLADA_CREATE_SCENE_INSTANCES = "COLLADA_CreateSceneInstances";
  61. //! Deprecated, use IMeshLoader::getMeshTextureLoader()->setTexturePath instead.
  62. /** This path is prefixed to the file names defined in the Deled file when loading
  63. textures. This allows to alter the paths for a specific project setting.
  64. Use it like this:
  65. \code
  66. SceneManager->getStringParameters()->setAttribute(scene::DMF_TEXTURE_PATH, "path/to/your/textures");
  67. \endcode
  68. **/
  69. const c8* const DMF_TEXTURE_PATH = "DMF_TexturePath";
  70. //! Name of the parameter for preserving DMF textures dir structure with built-in DMF loader.
  71. /** If this parameter is set to true, the texture directory defined in the Deled file
  72. is ignored, and only the texture name is used to find the proper file. Otherwise, the
  73. texture path is also used, which allows to use a nicer media layout.
  74. Use it like this:
  75. \code
  76. //this way you won't use this setting (default)
  77. SceneManager->getParameters()->setAttribute(scene::DMF_IGNORE_MATERIALS_DIRS, false);
  78. \endcode
  79. \code
  80. //this way you'll use this setting
  81. SceneManager->getParameters()->setAttribute(scene::DMF_IGNORE_MATERIALS_DIRS, true);
  82. \endcode
  83. **/
  84. const c8* const DMF_IGNORE_MATERIALS_DIRS = "DMF_IgnoreMaterialsDir";
  85. //! Name of the parameter for setting reference value of alpha in transparent materials.
  86. /** Use it like this:
  87. \code
  88. //this way you'll set alpha ref to 0.1
  89. SceneManager->getParameters()->setAttribute(scene::DMF_ALPHA_CHANNEL_REF, 0.1);
  90. \endcode
  91. **/
  92. const c8* const DMF_ALPHA_CHANNEL_REF = "DMF_AlphaRef";
  93. //! Name of the parameter for choose to flip or not tga files.
  94. /** Use it like this:
  95. \code
  96. //this way you'll choose to flip alpha textures
  97. SceneManager->getParameters()->setAttribute(scene::DMF_FLIP_ALPHA_TEXTURES, true);
  98. \endcode
  99. **/
  100. const c8* const DMF_FLIP_ALPHA_TEXTURES = "DMF_FlipAlpha";
  101. //! Deprecated, use IMeshLoader::getMeshTextureLoader()->setTexturePath instead.
  102. /** Was used for changing the texture path of the built-in obj loader like this:
  103. \code
  104. SceneManager->getParameters()->setAttribute(scene::OBJ_TEXTURE_PATH, "path/to/your/textures");
  105. \endcode
  106. **/
  107. const c8* const OBJ_TEXTURE_PATH = "OBJ_TexturePath";
  108. //! Flag to avoid loading group structures in .obj files
  109. /** Use it like this:
  110. \code
  111. SceneManager->getParameters()->setAttribute(scene::OBJ_LOADER_IGNORE_GROUPS, true);
  112. \endcode
  113. **/
  114. const c8* const OBJ_LOADER_IGNORE_GROUPS = "OBJ_IgnoreGroups";
  115. //! Flag to avoid loading material .mtl file for .obj files
  116. /** Use it like this:
  117. \code
  118. SceneManager->getParameters()->setAttribute(scene::OBJ_LOADER_IGNORE_MATERIAL_FILES, true);
  119. \endcode
  120. **/
  121. const c8* const OBJ_LOADER_IGNORE_MATERIAL_FILES = "OBJ_IgnoreMaterialFiles";
  122. //! Flag to ignore the b3d file's mipmapping flag
  123. /** Instead Irrlicht's texture creation flag is used. Use it like this:
  124. \code
  125. SceneManager->getParameters()->setAttribute(scene::B3D_LOADER_IGNORE_MIPMAP_FLAG, true);
  126. \endcode
  127. **/
  128. const c8* const B3D_LOADER_IGNORE_MIPMAP_FLAG = "B3D_IgnoreMipmapFlag";
  129. //! Deprecated, use IMeshLoader::getMeshTextureLoader()->setTexturePath instead.
  130. /** Was used for changing the texture path of the built-in b3d loader like this:
  131. \code
  132. SceneManager->getParameters()->setAttribute(scene::B3D_TEXTURE_PATH, "path/to/your/textures");
  133. \endcode
  134. **/
  135. const c8* const B3D_TEXTURE_PATH = "B3D_TexturePath";
  136. //! Flag set as parameter when the scene manager is used as editor
  137. /** In this way special animators like deletion animators can be stopped from
  138. deleting scene nodes for example */
  139. const c8* const IRR_SCENE_MANAGER_IS_EDITOR = "IRR_Editor";
  140. //! Name of the parameter for setting the length of debug normals.
  141. /** Use it like this:
  142. \code
  143. SceneManager->getParameters()->setAttribute(scene::DEBUG_NORMAL_LENGTH, 1.5f);
  144. \endcode
  145. **/
  146. const c8* const DEBUG_NORMAL_LENGTH = "DEBUG_Normal_Length";
  147. //! Name of the parameter for setting the color of debug normals.
  148. /** Use it like this:
  149. \code
  150. SceneManager->getParameters()->setAttributeAsColor(scene::DEBUG_NORMAL_COLOR, video::SColor(255, 255, 255, 255));
  151. \endcode
  152. **/
  153. const c8* const DEBUG_NORMAL_COLOR = "DEBUG_Normal_Color";
  154. } // end namespace scene
  155. } // end namespace irr
  156. #endif