DATAKIT SDK  V2026.4
dtk_render.hpp
Go to the documentation of this file.
1 #ifndef __UTIL_DTK_RENDER_HPP__
2 #define __UTIL_DTK_RENDER_HPP__
3 #include "def/define.h"
8 #include "util/dtk_picture.hpp"
9 #include "util/error_dtk.hpp"
10 #include "util/util_ptr_dtk.hpp"
11 #include "util/util_stl_dtk.hpp"
12 #include <memory>
13 
14 class Dtk_TextureInfos ;
15 class Dtk_LightMap ;
16 class Dtk_RenderInfos ;
17 
21 
22 
23 /////////////////////////////////////////////////////////////////////////////
24 //! \ingroup DtkAPIGroup
25 //! \class Dtk_RenderInfos
26 //! \brief This is the Dtk_RenderInfos Class.\n
27 //! The Dtk_RenderInfosPtr object is used to store any informations about rendering
28 //! It contains lighting information and texture information.\n
29 //! \SmartPtr{Dtk_RenderInfosPtr}
31 {
32 public:
34  {
45  BuildingMapping = 10
46  };
47 
48 protected:
50  struct Dtk_Handle;
51  std::unique_ptr<Dtk_Handle> _Private;
52 
53  //! \sa Create( Dtk_TextureInfos const& )
56  //! \sa Dtk_TextureInfos
58 
59  //! \BaseDestructor
60  virtual ~Dtk_TextureInfos();
61  friend class Dtk_SmartPtr<Dtk_TextureInfos>;
62 
63  inline virtual Dtk_Object* Clone() { return new Dtk_TextureInfos(*this); }
64 
65 public:
66  //! \brief Create a Dtk_TextureInfosPtr.
67  //! \param inType : Mapping type:
68  //! Mapping type can be :
69  //! - StoredUVMapping : Using Dtk_Mesh UV texture coordinates,
70  //! - PlanarMapping / CylinderMapping / SphericalMapping / CubicalMapping : Applying standard mapping
71  //! Coordinate (0, 0) represents top left corner of image.
72  //! \return the constructed Dtk_TextureInfosPtr.
74 
75  //! \CreateCopy{in}
77 
78  //! \DtkDynamicType
79  inline Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
80  {
81  if (inId == _typeID) return 1;
82  return Dtk_Object::DtkDynamicType(inId);
83  }
84 
85  //! \DtkDynamicCast
87  {
88  if (s->DtkDynamicType(_typeID)) return static_cast<Dtk_TextureInfos*>(s);
89  return NULL;
90  }
91 
92  //! \brief Returns U scale factor
94 
95  //! \brief Returns V scale factor
97 
98  //! \brief Returns U offset
100 
101  //! \brief Returns V offset
103 
104  //! \brief Returns image size
106 
107  //! \brief Returns rotate angle
109 
110  //! \brief Returns if U flipped
112 
113  //! \brief Returns if V flipped
115 
116  //! \brief Returns if texture is U repeat
118 
119  //! \brief Returns if texture is V repeat
121 
122  //! \brief Return image path
124 
125  //! \brief Returns Dtk_picture
127 
128  //! \brief Returns mapping type
130 
131  //! \brief Returns texture transfo
133 
134  //! \brief Sets image U and V scale
135  void SetScale(Dtk_Double64 inUScale,Dtk_Double64 inVScale);
136 
137  //! \brief Sets image U and V offset
138  void SetOffset(Dtk_Double64 inUOffset,Dtk_Double64 inVOffset);
139 
140  //! \brief Sets image U and V flip
141  void SetFlipFlag(Dtk_bool inUFlip,Dtk_bool inVFlip);
142 
143  //! \brief Sets image U and V flip
144  void SetRepeat(Dtk_bool inURepeat, Dtk_bool inVRepeat);
145 
146  //! \brief Sets image size
148 
149  //! \brief Sets image rotate angle
151 
152  //! \brief Sets image file path
153  void SetImagePath(Dtk_string inImagePath);
154 
155  //! \brief Sets Dtk_picture
156  void SetTextureImage(Dtk_picture *inImage);
157 
158  //! \brief Sets image transfo
159  void SetTransfo(Dtk_transfoPtr inTransfo);
160 };
161 /////////////////////////////////////////////////////////////////////////////
162 
163 
164 class Dtk_LightMap : public Dtk_Object
165 {
166 protected:
167  enum { _typeID = DTK_TYPE_LIGHT };
168  struct Dtk_Handle;
169  std::unique_ptr<Dtk_Handle> _Private;
170 
171  //! \sa Create( Dtk_LightMap const& )
174  //! \sa Create Dtk_LightMap
176 
177  Dtk_LightMap(Dtk_RGB inAmbient,Dtk_RGB inDiffuse, Dtk_RGB inSpecular);
178 
179  //! \BaseDestructor
180  virtual ~Dtk_LightMap();
181  friend class Dtk_SmartPtr<Dtk_LightMap>;
182 
183  inline virtual Dtk_Object* Clone() { return new Dtk_LightMap(*this); }
184 
185 
186 public:
187  //! \brief Create a Dtk_LightMapPtr.
188  //! \param Ambient RGB color
189  //! \param Diffuse RGB color
190  //! \param Specular RGB color
191  //! \return the constructed Dtk_LightMapPtr.
192  static Dtk_LightMapPtr Create(Dtk_RGB inAmbiant,Dtk_RGB inDiffuse, Dtk_RGB inSpecular);
193 
194  //! \CreateCopy{in}
195  static Dtk_LightMapPtr Create( Dtk_LightMap const& in );
196 
197 
198  //! \DtkDynamicType
199  inline Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
200  {
201  if (inId == _typeID) return 1;
202  return Dtk_Object::DtkDynamicType(inId);
203  }
204 
205  //! \DtkDynamicCast
207  {
208  if (s->DtkDynamicType(_typeID)) return static_cast<Dtk_LightMap*>(s);
209  return NULL;
210  }
211 
212  //! \brief Returns the ambient light emitted from the surface
214 
215  //! \brief Returns the ambient ratio
216  //! \remark : Default ratio is 1.0
218 
219  //! \brief Returns the ambient light diffusely reflected from the surface of this object
221 
222  //! \brief Returns the diffuse ratio
223  //! \remark : Default ratio is 1.0
225 
226  //! \brief Returns the ambient light specularly reflected from the surface of this object
228 
229  //! \brief Returns the specular ratio
230  //! \remark : Default ratio is 1.0
232 
233 
234  //! \brief Returns the color and amount of a perfect mirror reflection
236 
237  //! \brief Returns the reflective ratio
238  //! \remark : Default ratio is 1.0
240 
241  //! \brief Returns the color and amount of perfectly refracted light
243 
244  //! \brief Returns the transparent ratio
245  //! \remark : Default ratio is 0.0
247 
248  //! \brief Returns the color and amount of light emitted from the surface of this object
250 
251  //! \brief Returns the emissive ratio
252  //! \remark : Default ratio is 1.0
254 
255  //! \brief Returns the Shininess ratio
257 
258  //! \brief Set the Shininess ratio (0.0 - 1.0)
259  void SetShininessRatio(Dtk_Double64 inShininess);
260 
261  //! \brief Adds the color and amount of a perfect mirror reflection
262  void AddReflectiveColor(const Dtk_RGB &inColor);
263 
264  //! \brief Adds the color and amount of perfectly refracted light
265  void AddTransparentColor(const Dtk_RGB &inColor);
266 
267  //! \brief Sets the ratio of transparency (0.0 : opaque, 1.0 : transparent)
269 
270  //! \brief Adds the light emitted from the surface of this object
271  void AddEmissiveColor(const Dtk_RGB &inColor);
272 
273 };
274 /////////////////////////////////////////////////////////////////////////////
275 
276 
277 
279 {
280 public:
282  {
283  Unknown = 0,
284  Default = 1,
296  CarPaint = 13,
298  Diffuse = 15
299  };
300 protected:
302  struct Dtk_Handle;
303  std::unique_ptr<Dtk_Handle> _Private;
304 
305  //! \sa Create( Dtk_RenderInfos const& )
308  //! \sa CreateDtk_LightMap
309  Dtk_RenderInfos(const Dtk_string &inName,const Dtk_LightMapPtr &inLigths,const Dtk_TextureInfosPtr &inTexture);
310 
311  //! \BaseDestructor
312  virtual ~Dtk_RenderInfos();
313  friend class Dtk_SmartPtr<Dtk_RenderInfos>;
314 
315  inline virtual Dtk_Object* Clone() { return new Dtk_RenderInfos(*this); }
316 
317 
318 public:
319  //! \brief Creates a Dtk_RenderInfosPtr.
320  //! \param[in] inName name.
321  //! \return the constructed Dtk_RenderInfosPtr.
322  static Dtk_RenderInfosPtr Create(const Dtk_string &inName);
323 
324  //! \brief Creates a Dtk_RenderInfosPtr.
325  //! \param[in] inName name.
326  //! \param[in] inLights light map.
327  //! \param[in] inTexture texture.
328  //! \return the constructed Dtk_RenderInfosPtr.
329  static Dtk_RenderInfosPtr Create(const Dtk_string &inName,const Dtk_LightMapPtr &inLights,const Dtk_TextureInfosPtr &inTexture);
330 
331  //! \CreateCopy{in}
333 
334 
335 
336  //! \DtkDynamicType
337  inline Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
338  {
339  if (inId == _typeID) return 1;
340  return Dtk_Object::DtkDynamicType(inId);
341  }
342 
343  //! \DtkDynamicCast
345  {
346  if (s->DtkDynamicType(_typeID)) return static_cast<Dtk_RenderInfos*>(s);
347  return NULL;
348  }
349 
350  //! \brief Returns the texture name.
351  Dtk_string GetName() const;
352 
353  //! \brief Returns shader type.
355 
356  //! \brief Sets the render name.
357  void SetName(const Dtk_string& inName);
358 
359  //! \brief Sets the render light map.
360  void SetLightMap(const Dtk_LightMapPtr &inLights);
361 
362  //! \brief Sets the render texture information.
363  void SetTexture(const Dtk_TextureInfosPtr &inTexture);
364 
365  //! \brief Returns the render light map.
367 
368  //! \brief Returns the render texture.
370 
371  //! \brief Sets the render file path.
372  void SetRenderFilePath(const Dtk_string& inFilePath);
373 
374  //! \brief Returns the render file path.
376 
377  //! \brief Adds the shader type.
378  void AddShaderType( const RenderMappingShaderTypeEnum & inShaderType );
379 
380 };
381 
382 
384 {
385 public:
386 
388  {
392  Orthotrope = 3
393  };
394 
395 protected:
397  struct Dtk_Handle;
398  std::unique_ptr<Dtk_Handle> _Private;
399 
400  //! \sa Create( const Dtk_PhysicalMaterialInfos& )
402 
403  //! \sa Create Dtk_PhysicalMaterialInfos
406  //! \BaseDestructor
409 
410  inline virtual Dtk_Object* Clone() { return new Dtk_PhysicalMaterialInfos(*this); }
411 
412 public:
413 
414  //! \brief Creates a Dtk_MaterialInfosPtr.
415  //! \param[in] inName the desired name for the material.
416  //! \param[in] inType the desired type for the material.
417  //! \return the constructed Dtk_MaterialInfosPtr.
419 
420  //! \CreateCopy{in}
422 
423 
424  //! \DtkDynamicType
425  inline Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
426  {
427  if (inId == _typeID) return 1;
428  return Dtk_Object::DtkDynamicType(inId);
429  }
430 
431  //! \DtkDynamicCast
433  {
434  if (s->DtkDynamicType(_typeID)) return static_cast<Dtk_PhysicalMaterialInfos*>(s);
435  return NULL;
436  }
437 
438  //! \brief Returns the material name.
439  //! \return the material name as a Dtk_string.
441 
442  //! \brief Sets the material name.
443  //! \param[in] inName : the desired name.
444  //! \return dtkNoError.
446 
447  //! \brief Returns the material type as a Dtk_string.
448  //! \return the material type as a Dtk_string.
450 
451  //! \brief Returns the material type.
452  //! \return the material type.
454 
455  //! \brief Sets the material type
456  //! \param[in] inType : the desired type.
457  //! \return dtkNoError.
459 
460  //! \brief Returns the material density
461  //! \param[out] outValue : the density value.
462  //! \param[out] outUnits : the density unit as a Dtk_string.
463  //! \return dtkErrorNotProcessed if not applicable, dtkNoError if value is correctly returned.
464  Dtk_ErrorStatus GetDensity(Dtk_Double64 &outValue, Dtk_string &outUnits) const;
465 
466  //! \brief Sets the material density.
467  //! \param[in] inValue : the desired density value.
468  //! \param[in] inUnits : the desired density unit as a Dtk_string.
469  //! \return dtkNoError.
471 
472  //! \brief Returns the material thermal expansion.
473  //! \param[out] outValue : the thermal expansion value.
474  //! \param[out] outUnits : the thermal expansion unit as a Dtk_string.
475  //! \return dtkErrorNotProcessed if not applicable, dtkNoError if value is correctly returned.
477 
478  //! \brief Sets the material thermal expansion.
479  //! \param[in] inValue : the desired thermal expansion value.
480  //! \param[in] inUnits : the desired thermal expansion unit as a Dtk_string.
481  //! \return dtkNoError.
483 
484  //! \brief Returns the material thermal conductivity.
485  //! \param[out] outValue : the thermal conductivity value.
486  //! \param[out] outUnits : the thermal conductivity unit as a Dtk_string.
487  //! \return dtkErrorNotProcessed if not applicable, dtkNoError if value is correctly returned.
489 
490  //! \brief Sets the material thermal conductivity.
491  //! \param[in] inValue : the desired thermal conductivity value.
492  //! \param[in] inUnits : the desired thermal conductivity unit as a Dtk_string.
493  //! \return dtkNoError.
495 
496 
497  //! \brief Returns the material yield strength.
498  //! \param[out] outValue : the yield strength value.
499  //! \param[out] outUnits : the yield strength unit as a Dtk_string.
500  //! \return dtkErrorNotProcessed if not applicable, dtkNoError if value is correctly returned.
502 
503  //! \brief Sets the material yield strength.
504  //! \param[in] inValue : the desired yield strength value.
505  //! \param[in] inUnits : the desired yield strength unit as a Dtk_string.
506  //! \return dtkNoError.
508 
509  //! \brief Returns the material specific heat.
510  //! \param[out] outValue : the specific heat value.
511  //! \param[out] outUnits : the specific heat unit as a Dtk_string.
512  //! \return dtkErrorNotProcessed if not applicable, dtkNoError if value is correctly returned.
514 
515  //! \brief Sets the material specific heat.
516  //! \param[in] inValue : the desired specific heat value.
517  //! \param[in] inUnits : the desired specific heat unit as a Dtk_string.
518  //! \return dtkNoError.
520 
521  //! \brief Returns the material tensile strength.
522  //! \param[out] outValue : the tensile strength value.
523  //! \param[out] outUnits : the tensile strength unit as a Dtk_string.
524  //! \return dtkErrorNotProcessed if not applicable, dtkNoError if value is correctly returned.
526 
527  //! \brief Sets the material tensile strength.
528  //! \param[in] inValue : the desired specific heat value.
529  //! \param[in] inUnits : the desired specific heat unit as a Dtk_string.
530  //! \return dtkNoError.
532 
533 
534  //! \brief Returns the material young modulus.
535  //! \param[out] outYoungModulus : the young modulus values.
536  //! \param[out] outUnits : the tensile strength unit as a Dtk_string.
537  //! \return dtkErrorNotProcessed if not applicable, dtkNoError if value is correctly returned.
538  Dtk_ErrorStatus GetYoungModulus(Dtk_Double64 outYoungModulus[3], Dtk_string &outUnits ) const;
539 
540  //! \brief Sets the material young modulus.
541  //! \param[in] inYoungModulus : the desired young modulus values.
542  //! \param[in] inUnits : the desired young modulus unit as a Dtk_string.
543  //! \return dtkNoError.
545 
546  //! \brief Returns the material shear modulus
547  //! \param[out] outShearModulus : the shear modulus values.
548  //! \param[out] outUnits : the shear modulus unit as a Dtk_string.
549  //! \return dtkErrorNotProcessed if not applicable, dtkNoError if value is correctly returned.
550  Dtk_ErrorStatus GetShearModulus(Dtk_Double64 outShearModulus[3], Dtk_string &outUnits) const;
551 
552  //! \brief Sets the material shear modulus.
553  //! \param[in] inShearModulus : the desired shear modulus values.
554  //! \param[in] inUnits : the desired shear modulus unit as a Dtk_string.
555  //! \return dtkNoError.
557 
558  //! \brief Returns the material poisson ratio.
559  //! \param[out] outShearModulus : the poisson ratio values.
560  //! \return dtkErrorNotProcessed if not applicable, dtkNoError if value is correctly returned.
561  Dtk_ErrorStatus GetPoissonRatio(Dtk_Double64 outPoissonRatio[3]) const;
562 
563  //! \brief Sets the material poisson ratio.
564  //! \param[in] inPoissonRatio : the desired poisson ratio values.
565  //! \return dtkNoError.
567 
568  //! \brief Returns the material hardening ratio.
569  //! \param[out] ouHardeningRatio : the hardening ratio values.
570  //! \return dtkErrorNotProcessed if not applicable, dtkNoError if value is correctly returned.
571  Dtk_ErrorStatus GetHardeningRatio(Dtk_Double64 ouHardeningRatio[3]) const;
572 
573  //! \brief Sets the material hardening ratio.
574  //! \param[in] inHardeningRatio : the desired hardening ratio values.
575  //! \return dtkNoError.
577 
578  //! \brief Sets the material custom data.
579  //! \param[in] inCustomData : the custom data as Dtk_tab<Dtk_MetaDataPtr>.
580  //! \return dtkNoError.
582 
583  //! \brief Returns the material custom data.
584  //! \return the custom data as Dtk_tab<Dtk_MetaDataPtr>.
586 
587 };
588 
589 
590 #endif
Dtk_RenderInfos::SetLightMap
void SetLightMap(const Dtk_LightMapPtr &inLights)
Sets the render light map.
Dtk_RenderInfos::CarPaint
@ CarPaint
Definition: dtk_render.hpp:296
Dtk_PhysicalMaterialInfos::GetDensity
Dtk_ErrorStatus GetDensity(Dtk_Double64 &outValue, Dtk_string &outUnits) const
Returns the material density.
Dtk_PhysicalMaterialInfos::SetCustomData
Dtk_ErrorStatus SetCustomData(Dtk_tab< Dtk_MetaDataPtr > inCustomData)
Sets the material custom data.
Dtk_PhysicalMaterialInfos::DtkDynamicCast
static Dtk_PhysicalMaterialInfos * DtkDynamicCast(Dtk_Object *s)
Performs a dynamic cast - doesn't need RTTI -.
Definition: dtk_render.hpp:432
Dtk_TextureInfos::TextureMappingTypeEnum
TextureMappingTypeEnum
Definition: dtk_render.hpp:34
Dtk_RenderInfos::Diffuse
@ Diffuse
Definition: dtk_render.hpp:298
Dtk_LightMap::Dtk_LightMap
Dtk_LightMap()
Dtk_RenderInfos::GetLightMap
Dtk_LightMapPtr GetLightMap() const
Returns the render light map.
Dtk_RenderInfos::Translucent
@ Translucent
Definition: dtk_render.hpp:294
Dtk_TextureInfos::GetTextureImage
Dtk_picture * GetTextureImage() const
Returns Dtk_picture.
Dtk_TextureInfos::SkyCylinderMapping
@ SkyCylinderMapping
Definition: dtk_render.hpp:41
Dtk_TextureInfos::GetUOffset
Dtk_Double64 GetUOffset() const
Returns U offset.
Dtk_RenderInfos::DtkDynamicType
Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
Retrieves the dynamic entity type.
Definition: dtk_render.hpp:337
DTK_TYPE_MATERIAL_INFOS
@ DTK_TYPE_MATERIAL_INFOS
Definition: define.h:516
Dtk_PhysicalMaterialInfos::SetHardeningRatio
Dtk_ErrorStatus SetHardeningRatio(Dtk_Double64 inHardeningRatio[3])
Sets the material hardening ratio.
Dtk_TextureInfos::Create
static Dtk_TextureInfosPtr Create(const TextureMappingTypeEnum &inType)
Create a Dtk_TextureInfosPtr.
Dtk_LightMap::GetShininessRatio
Dtk_Double64 GetShininessRatio() const
Returns the Shininess ratio.
Dtk_RenderInfos::SubsurfaceScattering
@ SubsurfaceScattering
Definition: dtk_render.hpp:297
Dtk_TextureInfos::CylinderMapping
@ CylinderMapping
Definition: dtk_render.hpp:37
Dtk_TextureInfos::DtkDynamicCast
static Dtk_TextureInfos * DtkDynamicCast(Dtk_Object *s)
Performs a dynamic cast - doesn't need RTTI -.
Definition: dtk_render.hpp:86
Dtk_RenderInfos::ArchitecturalAndDesign
@ ArchitecturalAndDesign
Definition: dtk_render.hpp:285
Dtk_RenderInfos::ClearGlass
@ ClearGlass
Definition: dtk_render.hpp:289
Dtk_RenderInfos::Create
static Dtk_RenderInfosPtr Create(Dtk_RenderInfos const &in)
Calls copy constructor to allocate a new object.
Dtk_TextureInfos::IsURepeat
Dtk_bool IsURepeat() const
Returns if texture is U repeat.
Dtk_RenderInfos::GetShaderType
RenderMappingShaderTypeEnum GetShaderType() const
Returns shader type.
Dtk_TextureInfos::UVBRepMapping
@ UVBRepMapping
Definition: dtk_render.hpp:44
Dtk_RenderInfos::BrushedMetal
@ BrushedMetal
Definition: dtk_render.hpp:288
Dtk_LightMap::GetAmbientColor
Dtk_RGB GetAmbientColor() const
Returns the ambient light emitted from the surface.
Dtk_TextureInfos::GetImagePath
Dtk_string GetImagePath() const
Return image path.
Dtk_LightMap::SetTransparentRatio
void SetTransparentRatio(Dtk_Double64 inRatio)
Sets the ratio of transparency (0.0 : opaque, 1.0 : transparent)
Dtk_TextureInfos::IsVRepeat
Dtk_bool IsVRepeat() const
Returns if texture is V repeat.
Dtk_PhysicalMaterialInfos::SetDensity
Dtk_ErrorStatus SetDensity(Dtk_Double64 inValue, Dtk_string inUnits)
Sets the material density.
Dtk_PhysicalMaterialInfos::GetShearModulus
Dtk_ErrorStatus GetShearModulus(Dtk_Double64 outShearModulus[3], Dtk_string &outUnits) const
Returns the material shear modulus.
Dtk_PhysicalMaterialInfos::Create
static Dtk_PhysicalMaterialInfosPtr Create(const Dtk_PhysicalMaterialInfos &in)
Calls copy constructor to allocate a new object.
Dtk_PhysicalMaterialInfos::Dtk_PhysicalMaterialInfos
Dtk_PhysicalMaterialInfos(const Dtk_PhysicalMaterialInfos &)
Dtk_RenderInfos::SetName
void SetName(const Dtk_string &inName)
Sets the render name.
DTK_TYPE_LIGHT
@ DTK_TYPE_LIGHT
Definition: define.h:560
Dtk_RenderInfos::SoftPlastic
@ SoftPlastic
Definition: dtk_render.hpp:293
Dtk_PhysicalMaterialInfos::Create
static Dtk_PhysicalMaterialInfosPtr Create(Dtk_string inName, MaterialSymetryType inType)
Creates a Dtk_MaterialInfosPtr.
Dtk_LightMap::GetTransparentRatio
Dtk_Double64 GetTransparentRatio() const
Returns the transparent ratio
Dtk_TextureInfos
Definition: dtk_render.hpp:31
Dtk_TextureInfos::SkyPlanarMapping
@ SkyPlanarMapping
Definition: dtk_render.hpp:40
Dtk_PhysicalMaterialInfos::SetName
Dtk_ErrorStatus SetName(Dtk_string inName)
Sets the material name.
Dtk_PhysicalMaterialInfos::GetSpecificHeat
Dtk_ErrorStatus GetSpecificHeat(Dtk_Double64 &outValue, Dtk_string &outUnits) const
Returns the material specific heat.
Dtk_TextureInfos::GetRotateAngle
Dtk_Double64 GetRotateAngle() const
Returns rotate angle.
Dtk_LightMap::AddReflectiveColor
void AddReflectiveColor(const Dtk_RGB &inColor)
Adds the color and amount of a perfect mirror reflection.
Dtk_RenderInfos::Create
static Dtk_RenderInfosPtr Create(const Dtk_string &inName, const Dtk_LightMapPtr &inLights, const Dtk_TextureInfosPtr &inTexture)
Creates a Dtk_RenderInfosPtr.
Dtk_RenderInfos::GetTexture
Dtk_TextureInfosPtr GetTexture() const
Returns the render texture.
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:53
DTK_TYPE_TEXTURE
@ DTK_TYPE_TEXTURE
Definition: define.h:559
Dtk_TextureInfos::IsUFlipped
Dtk_bool IsUFlipped() const
Returns if U flipped.
Dtk_RenderInfos::Dtk_RenderInfos
Dtk_RenderInfos(const Dtk_RenderInfos &)
Dtk_TextureInfos::_Private
std::unique_ptr< Dtk_Handle > _Private
Definition: dtk_render.hpp:50
Dtk_TextureInfos::SetTransfo
void SetTransfo(Dtk_transfoPtr inTransfo)
Sets image transfo.
Dtk_TextureInfos::_typeID
@ _typeID
Definition: dtk_render.hpp:49
dtk_metadata.hpp
Dtk_TextureInfos::GetTransfo
Dtk_transfoPtr GetTransfo() const
Returns texture transfo.
Dtk_RenderInfos::Clone
virtual Dtk_Object * Clone()
Definition: dtk_render.hpp:315
Dtk_RenderInfos::Create
static Dtk_RenderInfosPtr Create(const Dtk_string &inName)
Creates a Dtk_RenderInfosPtr.
Dtk_PhysicalMaterialInfos::SetThermalConductivity
Dtk_ErrorStatus SetThermalConductivity(Dtk_Double64 inValue, Dtk_string inUnits)
Sets the material thermal conductivity.
Dtk_LightMap::Create
static Dtk_LightMapPtr Create(Dtk_RGB inAmbiant, Dtk_RGB inDiffuse, Dtk_RGB inSpecular)
Create a Dtk_LightMapPtr.
Dtk_PhysicalMaterialInfos::DtkDynamicType
Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
Retrieves the dynamic entity type.
Definition: dtk_render.hpp:425
Dtk_PhysicalMaterialInfos::SetSpecificHeat
Dtk_ErrorStatus SetSpecificHeat(Dtk_Double64 inValue, Dtk_string inUnits)
Sets the material specific heat.
Dtk_bool
char Dtk_bool
Definition: define.h:724
Dtk_RenderInfos::SetTexture
void SetTexture(const Dtk_TextureInfosPtr &inTexture)
Sets the render texture information.
Dtk_RenderInfos::RenderMappingShaderTypeEnum
RenderMappingShaderTypeEnum
Definition: dtk_render.hpp:282
Dtk_PhysicalMaterialInfos::GetTensileStrength
Dtk_ErrorStatus GetTensileStrength(Dtk_Double64 &outValue, Dtk_string &outUnits) const
Returns the material tensile strength.
Dtk_RenderInfos::Unknown
@ Unknown
Definition: dtk_render.hpp:283
Dtk_PhysicalMaterialInfos::SetThermalExpansion
Dtk_ErrorStatus SetThermalExpansion(Dtk_Double64 inValue, Dtk_string inUnits)
Sets the material thermal expansion.
Dtk_Double64
double Dtk_Double64
Definition: define.h:698
Dtk_TextureInfos::SetOffset
void SetOffset(Dtk_Double64 inUOffset, Dtk_Double64 inVOffset)
Sets image U and V offset.
Dtk_RenderInfos
This is the Dtk_RenderInfos Class. The Dtk_RenderInfosPtr object is used to store any informations ab...
Definition: dtk_render.hpp:279
Dtk_RenderInfos::_Private
std::unique_ptr< Dtk_Handle > _Private
Definition: dtk_render.hpp:302
Dtk_PhysicalMaterialInfos::GetHardeningRatio
Dtk_ErrorStatus GetHardeningRatio(Dtk_Double64 ouHardeningRatio[3]) const
Returns the material hardening ratio.
Dtk_TextureInfos::SphericalMapping
@ SphericalMapping
Definition: dtk_render.hpp:38
Dtk_TextureInfos::SetFlipFlag
void SetFlipFlag(Dtk_bool inUFlip, Dtk_bool inVFlip)
Sets image U and V flip.
Dtk_TextureInfos::PlanarMapping
@ PlanarMapping
Definition: dtk_render.hpp:36
Dtk_LightMap::_typeID
@ _typeID
Definition: dtk_render.hpp:167
Dtk_PhysicalMaterialInfos::Clone
virtual Dtk_Object * Clone()
Definition: dtk_render.hpp:410
Dtk_RenderInfos::FrostedGlass
@ FrostedGlass
Definition: dtk_render.hpp:291
Dtk_LightMap::GetDiffuseColor
Dtk_RGB GetDiffuseColor() const
Returns the ambient light diffusely reflected from the surface of this object.
Dtk_PhysicalMaterialInfos::GetType
MaterialSymetryType GetType() const
Returns the material type.
dtk_picture.hpp
Dtk_PhysicalMaterialInfos::GetThermalConductivity
Dtk_ErrorStatus GetThermalConductivity(Dtk_Double64 &outValue, Dtk_string &outUnits) const
Returns the material thermal conductivity.
Dtk_TextureInfos::IsVFlipped
Dtk_bool IsVFlipped() const
Returns if V flipped.
Dtk_LightMap::Dtk_LightMap
Dtk_LightMap(Dtk_LightMap &&) DTK_NOEXCEPT
Dtk_LightMap::GetSpecularRatio
Dtk_Double64 GetSpecularRatio() const
Returns the specular ratio
Dtk_TextureInfos::SetRotateAngle
void SetRotateAngle(Dtk_Double64 inAlpha)
Sets image rotate angle.
Dtk_PhysicalMaterialInfos::SetType
Dtk_ErrorStatus SetType(MaterialSymetryType inType)
Sets the material type.
Dtk_picture
This class defines a picture.
Definition: dtk_picture.hpp:39
Dtk_LightMap::SetShininessRatio
void SetShininessRatio(Dtk_Double64 inShininess)
Set the Shininess ratio (0.0 - 1.0)
Dtk_TextureInfos::StoredUVMapping
@ StoredUVMapping
Definition: dtk_render.hpp:35
Dtk_TextureInfos::DtkDynamicType
Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
Retrieves the dynamic entity type.
Definition: dtk_render.hpp:79
Dtk_PhysicalMaterialInfos::GetCustomData
Dtk_tab< Dtk_MetaDataPtr > const & GetCustomData() const
Returns the material custom data.
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:686
Dtk_TextureInfos::SetImageSize
void SetImageSize(Dtk_Double64 inSize)
Sets image size.
Dtk_TextureInfos::SetScale
void SetScale(Dtk_Double64 inUScale, Dtk_Double64 inVScale)
Sets image U and V scale.
Dtk_RenderInfos::PolishedPlastic
@ PolishedPlastic
Definition: dtk_render.hpp:292
Dtk_PhysicalMaterialInfos::MaterialSymetryType
MaterialSymetryType
Definition: dtk_render.hpp:388
Dtk_RenderInfosPtr
Dtk_SmartPtr< Dtk_RenderInfos > Dtk_RenderInfosPtr
Handles a Dtk_RenderInfos object.
Definition: dtk_render.hpp:20
Dtk_LightMap::Clone
virtual Dtk_Object * Clone()
Definition: dtk_render.hpp:183
Dtk_RenderInfos::Default
@ Default
Definition: dtk_render.hpp:284
Dtk_PhysicalMaterialInfos::Orthotrope
@ Orthotrope
Definition: dtk_render.hpp:392
error_dtk.hpp
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_TextureInfos::GetImageSize
Dtk_Double64 GetImageSize() const
Returns image size.
Dtk_LightMap::GetEmissiveRatio
Dtk_Double64 GetEmissiveRatio() const
Returns the emissive ratio.
Dtk_TextureInfosPtr
Dtk_SmartPtr< Dtk_TextureInfos > Dtk_TextureInfosPtr
Definition: dtk_render.hpp:16
Dtk_TextureInfos::SkyCubicalMapping
@ SkyCubicalMapping
Definition: dtk_render.hpp:43
Dtk_PhysicalMaterialInfos::_Private
std::unique_ptr< Dtk_Handle > _Private
Definition: dtk_render.hpp:397
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
Dtk_PhysicalMaterialInfos::UnknownType
@ UnknownType
Definition: dtk_render.hpp:389
Dtk_PhysicalMaterialInfos::SetPoissonRatio
Dtk_ErrorStatus SetPoissonRatio(Dtk_Double64 inPoissonRatio[3])
Sets the material poisson ratio.
Dtk_TextureInfos::BuildingMapping
@ BuildingMapping
Definition: dtk_render.hpp:45
Dtk_PhysicalMaterialInfos::IsotropeTrans
@ IsotropeTrans
Definition: dtk_render.hpp:391
Dtk_RenderInfos::ColoredGlass
@ ColoredGlass
Definition: dtk_render.hpp:290
Dtk_TextureInfos::Dtk_TextureInfos
Dtk_TextureInfos(Dtk_TextureInfos &&) DTK_NOEXCEPT
Dtk_RenderInfos::SatinatedMetal
@ SatinatedMetal
Definition: dtk_render.hpp:287
Dtk_LightMap::GetDiffuseRatio
Dtk_Double64 GetDiffuseRatio() const
Returns the diffuse ratio.
Dtk_PhysicalMaterialInfos::GetTypeAsString
Dtk_string GetTypeAsString() const
Returns the material type as a Dtk_string.
Dtk_LightMap::_Private
std::unique_ptr< Dtk_Handle > _Private
Definition: dtk_render.hpp:168
Dtk_TextureInfos::GetVScale
Dtk_Double64 GetVScale() const
Returns V scale factor.
Dtk_LightMap::Create
static Dtk_LightMapPtr Create(Dtk_LightMap const &in)
Calls copy constructor to allocate a new object.
Dtk_PhysicalMaterialInfos
Definition: dtk_render.hpp:384
util_stl_dtk.hpp
Dtk_LightMap::DtkDynamicType
Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
Retrieves the dynamic entity type.
Definition: dtk_render.hpp:199
Dtk_RenderInfos::SetRenderFilePath
void SetRenderFilePath(const Dtk_string &inFilePath)
Sets the render file path.
Dtk_LightMap::GetEmissiveColor
Dtk_RGB GetEmissiveColor() const
Returns the color and amount of light emitted from the surface of this object.
Dtk_PhysicalMaterialInfos::GetPoissonRatio
Dtk_ErrorStatus GetPoissonRatio(Dtk_Double64 outPoissonRatio[3]) const
Returns the material poisson ratio.
Dtk_PhysicalMaterialInfos::SetShearModulus
Dtk_ErrorStatus SetShearModulus(Dtk_Double64 inShearModulus[3], Dtk_string inUnits)
Sets the material shear modulus.
Dtk_RenderInfos::_typeID
@ _typeID
Definition: dtk_render.hpp:301
util_ptr_dtk.hpp
Dtk_PhysicalMaterialInfos::GetYoungModulus
Dtk_ErrorStatus GetYoungModulus(Dtk_Double64 outYoungModulus[3], Dtk_string &outUnits) const
Returns the material young modulus.
Dtk_RenderInfos::MetallicPaint
@ MetallicPaint
Definition: dtk_render.hpp:295
define.h
Dtk_LightMapPtr
Dtk_SmartPtr< Dtk_LightMap > Dtk_LightMapPtr
Definition: dtk_render.hpp:19
Dtk_PhysicalMaterialInfos::SetYoungModulus
Dtk_ErrorStatus SetYoungModulus(Dtk_Double64 inYoungModulus[3], Dtk_string inUnits)
Sets the material young modulus.
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:84
Dtk_LightMap::GetSpecularColor
Dtk_RGB GetSpecularColor() const
Returns the ambient light specularly reflected from the surface of this object.
Dtk_LightMap::GetAmbientRatio
Dtk_Double64 GetAmbientRatio() const
Returns the ambient ratio.
Dtk_TextureInfos::Create
static Dtk_TextureInfosPtr Create(const Dtk_TextureInfos &in)
Calls copy constructor to allocate a new object.
Dtk_TextureInfos::SkySphericalMapping
@ SkySphericalMapping
Definition: dtk_render.hpp:42
Dtk_TextureInfos::GetUScale
Dtk_Double64 GetUScale() const
Returns U scale factor.
Dtk_RenderInfos::DtkDynamicCast
static Dtk_RenderInfos * DtkDynamicCast(Dtk_Object *s)
Performs a dynamic cast - doesn't need RTTI -.
Definition: dtk_render.hpp:344
Dtk_LightMap
Definition: dtk_render.hpp:165
Dtk_PhysicalMaterialInfos::SetYieldStrength
Dtk_ErrorStatus SetYieldStrength(Dtk_Double64 inValue, Dtk_string inUnits)
Sets the material yield strength.
Dtk_PhysicalMaterialInfos::GetName
Dtk_string GetName() const
Returns the material name.
Dtk_Object::DtkDynamicType
virtual int DtkDynamicType(const int &inId)=0
Dtk_RenderInfos::GetName
Dtk_string GetName() const
Returns the texture name.
Dtk_Object
Definition: dtk_object.hpp:8
Dtk_RenderInfos::Dtk_RenderInfos
Dtk_RenderInfos(Dtk_RenderInfos &&) DTK_NOEXCEPT
Dtk_PhysicalMaterialInfos::_typeID
@ _typeID
Definition: dtk_render.hpp:396
dtk_string.hpp
Dtk_LightMap::AddTransparentColor
void AddTransparentColor(const Dtk_RGB &inColor)
Adds the color and amount of perfectly refracted light.
Dtk_PhysicalMaterialInfos::GetThermalExpansion
Dtk_ErrorStatus GetThermalExpansion(Dtk_Double64 &outValue, Dtk_string &outUnits) const
Returns the material thermal expansion.
Dtk_PhysicalMaterialInfos::Dtk_PhysicalMaterialInfos
Dtk_PhysicalMaterialInfos(Dtk_string inName, MaterialSymetryType inType)
Dtk_RenderInfos::GetRenderFilePath
Dtk_string GetRenderFilePath() const
Returns the render file path.
Dtk_TextureInfos::SetImagePath
void SetImagePath(Dtk_string inImagePath)
Sets image file path.
Dtk_TextureInfos::Dtk_TextureInfos
Dtk_TextureInfos(const Dtk_TextureInfos &)
Dtk_RenderInfos::AddShaderType
void AddShaderType(const RenderMappingShaderTypeEnum &inShaderType)
Adds the shader type.
Dtk_LightMap::GetTransparentColor
Dtk_RGB GetTransparentColor() const
Returns the color and amount of perfectly refracted light.
dtk_rgb.hpp
Dtk_TextureInfos::CubicalMapping
@ CubicalMapping
Definition: dtk_render.hpp:39
Dtk_RGB
Definition: dtk_rgb.hpp:8
Dtk_PhysicalMaterialInfos::Dtk_PhysicalMaterialInfos
Dtk_PhysicalMaterialInfos(Dtk_PhysicalMaterialInfos &&) DTK_NOEXCEPT
Dtk_PhysicalMaterialInfos::GetYieldStrength
Dtk_ErrorStatus GetYieldStrength(Dtk_Double64 &outValue, Dtk_string &outUnits) const
Returns the material yield strength.
Dtk_PhysicalMaterialInfos::SetTensileStrength
Dtk_ErrorStatus SetTensileStrength(Dtk_Double64 inValue, Dtk_string inUnits)
Sets the material tensile strength.
Dtk_LightMap::Dtk_LightMap
Dtk_LightMap(const Dtk_LightMap &)
Dtk_LightMap::DtkDynamicCast
static Dtk_LightMap * DtkDynamicCast(Dtk_Object *s)
Performs a dynamic cast - doesn't need RTTI -.
Definition: dtk_render.hpp:206
Dtk_PhysicalMaterialInfos::Isotropic
@ Isotropic
Definition: dtk_render.hpp:390
DTK_TYPE_RENDER
@ DTK_TYPE_RENDER
Definition: define.h:561
Dtk_LightMap::GetReflectiveColor
Dtk_RGB GetReflectiveColor() const
Returns the color and amount of a perfect mirror reflection.
dtk_object.hpp
Dtk_LightMap::AddEmissiveColor
void AddEmissiveColor(const Dtk_RGB &inColor)
Adds the light emitted from the surface of this object.
Dtk_TextureInfos::GetMappingType
TextureMappingTypeEnum GetMappingType() const
Returns mapping type.
Dtk_TextureInfos::SetRepeat
void SetRepeat(Dtk_bool inURepeat, Dtk_bool inVRepeat)
Sets image U and V flip.
Dtk_TextureInfos::Clone
virtual Dtk_Object * Clone()
Definition: dtk_render.hpp:63
DTK_NOEXCEPT
#define DTK_NOEXCEPT
Definition: config.hpp:20
Dtk_RenderInfos::PolishedMetal
@ PolishedMetal
Definition: dtk_render.hpp:286
Dtk_LightMap::GetReflectiveRatio
Dtk_Double64 GetReflectiveRatio() const
Returns the reflective ratio
Dtk_TextureInfos::GetVOffset
Dtk_Double64 GetVOffset() const
Returns V offset.
Dtk_TextureInfos::SetTextureImage
void SetTextureImage(Dtk_picture *inImage)
Sets Dtk_picture.