SceneParameters.h 6.6 KB

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