From 393b5cd1dc438872af89d334ef6e5fcc59f27d47 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 13 Jan 2013 17:24:39 +1000 Subject: Added Irrlicht 1.8, but without all the Windows binaries. --- .../doc/html/_i_collada_mesh_writer_8h_source.html | 415 +++++++++++++++++++++ 1 file changed, 415 insertions(+) create mode 100644 libraries/irrlicht-1.8/doc/html/_i_collada_mesh_writer_8h_source.html (limited to 'libraries/irrlicht-1.8/doc/html/_i_collada_mesh_writer_8h_source.html') diff --git a/libraries/irrlicht-1.8/doc/html/_i_collada_mesh_writer_8h_source.html b/libraries/irrlicht-1.8/doc/html/_i_collada_mesh_writer_8h_source.html new file mode 100644 index 0000000..9efb0f9 --- /dev/null +++ b/libraries/irrlicht-1.8/doc/html/_i_collada_mesh_writer_8h_source.html @@ -0,0 +1,415 @@ + + +
+ +00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt +00002 // This file is part of the "Irrlicht Engine". +00003 // For conditions of distribution and use, see copyright notice in irrlicht.h +00004 +00005 #ifndef __IRR_I_COLLADA_MESH_WRITER_H_INCLUDED__ +00006 #define __IRR_I_COLLADA_MESH_WRITER_H_INCLUDED__ +00007 +00008 #include "IMeshWriter.h" +00009 #include "ISceneNode.h" +00010 #include "IAnimatedMesh.h" +00011 #include "SMaterial.h" +00012 +00013 namespace irr +00014 { +00015 namespace io +00016 { +00017 class IWriteFile; +00018 } // end namespace io +00019 +00020 namespace scene +00021 { +00023 enum E_COLLADA_TECHNIQUE_FX +00024 { +00027 ECTF_BLINN, +00029 ECTF_PHONG, +00031 ECTF_LAMBERT, +00032 // constantly shaded surface that is independent of lighting. +00033 ECTF_CONSTANT +00034 }; +00035 +00037 enum E_COLLADA_TRANSPARENT_FX +00038 { +00040 ECOF_A_ONE = 0, +00041 +00043 ECOF_RGB_ZERO = 1 +00044 }; +00045 +00047 enum E_COLLADA_COLOR_SAMPLER +00048 { +00049 ECCS_DIFFUSE, +00050 ECCS_AMBIENT, +00051 ECCS_EMISSIVE, +00052 ECCS_SPECULAR, +00053 ECCS_TRANSPARENT, +00054 ECCS_REFLECTIVE +00055 }; +00056 +00058 enum E_COLLADA_IRR_COLOR +00059 { +00061 ECIC_NONE, +00062 +00064 ECIC_CUSTOM, +00065 +00067 ECIC_DIFFUSE, +00068 +00070 ECIC_AMBIENT, +00071 +00073 ECIC_EMISSIVE, +00074 +00076 ECIC_SPECULAR +00077 }; +00078 +00080 enum E_COLLADA_GEOMETRY_WRITING +00081 { +00083 ECGI_PER_MESH, +00084 +00088 ECGI_PER_MESH_AND_MATERIAL +00089 }; +00090 +00092 class IColladaMeshWriterProperties : public virtual IReferenceCounted +00093 { +00094 public: +00095 virtual ~IColladaMeshWriterProperties () {} +00096 +00098 virtual E_COLLADA_TECHNIQUE_FX getTechniqueFx(const video::SMaterial& material) const = 0; +00099 +00101 +00104 virtual s32 getTextureIdx(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) const = 0; +00105 +00107 +00111 virtual E_COLLADA_IRR_COLOR getColorMapping(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) const = 0; +00112 +00114 +00115 virtual video::SColor getCustomColor(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) const = 0; +00116 +00118 +00119 virtual E_COLLADA_TRANSPARENT_FX getTransparentFx(const video::SMaterial& material) const = 0; +00120 +00122 +00124 virtual f32 getTransparency(const video::SMaterial& material) const = 0; +00125 +00127 +00129 virtual f32 getReflectivity(const video::SMaterial& material) const = 0; +00130 +00132 +00134 virtual f32 getIndexOfRefraction(const video::SMaterial& material) const = 0; +00135 +00138 virtual bool isExportable(const irr::scene::ISceneNode * node) const = 0; +00139 +00142 // Note: Function is not const because there is no const getMesh() function. +00143 virtual IMesh* getMesh(irr::scene::ISceneNode * node) = 0; +00144 +00146 +00150 virtual bool useNodeMaterial(const scene::ISceneNode* node) const = 0; +00151 +00152 }; +00153 +00155 +00158 class IColladaMeshWriterNames : public virtual IReferenceCounted +00159 { +00160 public: +00161 +00162 virtual ~IColladaMeshWriterNames () {} +00163 +00165 +00174 virtual irr::core::stringw nameForMesh(const scene::IMesh* mesh, int instance) = 0; +00175 +00177 +00183 virtual irr::core::stringw nameForNode(const scene::ISceneNode* node) = 0; +00184 +00186 +00196 virtual irr::core::stringw nameForMaterial(const video::SMaterial & material, int materialId, const scene::IMesh* mesh, const scene::ISceneNode* node) = 0; +00197 }; +00198 +00199 +00201 class IColladaMeshWriter : public IMeshWriter +00202 { +00203 public: +00204 +00205 IColladaMeshWriter() +00206 : Properties(0), DefaultProperties(0), NameGenerator(0), DefaultNameGenerator(0) +00207 , WriteTextures(true), WriteDefaultScene(true), ExportSMaterialOnce(true) +00208 , AmbientLight(0.f, 0.f, 0.f, 1.f) +00209 { +00210 } +00211 +00213 virtual ~IColladaMeshWriter() +00214 { +00215 if ( Properties ) +00216 Properties->drop(); +00217 if ( DefaultProperties ) +00218 DefaultProperties->drop(); +00219 if ( NameGenerator ) +00220 NameGenerator->drop(); +00221 if ( DefaultNameGenerator ) +00222 DefaultNameGenerator->drop(); +00223 } +00224 +00226 virtual bool writeScene(io::IWriteFile* file, scene::ISceneNode* root) = 0; +00227 +00228 +00230 virtual void setWriteTextures(bool write) +00231 { +00232 WriteTextures = write; +00233 } +00234 +00236 virtual bool getWriteTextures() const +00237 { +00238 return WriteTextures; +00239 } +00240 +00242 +00246 virtual void setWriteDefaultScene(bool write) +00247 { +00248 WriteDefaultScene = write; +00249 } +00250 +00252 virtual bool getWriteDefaultScene() const +00253 { +00254 return WriteDefaultScene; +00255 } +00256 +00258 virtual void setAmbientLight(const video::SColorf &ambientColor) +00259 { +00260 AmbientLight = ambientColor; +00261 } +00262 +00264 virtual video::SColorf getAmbientLight() const +00265 { +00266 return AmbientLight; +00267 } +00268 +00270 +00277 virtual void setGeometryWriting(E_COLLADA_GEOMETRY_WRITING writeStyle) +00278 { +00279 GeometryWriting = writeStyle; +00280 } +00281 +00283 virtual E_COLLADA_GEOMETRY_WRITING getGeometryWriting() const +00284 { +00285 return GeometryWriting; +00286 } +00287 +00289 +00296 virtual void setExportSMaterialsOnlyOnce(bool exportOnce) +00297 { +00298 ExportSMaterialOnce = exportOnce; +00299 } +00300 +00301 virtual bool getExportSMaterialsOnlyOnce() const +00302 { +00303 return ExportSMaterialOnce; +00304 } +00305 +00307 +00309 virtual void setProperties(IColladaMeshWriterProperties * p) +00310 { +00311 if ( p == Properties ) +00312 return; +00313 if ( p ) +00314 p->grab(); +00315 if ( Properties ) +00316 Properties->drop(); +00317 Properties = p; +00318 } +00319 +00321 virtual IColladaMeshWriterProperties * getProperties() const +00322 { +00323 return Properties; +00324 } +00325 +00327 +00328 IColladaMeshWriterProperties * getDefaultProperties() const +00329 { +00330 return DefaultProperties; +00331 } +00332 +00334 virtual void setNameGenerator(IColladaMeshWriterNames * nameGenerator) +00335 { +00336 if ( nameGenerator == NameGenerator ) +00337 return; +00338 if ( nameGenerator ) +00339 nameGenerator->grab(); +00340 if ( NameGenerator ) +00341 NameGenerator->drop(); +00342 NameGenerator = nameGenerator; +00343 } +00344 +00346 virtual IColladaMeshWriterNames * getNameGenerator() const +00347 { +00348 return NameGenerator; +00349 } +00350 +00352 +00353 IColladaMeshWriterNames * getDefaultNameGenerator() const +00354 { +00355 return DefaultNameGenerator; +00356 } +00357 +00359 +00360 virtual irr::core::stringw toNCName(const irr::core::stringw& oldString, const irr::core::stringw& prefix=irr::core::stringw(L"_NC_")) const = 0; +00361 +00362 +00363 protected: +00364 // NOTE: You usually should also call setProperties with the same paraemter when using setDefaultProperties +00365 virtual void setDefaultProperties(IColladaMeshWriterProperties * p) +00366 { +00367 if ( p == DefaultProperties ) +00368 return; +00369 if ( p ) +00370 p->grab(); +00371 if ( DefaultProperties ) +00372 DefaultProperties->drop(); +00373 DefaultProperties = p; +00374 } +00375 +00376 // NOTE: You usually should also call setNameGenerator with the same paraemter when using setDefaultProperties +00377 virtual void setDefaultNameGenerator(IColladaMeshWriterNames * p) +00378 { +00379 if ( p == DefaultNameGenerator ) +00380 return; +00381 if ( p ) +00382 p->grab(); +00383 if ( DefaultNameGenerator ) +00384 DefaultNameGenerator->drop(); +00385 DefaultNameGenerator = p; +00386 } +00387 +00388 private: +00389 IColladaMeshWriterProperties * Properties; +00390 IColladaMeshWriterProperties * DefaultProperties; +00391 IColladaMeshWriterNames * NameGenerator; +00392 IColladaMeshWriterNames * DefaultNameGenerator; +00393 bool WriteTextures; +00394 bool WriteDefaultScene; +00395 bool ExportSMaterialOnce; +00396 video::SColorf AmbientLight; +00397 E_COLLADA_GEOMETRY_WRITING GeometryWriting; +00398 }; +00399 +00400 +00401 } // end namespace +00402 } // end namespace +00403 +00404 #endif +