DatasmithSceneElementsImpl.h
1 // Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
2 #pragma once
3 
4 #include "IDatasmithSceneElements.h"
5 #include "DatasmithDefinitions.h"
6 #include "DatasmithSceneFactory.h"
7 #include "DatasmithUtils.h"
8 
9 #include "Containers/Array.h"
10 #include "Containers/UnrealString.h"
11 #include "Math/UnrealMathUtility.h"
12 #include "Templates/SharedPointer.h"
13 
14 template< typename InterfaceType >
15 class FDatasmithElementImpl : public InterfaceType
16 {
17 public:
18  FDatasmithElementImpl(const TCHAR* InName, EDatasmithElementType InType, uint64 InSubType = 0);
19  virtual ~FDatasmithElementImpl() {}
20 
21  virtual bool IsA( EDatasmithElementType InType ) const override { return ( uint64(Type) & uint64(InType) ) != 0; }
22  virtual bool IsSubType( uint64 InSubType ) const override { return ( InSubType & SubType ) != 0; }
23 
24  virtual const TCHAR* GetName() const override { return *Name; }
25  virtual void SetName(const TCHAR* InName) override { Name = FDatasmithUtils::SanitizeObjectName(InName); }
26 
27  virtual const TCHAR* GetLabel() const override { return Label.IsEmpty() ? GetName() : *Label; }
28  virtual void SetLabel(const TCHAR* InLabel) override { Label = FDatasmithUtils::SanitizeObjectName(InLabel); }
29 
30  virtual FMD5Hash CalculateElementHash(bool) override { return ElementHash; }
31 
32 protected:
33  FString Name;
34  FString Label;
35  FMD5Hash ElementHash;
36 
37  EDatasmithElementType Type;
38  uint64 SubType;
39 };
40 
41 template< typename InterfaceType >
42 inline FDatasmithElementImpl< InterfaceType >::FDatasmithElementImpl(const TCHAR* InName, EDatasmithElementType InType, uint64 InSubType)
43  : Name(FDatasmithUtils::SanitizeObjectName(InName))
44  , Type(InType)
45  , SubType(InSubType)
46 {
47 }
48 
49 class FDatasmithKeyValuePropertyImpl : public FDatasmithElementImpl< IDatasmithKeyValueProperty >
50 {
51 public:
52  FDatasmithKeyValuePropertyImpl(const TCHAR* InName);
53 
54  EDatasmithKeyValuePropertyType GetPropertyType() const override { return PropertyType; }
55  void SetPropertyType( EDatasmithKeyValuePropertyType InType ) override;
56 
57  const TCHAR* GetValue() const override { return *Value; }
58  void SetValue( const TCHAR* InValue ) override;
59 
60 protected:
61  void FormatValue();
62 
63 private:
64  EDatasmithKeyValuePropertyType PropertyType;
65  FString Value;
66 };
67 
68 template< typename InterfaceType >
69 class FDatasmithActorElementImpl : public FDatasmithElementImpl< InterfaceType >, public TSharedFromThis< FDatasmithActorElementImpl< InterfaceType > >
70 {
71 public:
72  FDatasmithActorElementImpl(const TCHAR* InName, EDatasmithElementType InType);
73 
74  virtual FVector GetTranslation() const override { return Translation; }
75  virtual void SetTranslation(float InX, float InY, float InZ) override { SetTranslation( FVector( InX, InY, InZ ) ); }
76  virtual void SetTranslation(const FVector& Value) override { ConvertChildsToRelative(); Translation = Value; ConvertChildsToWorld(); }
77 
78  virtual FVector GetScale() const override { return Scale; }
79  virtual void SetScale(float InX, float InY, float InZ) override { SetScale( FVector( InX, InY, InZ ) ); }
80  virtual void SetScale(const FVector& Value) override { ConvertChildsToRelative(); Scale = Value; ConvertChildsToWorld(); }
81 
82  virtual FQuat GetRotation() const override { return Rotation; }
83  virtual void SetRotation(float InX, float InY, float InZ, float InW) override { SetRotation( FQuat( InX, InY, InZ, InW ) ); }
84  virtual void SetRotation(const FQuat& Value) override { ConvertChildsToRelative(); Rotation = Value; ConvertChildsToWorld(); }
85 
86  virtual void SetUseParentTransform(bool bInUseParentTransform) override { bUseParentTransform = bInUseParentTransform;}
87  virtual FTransform GetRelativeTransform() const override;
88 
89  virtual const TCHAR* GetLayer() const override { return *Layer; }
90  virtual void SetLayer(const TCHAR* InLayer) override { Layer = InLayer; }
91 
92  virtual void AddTag(const TCHAR* InTag) override { Tags.Add(InTag); }
93  virtual void ResetTags() override { Tags.Reset(); }
94  virtual int32 GetTagsCount() const { return Tags.Num(); }
95  virtual const TCHAR* GetTag(int32 TagIndex) const override { return Tags.IsValidIndex(TagIndex) ? *Tags[TagIndex] : nullptr; }
96 
97  virtual void AddChild(const TSharedPtr< IDatasmithActorElement >& InChild, EDatasmithActorAttachmentRule AttachementRule = EDatasmithActorAttachmentRule::KeepWorldTransform) override;
98  virtual int32 GetChildrenCount() const override { return Children.Num(); }
99  /** Get the 'InIndex'th child of the actor */
100  virtual TSharedPtr< IDatasmithActorElement > GetChild(int32 InIndex) override { return Children.IsValidIndex(InIndex) ? Children[InIndex] : NullActorPtr; };
101  virtual const TSharedPtr< IDatasmithActorElement >& GetChild(int32 InIndex) const override { return Children.IsValidIndex(InIndex) ? Children[InIndex] : NullActorPtr; };
102  virtual void RemoveChild(const TSharedPtr< IDatasmithActorElement >& InChild) override { Children.Remove(InChild); static_cast< FDatasmithActorElementImpl* >( InChild.Get() )->Parent.Reset(); }
103 
104  virtual void SetIsAComponent(bool Value) { bIsAComponent = Value; }
105  virtual bool IsAComponent() const override { return bIsAComponent; }
106 
107  virtual void SetAsSelector(bool bInAsSelector) override { bIsASelector = bInAsSelector; }
108  virtual bool IsASelector() const override { return bIsASelector; }
109 
110  /** Set the index of the child which is active in a selector */
111  virtual void SetSelectionIndex(int32 InSelectionIdx) override { SelectionIdx = InSelectionIdx; }
112 
113  /** Get the index of the child which is active in a selector. Default is -1. */
114  virtual int32 GetSelectionIndex() const override { return SelectionIdx; }
115 
116  virtual void SetVisibility(bool bInVisibility) override { bVisibility = bInVisibility; }
117  virtual bool GetVisibility() const override { return bVisibility; }
118 
119 protected:
120  /** Converts all childs transforms to relative */
122 
123  /** Converts all childs transforms to world */
124  void ConvertChildsToWorld();
125 
126 private:
127  static TSharedPtr<IDatasmithActorElement> NullActorPtr;
128 
129  FVector Translation;
130  FVector Scale;
131  FQuat Rotation;
132 
133  FString Layer;
134 
135  TArray< FString > Tags;
136 
137  TArray< TSharedPtr< IDatasmithActorElement > > Children;
138  TSharedPtr< IDatasmithActorElement > Parent;
139 
140  bool bIsAComponent;
141  bool bIsASelector;
142  bool bVisibility;
143  bool bUseParentTransform;
144  int32 SelectionIdx;
145 };
146 
147 template< typename InterfaceType >
148 TSharedPtr<IDatasmithActorElement> FDatasmithActorElementImpl< InterfaceType >::NullActorPtr;
149 
150 template< typename T >
151 inline FDatasmithActorElementImpl<T>::FDatasmithActorElementImpl(const TCHAR* InName, EDatasmithElementType ChildType)
152  : FDatasmithElementImpl<T>(InName, EDatasmithElementType::Actor | ChildType)
153  , Translation(FVector::ZeroVector)
154  , Scale(FVector::OneVector)
155  , Rotation(FQuat::Identity)
156  , bIsAComponent(false)
157  , bIsASelector(false)
158  , bVisibility(true)
159  , bUseParentTransform(true)
160  , SelectionIdx(-1)
161 {
162 }
163 
164 template< typename T >
166 {
167  FTransform ActorTransform( GetRotation(), GetTranslation(), GetScale() );
168 
169  if ( Parent.IsValid() && bUseParentTransform )
170  {
171  FTransform ParentTransform( Parent->GetRotation(), Parent->GetTranslation(), Parent->GetScale() );
172 
173  return ActorTransform.GetRelativeTransform( ParentTransform );
174  }
175 
176  return ActorTransform;
177 }
178 
179 template< typename T >
180 inline void FDatasmithActorElementImpl<T>::AddChild(const TSharedPtr< IDatasmithActorElement >& InChild, EDatasmithActorAttachmentRule AttachementRule)
181 {
182  if ( AttachementRule == EDatasmithActorAttachmentRule::KeepRelativeTransform )
183  {
184  FTransform RelativeTransform( InChild->GetRotation(), InChild->GetTranslation(), InChild->GetScale() );
185  FTransform ParentTransform( GetRotation(), GetTranslation(), GetScale() );
186 
187  FTransform WorldTransform = RelativeTransform * ParentTransform;
188 
189  InChild->SetRotation( WorldTransform.GetRotation() );
190  InChild->SetTranslation( WorldTransform.GetTranslation() );
191  InChild->SetScale( WorldTransform.GetScale3D() );
192  }
193 
194  Children.Add(InChild);
195  static_cast< FDatasmithActorElementImpl* >( InChild.Get() )->Parent = this->AsShared();
196 }
197 
198 template< typename T >
200 {
201  FTransform ThisWorldTransform( GetRotation(), GetTranslation(), GetScale() );
202 
203  for ( TSharedPtr< IDatasmithActorElement >& Child : Children )
204  {
205  if ( !Child.IsValid() )
206  {
207  continue;
208  }
209 
210  FDatasmithActorElementImpl* ChildImpl = static_cast< FDatasmithActorElementImpl* >( Child.Get() );
211  ChildImpl->ConvertChildsToRelative(); // Depth first while we're still in world space
212 
213  FTransform ChildWorldTransform( Child->GetRotation(), Child->GetTranslation(), Child->GetScale() );
214 
215  FTransform ChildRelativeTransform = ChildWorldTransform.GetRelativeTransform( ThisWorldTransform );
216  ChildImpl->Rotation = ChildRelativeTransform.GetRotation();
217  ChildImpl->Translation = ChildRelativeTransform.GetTranslation();
218  ChildImpl->Scale = ChildRelativeTransform.GetScale3D();
219  }
220 }
221 
222 template< typename T >
224 {
225  FTransform ThisWorldTransform( GetRotation(), GetTranslation(), GetScale() );
226 
227  for ( TSharedPtr< IDatasmithActorElement >& Child : Children )
228  {
229  if ( !Child.IsValid() )
230  {
231  continue;
232  }
233 
234  FDatasmithActorElementImpl* ChildImpl = static_cast< FDatasmithActorElementImpl* >( Child.Get() );
235 
236  FTransform ChildRelativeTransform( Child->GetRotation(), Child->GetTranslation(), Child->GetScale() );
237 
238  FTransform ChildWorldTransform = ChildRelativeTransform * ThisWorldTransform;
239  ChildImpl->Rotation = ChildWorldTransform.GetRotation();
240  ChildImpl->Translation = ChildWorldTransform.GetTranslation();
241  ChildImpl->Scale = ChildWorldTransform.GetScale3D();
242 
243  ChildImpl->ConvertChildsToWorld(); // Depth last now that we're in world space
244  }
245 }
246 
247 class FDatasmithMeshElementImpl : public FDatasmithElementImpl< IDatasmithMeshElement >
248 {
249 public:
250  explicit FDatasmithMeshElementImpl(const TCHAR* InName);
251 
252  virtual FMD5Hash CalculateElementHash(bool bForce) override;
253 
254  virtual const TCHAR* GetFile() const override { return *File; }
255  virtual void SetFile(const TCHAR* InFile) override { File = InFile; };
256 
257  virtual FMD5Hash GetFileHash() const override { return FileHash; }
258  virtual void SetFileHash(FMD5Hash Hash) override { FileHash = Hash; }
259 
260  virtual void SetDimensions(const float InArea, const float InWidth, const float InHeight, const float InDepth) override { Area = InArea; Width = InWidth; Height = InHeight; Depth = InDepth;};
261  virtual FVector GetDimensions() const override { return FVector{ Width, Height, Depth }; }
262 
263  virtual float GetArea() const override { return Area; }
264  virtual float GetWidth() const override { return Width; }
265  virtual float GetHeight() const override { return Height; }
266  virtual float GetDepth() const override { return Depth; }
267 
268  virtual int32 GetLightmapCoordinateIndex() const { return LightmapCoordinateIndex; }
269  virtual void SetLightmapCoordinateIndex(int32 UVChannel) { LightmapCoordinateIndex = UVChannel; }
270 
271  virtual int32 GetLightmapSourceUV() const override { return LightmapSourceUV; }
272  virtual void SetLightmapSourceUV( int32 UVChannel ) override { LightmapSourceUV = UVChannel; }
273 
274  virtual void SetMaterial(const TCHAR* MaterialPathName, int32 SlotId) override;
275  virtual const TCHAR* GetMaterial(int32 SlotId) const override;
276 
277  virtual int32 GetMaterialSlotCount() const override;
278  virtual TSharedPtr<const IDatasmithMaterialIDElement> GetMaterialSlotAt(int32 Index) const override;
279  virtual TSharedPtr<IDatasmithMaterialIDElement> GetMaterialSlotAt(int32 Index) override;
280 
281 protected:
282  virtual int32 GetLODCount() const override { return LODCount; }
283  virtual void SetLODCount(int32 Count) override { LODCount = Count; }
284 
285 private:
286  FString File;
287  FMD5Hash FileHash;
288  float Area;
289  float Width;
290  float Height;
291  float Depth;
292  int32 LODCount;
293  int32 LightmapCoordinateIndex;
294  int32 LightmapSourceUV;
295  TArray<TSharedPtr<IDatasmithMaterialIDElement>> MaterialSlots;
296 };
297 
298 class FDatasmithMaterialIDElementImpl : public FDatasmithElementImpl< IDatasmithMaterialIDElement >
299 {
300 public:
301  explicit FDatasmithMaterialIDElementImpl(const TCHAR* InName);
302 
303  virtual int32 GetId() const override { return Id; }
304  virtual void SetId(int32 InId) override { Id = InId; }
305 
306 private:
307  int32 Id;
308 };
309 
310 template< typename InterfaceType = IDatasmithMeshActorElement >
312 {
313 public:
314  explicit FDatasmithMeshActorElementImpl(const TCHAR* InName);
315 
316  virtual void AddMaterialOverride(const TCHAR* InMaterialName, int32 Id) override;
317  virtual void AddMaterialOverride(const TSharedPtr< IDatasmithMaterialIDElement >& Material) override;
318 
319  virtual int32 GetMaterialOverridesCount() const override;
320  virtual TSharedPtr<IDatasmithMaterialIDElement> GetMaterialOverride(int32 i) override;
321  virtual TSharedPtr<const IDatasmithMaterialIDElement> GetMaterialOverride(int32 i) const override;
322  virtual void RemoveMaterialOverride(const TSharedPtr< IDatasmithMaterialIDElement >& Material) override;
323 
324  virtual const TCHAR* GetStaticMeshPathName() const override;
325  virtual void SetStaticMeshPathName(const TCHAR* InStaticMeshName) override;
326 
327 protected:
328  explicit FDatasmithMeshActorElementImpl(const TCHAR* InName, EDatasmithElementType ElementType);
329 
330 private:
331  FString StaticMeshPathName;
332  TArray< TSharedPtr< IDatasmithMaterialIDElement > > Materials;
333 };
334 
335 template < typename InterfaceType >
337  : FDatasmithActorElementImpl< InterfaceType >(InName, EDatasmithElementType::StaticMeshActor)
338 {
339 }
340 
341 template < typename InterfaceType >
342 FDatasmithMeshActorElementImpl< InterfaceType >::FDatasmithMeshActorElementImpl(const TCHAR* InName, EDatasmithElementType ElementType)
343  : FDatasmithActorElementImpl< InterfaceType >(InName, EDatasmithElementType::StaticMeshActor | ElementType)
344 {
345 }
346 
347 template < typename InterfaceType >
348 void FDatasmithMeshActorElementImpl< InterfaceType >::AddMaterialOverride(const TCHAR* InMaterialName, int32 Id)
349 {
350  FString MaterialName = FDatasmithUtils::SanitizeObjectName(InMaterialName);
351 
352  for (const TSharedPtr< IDatasmithMaterialIDElement >& Material : Materials)
353  {
354  if (FString(Material->GetName()) == MaterialName && Material->GetId() == Id)
355  {
356  return;
357  }
358  }
359 
360  TSharedPtr< IDatasmithMaterialIDElement > MaterialIDElement = FDatasmithSceneFactory::CreateMaterialId(*MaterialName);
361  MaterialIDElement->SetId(Id);
362  Materials.Add(MaterialIDElement);
363 }
364 
365 template < typename InterfaceType >
366 void FDatasmithMeshActorElementImpl< InterfaceType >::AddMaterialOverride(const TSharedPtr< IDatasmithMaterialIDElement >& Material)
367 {
368  Materials.Add(Material);
369 }
370 
371 template < typename InterfaceType >
373 {
374  return (int32)Materials.Num();
375 }
376 
377 template < typename InterfaceType >
378 TSharedPtr<IDatasmithMaterialIDElement> FDatasmithMeshActorElementImpl< InterfaceType >::GetMaterialOverride(int32 i)
379 {
380  if (Materials.IsValidIndex(i))
381  {
382  return Materials[i];
383  }
384  const TSharedPtr<IDatasmithMaterialIDElement> InvalidMaterialID;
385  return InvalidMaterialID;
386 }
387 
388 template < typename InterfaceType >
389 TSharedPtr<const IDatasmithMaterialIDElement> FDatasmithMeshActorElementImpl< InterfaceType >::GetMaterialOverride(int32 i) const
390 {
391  if (Materials.IsValidIndex(i))
392  {
393  return Materials[i];
394  }
395  const TSharedPtr<IDatasmithMaterialIDElement> InvalidMaterialID;
396  return InvalidMaterialID;
397 }
398 
399 template < typename InterfaceType >
400 void FDatasmithMeshActorElementImpl< InterfaceType >::RemoveMaterialOverride(const TSharedPtr< IDatasmithMaterialIDElement >& Material)
401 {
402  Materials.Remove(Material);
403 }
404 
405 template < typename InterfaceType >
407 {
408  return *StaticMeshPathName;
409 }
410 
411 template < typename InterfaceType >
413 {
414  StaticMeshPathName = InStaticMeshName;
415 }
416 
417 class FDatasmithHierarchicalInstancedStaticMeshActorElementImpl : public FDatasmithMeshActorElementImpl< IDatasmithHierarchicalInstancedStaticMeshActorElement >
418 {
419 public:
420  explicit FDatasmithHierarchicalInstancedStaticMeshActorElementImpl(const TCHAR* InName);
421 
423 
424  virtual int32 GetInstancesCount() const override;
425  virtual void ReserveSpaceForInstances(int32 NumIntances) override;
426  virtual int32 AddInstance(const FTransform& Transform) override;
427  virtual FTransform GetInstance(int32 InstanceIndex) const override;
428  virtual void RemoveInstance(int32 InstanceIndex) override;
429 
430 private:
431  TArray<FTransform> Instances;
432 };
433 
434 template< typename InterfaceType = IDatasmithLightActorElement >
436 {
437 public:
438  virtual bool IsEnabled() const override { return bEnabled; }
439  virtual void SetEnabled(bool bInIsEnabled) override { bEnabled = bInIsEnabled; }
440 
441  virtual double GetIntensity() const override { return Intensity; }
442  virtual void SetIntensity(double InIntensity) override { Intensity = InIntensity; }
443 
444  virtual FLinearColor GetColor() const override { return Color; }
445  virtual void SetColor(FLinearColor InColor) override { Color = InColor; }
446 
447  virtual double GetTemperature() const override { return Temperature; }
448  virtual void SetTemperature(double InTemperature) override { Temperature = InTemperature; }
449 
450  virtual bool GetUseTemperature() const override { return bUseTemperature; }
451  virtual void SetUseTemperature(bool bInUseTemperature) override { bUseTemperature = bInUseTemperature; }
452 
453  virtual const TCHAR* GetIesFile() const override { return *IesFile; }
454  virtual void SetIesFile(const TCHAR* InIesFile) override { IesFile = InIesFile; }
455 
456  virtual bool GetUseIes() const override { return bUseIes; }
457  virtual void SetUseIes(bool bInUseIes) override { bUseIes = bInUseIes; }
458 
459  virtual double GetIesBrightnessScale() const override { return IesBrightnessScale; }
460  virtual void SetIesBrightnessScale(double InIesBrightnessScale) override { IesBrightnessScale = InIesBrightnessScale; }
461 
462  virtual bool GetUseIesBrightness() const override { return bUseIesBrightness; }
463  virtual void SetUseIesBrightness(bool bInUseIesBrightness) override { bUseIesBrightness = bInUseIesBrightness; }
464 
465  virtual FQuat GetIesRotation() const override { return IesRotation; }
466  virtual void SetIesRotation(const FQuat& InIesRotation) override { IesRotation = InIesRotation; }
467 
468  TSharedPtr< IDatasmithMaterialIDElement >& GetLightFunctionMaterial() override { return LightFunctionMaterial; }
469 
470  void SetLightFunctionMaterial(const TSharedPtr< IDatasmithMaterialIDElement >& InMaterial) override { LightFunctionMaterial = InMaterial; }
471 
472  void SetLightFunctionMaterial(const TCHAR* InMaterialName) override
473  {
474  FString MaterialName = FDatasmithUtils::SanitizeObjectName(InMaterialName);
475  LightFunctionMaterial = FDatasmithSceneFactory::CreateMaterialId(*MaterialName);
476  }
477 
478 protected:
479  explicit FDatasmithLightActorElementImpl(const TCHAR* InName, EDatasmithElementType ChildType)
480  : FDatasmithActorElementImpl< InterfaceType >( InName, EDatasmithElementType::Light | ChildType )
481  {
482  Intensity = 1.0;
483 
484  Color.R = 1.0f;
485  Color.G = 1.0f;
486  Color.B = 1.0f;
487 
488  bEnabled = true;
489  Temperature = 6500.0;
490  bUseTemperature = false;
491  bUseIes = false;
492  IesBrightnessScale = 1.0;
493  bUseIesBrightness = false;
494 
495  IesRotation = FQuat::Identity;
496  }
497 
498 private:
499  bool bEnabled;
500  double Intensity;
501  FLinearColor Color;
502 
503  double Temperature;
504  bool bUseTemperature;
505 
506  FString IesFile;
507  bool bUseIes;
508 
509  double IesBrightnessScale;
510  bool bUseIesBrightness;
511 
512  TSharedPtr< IDatasmithMaterialIDElement > LightFunctionMaterial;
513 
514  FQuat IesRotation;
515 };
516 
517 template< typename InterfaceType = IDatasmithPointLightElement >
519 {
520 public:
521  explicit FDatasmithPointLightElementImpl(const TCHAR* InName)
522  : FDatasmithPointLightElementImpl( InName, EDatasmithElementType::None )
523  {
524  }
525 
526  virtual void SetIntensityUnits(EDatasmithLightUnits InUnits) { Units = InUnits; }
527  virtual EDatasmithLightUnits GetIntensityUnits() const { return Units; }
528 
529  virtual float GetSourceRadius() const override { return SourceRadius; }
530  virtual void SetSourceRadius(float InSourceRadius) override { SourceRadius = InSourceRadius; }
531 
532  virtual float GetSourceLength() const override { return SourceLength; }
533  virtual void SetSourceLength(float InSourceLength) override { SourceLength = InSourceLength;}
534 
535  virtual float GetAttenuationRadius() const override { return AttenuationRadius; }
536  virtual void SetAttenuationRadius(float InAttenuationRadius) override { AttenuationRadius = InAttenuationRadius; }
537 
538 protected:
539  explicit FDatasmithPointLightElementImpl(const TCHAR* InName, EDatasmithElementType ChildType)
540  : FDatasmithLightActorElementImpl< InterfaceType >( InName, EDatasmithElementType::PointLight | ChildType )
541  {
542  Units = EDatasmithLightUnits::Unitless;
543  SourceRadius = -1;
544  SourceLength = -1;
545  AttenuationRadius = -1;
546  }
547 
548 private:
549  EDatasmithLightUnits Units;
550  float SourceRadius;
551  float SourceLength;
552  float AttenuationRadius;
553 };
554 
555 template< typename InterfaceType = IDatasmithSpotLightElement >
557 {
558 public:
559  explicit FDatasmithSpotLightElementImpl(const TCHAR* InName)
560  : FDatasmithSpotLightElementImpl( InName, EDatasmithElementType::None )
561  {
562  }
563 
564  virtual float GetInnerConeAngle() const override
565  {
566  return InnerConeAngle;
567  }
568 
569  virtual void SetInnerConeAngle(float InInnerConeAngle) override
570  {
571  InnerConeAngle = InInnerConeAngle;
572  }
573 
574  virtual float GetOuterConeAngle() const override
575  {
576  return OuterConeAngle;
577  }
578 
579  virtual void SetOuterConeAngle(float InOuterConeAngle) override
580  {
581  OuterConeAngle = InOuterConeAngle;
582  }
583 
584 protected:
585  explicit FDatasmithSpotLightElementImpl(const TCHAR* InName, EDatasmithElementType ChildType)
586  : FDatasmithPointLightElementImpl< InterfaceType >( InName, EDatasmithElementType::SpotLight | ChildType )
587  {
588  InnerConeAngle = 45.f;
589  OuterConeAngle = 60.f;
590  }
591 
592 private:
593  float InnerConeAngle;
594  float OuterConeAngle;
595 };
596 
597 class FDatasmithDirectionalLightElementImpl : public FDatasmithLightActorElementImpl< IDatasmithDirectionalLightElement >
598 {
599 public:
600  explicit FDatasmithDirectionalLightElementImpl(const TCHAR* InName)
601  : FDatasmithLightActorElementImpl< IDatasmithDirectionalLightElement >( InName, EDatasmithElementType::DirectionalLight )
602  {
603  }
604 };
605 
606 class FDatasmithAreaLightElementImpl : public FDatasmithSpotLightElementImpl< IDatasmithAreaLightElement >
607 {
608 public:
609  explicit FDatasmithAreaLightElementImpl(const TCHAR* InName)
610  : FDatasmithSpotLightElementImpl< IDatasmithAreaLightElement >( InName, EDatasmithElementType::AreaLight )
611  , LightShape( EDatasmithLightShape::Rectangle )
612  , LightType( EDatasmithAreaLightType::Point )
613  , Width( 0.f )
614  , Length( 0.f )
615  {
616  }
617 
618  virtual EDatasmithLightShape GetLightShape() const override { return LightShape; }
619  virtual void SetLightShape(EDatasmithLightShape InShape) override { LightShape = InShape; }
620 
621  virtual EDatasmithAreaLightType GetLightType() const override { return LightType; }
622  virtual void SetLightType(EDatasmithAreaLightType InLightType) override { LightType = InLightType; }
623 
624  virtual void SetWidth(float InWidth) override { Width = InWidth; }
625  virtual float GetWidth() const override { return Width; }
626 
627  virtual void SetLength(float InLength) override { Length = InLength; }
628  virtual float GetLength() const override { return Length; }
629 
630 private:
631  EDatasmithLightShape LightShape;
632  EDatasmithAreaLightType LightType;
633  float Width;
634  float Length;
635 };
636 
637 class FDatasmithLightmassPortalElementImpl : public FDatasmithPointLightElementImpl< IDatasmithLightmassPortalElement >
638 {
639 public:
640  explicit FDatasmithLightmassPortalElementImpl(const TCHAR* InName)
641  : FDatasmithPointLightElementImpl< IDatasmithLightmassPortalElement >( InName, EDatasmithElementType::LightmassPortal )
642  {
643  }
644 };
645 
646 class FDatasmithPostProcessElementImpl : public FDatasmithElementImpl< IDatasmithPostProcessElement >
647 {
648 public:
650 
651  virtual float GetTemperature() const override { return Temperature; }
652  virtual void SetTemperature(float InTemperature) override { Temperature = InTemperature; }
653 
654  virtual FLinearColor GetColorFilter() const override { return ColorFilter; }
655  virtual void SetColorFilter(FLinearColor InColorFilter) override { ColorFilter = InColorFilter; }
656 
657  virtual float GetVignette() const override { return Vignette; }
658  virtual void SetVignette(float InVignette) override { Vignette = InVignette; }
659 
660  virtual float GetDof() const override { return Dof; }
661  virtual void SetDof(float InDof) override { Dof = InDof; }
662 
663  virtual float GetMotionBlur() const override { return MotionBlur; }
664  virtual void SetMotionBlur(float InMotionBlur) override { MotionBlur = InMotionBlur; }
665 
666  virtual float GetSaturation() const override { return Saturation; }
667  virtual void SetSaturation(float InSaturation) override { Saturation = InSaturation; }
668 
669  virtual float GetCameraISO() const override { return CameraISO; }
670  virtual void SetCameraISO(float InCameraISO) override { CameraISO = InCameraISO; }
671 
672  virtual float GetCameraShutterSpeed() const override { return CameraShutterSpeed; }
673  virtual void SetCameraShutterSpeed(float InCameraShutterSpeed) override { CameraShutterSpeed = InCameraShutterSpeed; }
674 
675  virtual float GetDepthOfFieldFstop() const override { return Fstop; }
676  virtual void SetDepthOfFieldFstop( float InFstop ) override { Fstop = InFstop; }
677 
678 private:
679  float Temperature;
680  FLinearColor ColorFilter;
681  float Vignette;
682  float Dof;
683  float MotionBlur;
684  float Saturation;
685  float CameraISO;
686  float CameraShutterSpeed;
687  float Fstop;
688 };
689 
690 class FDatasmithPostProcessVolumeElementImpl : public FDatasmithActorElementImpl< IDatasmithPostProcessVolumeElement >
691 {
692 public:
693  FDatasmithPostProcessVolumeElementImpl( const TCHAR* InName );
694 
695  virtual const TSharedRef< IDatasmithPostProcessElement >& GetSettings() const override { return Settings; }
696  virtual void SetSettings(const TSharedRef< IDatasmithPostProcessElement >& InSettings) override { Settings = InSettings; }
697 
698  virtual bool GetEnabled() const { return bEnabled; }
699  virtual void SetEnabled( bool bInEnabled ) { bEnabled = bInEnabled; }
700 
701  virtual bool GetUnbound() const override { return bUnbound; }
702  virtual void SetUnbound( bool bInUnbound) override { bUnbound = bInUnbound; }
703 
704 private:
705  TSharedRef< IDatasmithPostProcessElement > Settings;
706 
707  bool bEnabled;
708  bool bUnbound;
709 };
710 
711 class FDatasmithCameraActorElementImpl : public FDatasmithActorElementImpl< IDatasmithCameraActorElement >
712 {
713 public:
714  explicit FDatasmithCameraActorElementImpl(const TCHAR* InName);
715 
716  virtual float GetSensorWidth() const override;
717  virtual void SetSensorWidth(float InSensorWidth) override;
718 
719  virtual float GetSensorAspectRatio() const override;
720  virtual void SetSensorAspectRatio(float InSensorAspectRatio) override;
721 
722  virtual bool GetEnableDepthOfField() const override { return bEnableDepthOfField; }
723  virtual void SetEnableDepthOfField(bool bInEnableDepthOfField) override { bEnableDepthOfField = bInEnableDepthOfField; }
724 
725  virtual float GetFocusDistance() const override;
726  virtual void SetFocusDistance(float InFocusDistance) override;
727 
728  virtual float GetFStop() const override;
729  virtual void SetFStop(float InFStop) override;
730 
731  virtual float GetFocalLength() const override;
732  virtual void SetFocalLength(float InFocalLength) override;
733 
734  virtual TSharedPtr< IDatasmithPostProcessElement >& GetPostProcess() override;
735  virtual const TSharedPtr< IDatasmithPostProcessElement >& GetPostProcess() const override;
736  virtual void SetPostProcess(const TSharedPtr< IDatasmithPostProcessElement >& InPostProcess) override;
737 
738  virtual const TCHAR* GetLookAtActor() const override { return *ActorName; }
739  virtual void SetLookAtActor(const TCHAR* InActorName) override { ActorName = InActorName; }
740 
741  virtual bool GetLookAtAllowRoll() const override { return bLookAtAllowRoll; }
742  virtual void SetLookAtAllowRoll(bool bAllow) override { bLookAtAllowRoll = bAllow; }
743 
744 private:
745  TSharedPtr< IDatasmithPostProcessElement > PostProcess;
746 
747  float SensorWidth;
748  float SensorAspectRatio;
749  bool bEnableDepthOfField;
750  float FocusDistance;
751  float FStop;
752  float FocalLength;
753  FString ActorName;
754  bool bLookAtAllowRoll;
755 };
756 
757 class DATASMITHCORE_API FDatasmithCustomActorElementImpl : public FDatasmithActorElementImpl< IDatasmithCustomActorElement >
758 {
759 public:
760  explicit FDatasmithCustomActorElementImpl(const TCHAR* InName)
761  : FDatasmithActorElementImpl(InName, EDatasmithElementType::CustomActor)
762  {
763  }
764 
765  /** The class name or path to the blueprint to instantiate. */
766  virtual const TCHAR* GetClassOrPathName() const override { return *ClassOrPathName; }
767  virtual void SetClassOrPathName( const TCHAR* InClassOrPathName ) override { ClassOrPathName = InClassOrPathName; }
768 
769  /** Get the total amount of properties in this actor */
770  virtual int32 GetPropertiesCount() const override { return Properties.Num(); }
771 
772  /** Get the property i-th of this actor */
773  virtual const TSharedPtr< IDatasmithKeyValueProperty >& GetProperty(int32 i) const override { return Properties[i]; }
774  virtual TSharedPtr< IDatasmithKeyValueProperty >& GetProperty(int32 i) override { return Properties[i]; }
775 
776  /** Get a property by its name if it exists */
777  virtual const TSharedPtr< IDatasmithKeyValueProperty >& GetPropertyByName(const TCHAR* Name) const override;
778  virtual TSharedPtr< IDatasmithKeyValueProperty >& GetPropertyByName(const TCHAR* Name) override;
779 
780  /** Add a property to this actor */
781  virtual void AddProperty( const TSharedPtr< IDatasmithKeyValueProperty >& Property ) override;
782 
783  /** Removes a property from this actor, doesn't preserve ordering */
784  virtual void RemoveProperty( const TSharedPtr< IDatasmithKeyValueProperty >& Property ) override { Properties.RemoveSingleSwap( Property ); }
785 
786 private:
787  FString ClassOrPathName;
788 
789  TArray< TSharedPtr< IDatasmithKeyValueProperty > > Properties;
790  TMap< FString, int > PropertyIndexMap;
791 };
792 
793 class DATASMITHCORE_API FDatasmithLandscapeElementImpl : public FDatasmithActorElementImpl< IDatasmithLandscapeElement >
794 {
795 public:
796  explicit FDatasmithLandscapeElementImpl(const TCHAR* InName)
797  : FDatasmithActorElementImpl(InName, EDatasmithElementType::Landscape)
798  {
799  SetScale( 100.f, 100.f, 100.f );
800  }
801 
802  virtual void SetHeightmap( const TCHAR* InFilePath ) override { HeightmapFilePath = InFilePath; }
803  virtual const TCHAR* GetHeightmap() const override { return *HeightmapFilePath; }
804 
805  virtual void SetMaterial( const TCHAR* InMaterialPathName ) override { MaterialPathName = InMaterialPathName; }
806  virtual const TCHAR* GetMaterial() const override { return *MaterialPathName; }
807 
808 private:
809  FString HeightmapFilePath;
810  FString MaterialPathName;
811 };
812 
813 class FDatasmithEnvironmentElementImpl : public FDatasmithLightActorElementImpl< IDatasmithEnvironmentElement >
814 {
815 public:
816  explicit FDatasmithEnvironmentElementImpl(const TCHAR* InName);
817 
818  virtual TSharedPtr<IDatasmithCompositeTexture>& GetEnvironmentComp() override;
819  virtual const TSharedPtr<IDatasmithCompositeTexture>& GetEnvironmentComp() const override;
820 
821  virtual void SetEnvironmentComp(const TSharedPtr<IDatasmithCompositeTexture>& InEnvironmentComp) override;
822  virtual bool GetIsIlluminationMap() const override;
823  virtual void SetIsIlluminationMap(bool bInIsIlluminationMap) override;
824 
825 private:
826  TSharedPtr<IDatasmithCompositeTexture> EnvironmentComp;
827  bool bIsIlluminationMap;
828 };
829 
830 class FDatasmithTextureElementImpl : public FDatasmithElementImpl< IDatasmithTextureElement >
831 {
832 public:
833  explicit FDatasmithTextureElementImpl(const TCHAR* InName);
834 
835  virtual FMD5Hash CalculateElementHash(bool bForce) override;
836 
837  virtual const TCHAR* GetFile() const override;
838  virtual void SetFile(const TCHAR* InFile) override;
839 
840  virtual void SetData(const uint8* InData, uint32 InDataSize, EDatasmithTextureFormat InFormat) override;
841  virtual const uint8* GetData(uint32& OutDataSize, EDatasmithTextureFormat& OutFormat) const override;
842 
843  virtual FMD5Hash GetFileHash() const override { return FileHash; }
844  virtual void SetFileHash(FMD5Hash Hash) override { FileHash = Hash; }
845 
846  virtual EDatasmithTextureMode GetTextureMode() const override;
847  virtual void SetTextureMode(EDatasmithTextureMode InMode) override;
848 
849  virtual EDatasmithTextureFilter GetTextureFilter() const override;
850  virtual void SetTextureFilter(EDatasmithTextureFilter InFilter) override;
851 
852  virtual EDatasmithTextureAddress GetTextureAddressX() const override;
853  virtual void SetTextureAddressX(EDatasmithTextureAddress InMode) override;
854 
855  virtual EDatasmithTextureAddress GetTextureAddressY() const override;
856  virtual void SetTextureAddressY(EDatasmithTextureAddress InMode) override;
857 
858  virtual bool GetAllowResize() const override;
859  virtual void SetAllowResize(bool bInAllowResize) override;
860 
861  virtual float GetRGBCurve() const override;
862  virtual void SetRGBCurve(float InRGBCurve) override;
863 
864 private:
865  FString File;
866  FMD5Hash FileHash;
867  float RGBCurve;
868  EDatasmithTextureMode TextureMode;
869  EDatasmithTextureFilter TextureFilter;
870  EDatasmithTextureAddress TextureAddressX;
871  EDatasmithTextureAddress TextureAddressY;
872  bool bAllowResize;
873 
874  const uint8* Data;
875  uint32 DataSize;
876  EDatasmithTextureFormat TextureFormat;
877 };
878 
879 class FDatasmithShaderElementImpl : public FDatasmithElementImpl< IDatasmithShaderElement >
880 {
881 public:
882  explicit FDatasmithShaderElementImpl(const TCHAR* InName);
883 
884  virtual double GetIOR() const override { return IOR; }
885  virtual void SetIOR(double InValue) override { IOR = InValue; }
886 
887  virtual double GetIORk() const override { return IORk; }
888  virtual void SetIORk(double InValue) override { IORk = InValue; }
889 
890  virtual double GetIORRefra() const override { return IORRefra; }
891  virtual void SetIORRefra(double Value) override { IORRefra = Value; }
892 
893  virtual double GetBumpAmount() const override { return BumpAmount; }
894  virtual void SetBumpAmount(double InValue) override { BumpAmount = InValue; }
895 
896  virtual bool GetTwoSided() const override { return bTwoSided; }
897  virtual void SetTwoSided(bool InValue) override { bTwoSided = InValue; }
898 
899  virtual FLinearColor GetDiffuseColor() const override { return DiffuseColor; }
900  virtual void SetDiffuseColor(FLinearColor InValue) override { DiffuseColor = InValue; }
901 
902  virtual const TCHAR* GetDiffuseTexture() const override { return *DiffuseTexture; }
903  virtual void SetDiffuseTexture(const TCHAR* InValue) override { DiffuseTexture = InValue; }
904 
905  virtual FDatasmithTextureSampler GetDiffTextureSampler() const override { return DiffSampler; }
906  virtual void SetDiffTextureSampler(FDatasmithTextureSampler InValue) override { DiffSampler = InValue; }
907 
908  virtual TSharedPtr<IDatasmithCompositeTexture>& GetDiffuseComp() override { return DiffuseComp; }
909  virtual const TSharedPtr<IDatasmithCompositeTexture>& GetDiffuseComp() const override { return DiffuseComp; }
910  virtual void SetDiffuseComp(const TSharedPtr<IDatasmithCompositeTexture>& InValue) override { DiffuseComp = InValue; }
911 
912  virtual FLinearColor GetReflectanceColor() const override { return ReflectanceColor; }
913  virtual void SetReflectanceColor(FLinearColor InValue) override { ReflectanceColor = InValue; }
914 
915  virtual const TCHAR* GetReflectanceTexture() const override { return *ReflectanceTexture; }
916  virtual void SetReflectanceTexture(const TCHAR* InValue) override { ReflectanceTexture = InValue; }
917 
918  virtual FDatasmithTextureSampler GetRefleTextureSampler() const override { return RefleSampler; }
919  virtual void SetRefleTextureSampler(FDatasmithTextureSampler InValue) override { RefleSampler = InValue; }
920 
921  virtual TSharedPtr<IDatasmithCompositeTexture>& GetRefleComp() override { return RefleComp; }
922  virtual const TSharedPtr<IDatasmithCompositeTexture>& GetRefleComp() const override { return RefleComp; }
923  virtual void SetRefleComp(const TSharedPtr<IDatasmithCompositeTexture>& InValue) override { RefleComp = InValue; }
924 
925  virtual double GetRoughness() const override { return Roughness; }
926  virtual void SetRoughness(double InValue) override { Roughness = InValue; }
927 
928  virtual const TCHAR* GetRoughnessTexture() const override { return *RoughnessTexture; }
929  virtual void SetRoughnessTexture(const TCHAR* InValue) override { RoughnessTexture = InValue; }
930 
931  virtual TSharedPtr<IDatasmithCompositeTexture>& GetRoughnessComp() override { return RoughnessComp; }
932  virtual const TSharedPtr<IDatasmithCompositeTexture>& GetRoughnessComp() const override { return RoughnessComp; }
933  virtual void SetRoughnessComp(const TSharedPtr<IDatasmithCompositeTexture>& InValue) override { RoughnessComp = InValue; }
934 
935  virtual FDatasmithTextureSampler GetRoughTextureSampler() const override { return RoughSampler; }
936  virtual void SetRoughTextureSampler(FDatasmithTextureSampler InValue) override { RoughSampler = InValue; }
937 
938  virtual const TCHAR* GetNormalTexture() const override { return *NormalTexture; }
939  virtual void SetNormalTexture(const TCHAR* InValue) override { NormalTexture = InValue; }
940 
941  virtual FDatasmithTextureSampler GetNormalTextureSampler() const override { return NormalSampler; }
942  virtual void SetNormalTextureSampler(FDatasmithTextureSampler InValue) override { NormalSampler = InValue; }
943 
944  virtual TSharedPtr<IDatasmithCompositeTexture>& GetNormalComp() override { return NormalComp; }
945  virtual const TSharedPtr<IDatasmithCompositeTexture>& GetNormalComp() const override { return NormalComp; }
946  virtual void SetNormalComp(const TSharedPtr<IDatasmithCompositeTexture>& InValue) override { NormalComp = InValue; }
947 
948  virtual const TCHAR* GetBumpTexture() const override { return *BumpTexture; }
949  virtual void SetBumpTexture(const TCHAR* Value) override { BumpTexture = Value; }
950 
951  virtual FDatasmithTextureSampler GetBumpTextureSampler() const override { return BumpSampler; }
952  virtual void SetBumpTextureSampler(FDatasmithTextureSampler InValue) override { BumpSampler = InValue; }
953 
954  virtual TSharedPtr<IDatasmithCompositeTexture>& GetBumpComp() override { return BumpComp; }
955  virtual const TSharedPtr<IDatasmithCompositeTexture>& GetBumpComp() const override { return BumpComp; }
956  virtual void SetBumpComp(const TSharedPtr<IDatasmithCompositeTexture>& InValue) override { BumpComp = InValue; }
957 
958  virtual FLinearColor GetTransparencyColor() const override { return TransparencyColor; }
959  virtual void SetTransparencyColor(FLinearColor InValue) override { TransparencyColor = InValue; }
960 
961  virtual const TCHAR* GetTransparencyTexture() const override { return *TransparencyTexture; }
962  virtual void SetTransparencyTexture(const TCHAR* InValue) override { TransparencyTexture = InValue; }
963 
964  virtual FDatasmithTextureSampler GetTransTextureSampler() const override { return TransSampler; }
965  virtual void SetTransTextureSampler(FDatasmithTextureSampler InValue) override { TransSampler = InValue; }
966 
967  virtual TSharedPtr<IDatasmithCompositeTexture>& GetTransComp() override { return TransComp; }
968  virtual const TSharedPtr<IDatasmithCompositeTexture>& GetTransComp() const override { return TransComp; }
969  virtual void SetTransComp(const TSharedPtr<IDatasmithCompositeTexture>& InValue) override { TransComp = InValue; }
970 
971  virtual const TCHAR* GetMaskTexture() const override { return *MaskTexture; }
972  virtual void SetMaskTexture(const TCHAR* InValue) override { MaskTexture = InValue; }
973 
974  virtual FDatasmithTextureSampler GetMaskTextureSampler() const override { return MaskSampler; }
975  virtual void SetMaskTextureSampler(FDatasmithTextureSampler InValue) override { MaskSampler = InValue; }
976 
977  virtual TSharedPtr<IDatasmithCompositeTexture>& GetMaskComp() override { return MaskComp; }
978  virtual const TSharedPtr<IDatasmithCompositeTexture>& GetMaskComp() const override { return MaskComp; }
979  virtual void SetMaskComp(const TSharedPtr<IDatasmithCompositeTexture>& InValue) override { MaskComp = InValue; }
980 
981  virtual const TCHAR* GetDisplaceTexture() const override { return *DisplaceTexture; }
982  virtual void SetDisplaceTexture(const TCHAR* InValue) override { DisplaceTexture = InValue; }
983 
984  virtual FDatasmithTextureSampler GetDisplaceTextureSampler() const override { return DisplaceSampler; }
985  virtual void SetDisplaceTextureSampler(FDatasmithTextureSampler InValue) override { DisplaceSampler = InValue; }
986 
987  virtual double GetDisplace() const override { return Displace; }
988  virtual void SetDisplace(double InValue) override { Displace = InValue; }
989 
990  virtual double GetDisplaceSubDivision() const override { return DisplaceSubDivision; }
991  virtual void SetDisplaceSubDivision(double InValue) override { DisplaceSubDivision = InValue; }
992 
993  virtual TSharedPtr<IDatasmithCompositeTexture>& GetDisplaceComp() override { return DisplaceComp; }
994  virtual const TSharedPtr<IDatasmithCompositeTexture>& GetDisplaceComp() const override { return DisplaceComp; }
995  virtual void SetDisplaceComp(const TSharedPtr<IDatasmithCompositeTexture>& InValue) override { DisplaceComp = InValue; }
996 
997  virtual double GetMetal() const override { return Metal; }
998  virtual void SetMetal(double InValue) override { Metal = InValue; }
999 
1000  virtual const TCHAR* GetMetalTexture() const override { return *MetalTexture; }
1001  virtual void SetMetalTexture(const TCHAR* InValue) override { MetalTexture = InValue; }
1002 
1003  virtual FDatasmithTextureSampler GetMetalTextureSampler() const override { return MetalSampler; }
1004  virtual void SetMetalTextureSampler(FDatasmithTextureSampler InValue) override { MetalSampler = InValue; }
1005 
1006  virtual TSharedPtr<IDatasmithCompositeTexture>& GetMetalComp() override { return MetalComp; }
1007  virtual const TSharedPtr<IDatasmithCompositeTexture>& GetMetalComp() const override { return MetalComp; }
1008  virtual void SetMetalComp(const TSharedPtr<IDatasmithCompositeTexture>& Value) override { MetalComp = Value; }
1009 
1010  virtual const TCHAR* GetEmitTexture() const override { return *EmitTexture; }
1011  virtual void SetEmitTexture(const TCHAR* InValue) override { EmitTexture = InValue; }
1012 
1013  virtual FDatasmithTextureSampler GetEmitTextureSampler() const override { return EmitSampler; }
1014  virtual void SetEmitTextureSampler(FDatasmithTextureSampler InValue) override { EmitSampler = InValue; }
1015 
1016  virtual FLinearColor GetEmitColor() const override { return EmitColor; }
1017  virtual void SetEmitColor(FLinearColor InValue) override { EmitColor = InValue; }
1018 
1019  virtual double GetEmitTemperature() const override { return EmitTemperature; }
1020  virtual void SetEmitTemperature(double InValue) override { EmitTemperature = InValue; }
1021 
1022  virtual double GetEmitPower() const override { return EmitPower; }
1023  virtual void SetEmitPower(double InValue) override { EmitPower = InValue; }
1024 
1025  virtual TSharedPtr<IDatasmithCompositeTexture>& GetEmitComp() override { return EmitComp; }
1026  virtual const TSharedPtr<IDatasmithCompositeTexture>& GetEmitComp() const override { return EmitComp; }
1027  virtual void SetEmitComp(const TSharedPtr<IDatasmithCompositeTexture>& InValue) override { EmitComp = InValue; }
1028 
1029  virtual bool GetLightOnly() const override { return bLightOnly; }
1030  virtual void SetLightOnly(bool InValue) override { bLightOnly = InValue; }
1031 
1032  virtual FLinearColor GetWeightColor() const override { return WeightColor; }
1033  virtual void SetWeightColor(FLinearColor InValue) override { WeightColor = InValue; }
1034 
1035  virtual const TCHAR* GetWeightTexture() const override { return *WeightTexture; }
1036  virtual void SetWeightTexture(const TCHAR* InValue) override { WeightTexture = InValue; }
1037 
1038  virtual FDatasmithTextureSampler GetWeightTextureSampler() const override { return WeightSampler; }
1039  virtual void SetWeightTextureSampler(FDatasmithTextureSampler InValue) override { WeightSampler = InValue; }
1040 
1041  virtual TSharedPtr<IDatasmithCompositeTexture>& GetWeightComp() override { return WeightComp; }
1042  virtual const TSharedPtr<IDatasmithCompositeTexture>& GetWeightComp() const override { return WeightComp; }
1043  virtual void SetWeightComp(const TSharedPtr<IDatasmithCompositeTexture>& InValue) override { WeightComp = InValue; }
1044 
1045  virtual double GetWeightValue() const override { return WeightValue; }
1046  virtual void SetWeightValue(double InValue) override { WeightValue = InValue; }
1047 
1048  virtual EDatasmithBlendMode GetBlendMode() const override { return BlendMode; }
1049  virtual void SetBlendMode(EDatasmithBlendMode InValue) override { BlendMode = InValue; }
1050 
1051  virtual bool GetIsStackedLayer() const override { return bIsStackedLayer; }
1052  virtual void SetIsStackedLayer(bool InValue) override { bIsStackedLayer = InValue; }
1053 
1054  virtual const EDatasmithShaderUsage GetShaderUsage() const override { return ShaderUsage; }
1055  virtual void SetShaderUsage(EDatasmithShaderUsage InShaderUsage) override { ShaderUsage = InShaderUsage; };
1056 
1057  virtual const bool GetUseEmissiveForDynamicAreaLighting() const override { return bUseEmissiveForDynamicAreaLighting; }
1058  virtual void SetUseEmissiveForDynamicAreaLighting(bool InUseEmissiveForDynamicAreaLighting) override { bUseEmissiveForDynamicAreaLighting = InUseEmissiveForDynamicAreaLighting; };
1059 
1060 private:
1061  double IOR;
1062  double IORk;
1063  double IORRefra;
1064 
1065  double BumpAmount;
1066  bool bTwoSided;
1067 
1068  FLinearColor DiffuseColor;
1069  FString DiffuseTexture;
1070  FDatasmithTextureSampler DiffSampler;
1071  TSharedPtr<IDatasmithCompositeTexture> DiffuseComp;
1072 
1073  FLinearColor ReflectanceColor;
1074  FString ReflectanceTexture;
1075  FDatasmithTextureSampler RefleSampler;
1076  TSharedPtr<IDatasmithCompositeTexture> RefleComp;
1077 
1078  double Roughness;
1079  FString RoughnessTexture;
1080  FDatasmithTextureSampler RoughSampler;
1081  TSharedPtr<IDatasmithCompositeTexture> RoughnessComp;
1082 
1083  FString NormalTexture;
1084  FDatasmithTextureSampler NormalSampler;
1085  TSharedPtr<IDatasmithCompositeTexture> NormalComp;
1086 
1087  FString BumpTexture;
1088  FDatasmithTextureSampler BumpSampler;
1089  TSharedPtr<IDatasmithCompositeTexture> BumpComp;
1090 
1091  FLinearColor TransparencyColor;
1092  FString TransparencyTexture;
1093  FDatasmithTextureSampler TransSampler;
1094  TSharedPtr<IDatasmithCompositeTexture> TransComp;
1095 
1096  FString MaskTexture;
1097  FDatasmithTextureSampler MaskSampler;
1098  TSharedPtr<IDatasmithCompositeTexture> MaskComp;
1099 
1100  FString DisplaceTexture;
1101  FDatasmithTextureSampler DisplaceSampler;
1102  double Displace;
1103  double DisplaceSubDivision;
1104  TSharedPtr<IDatasmithCompositeTexture> DisplaceComp;
1105 
1106  double Metal;
1107  FString MetalTexture;
1108  FDatasmithTextureSampler MetalSampler;
1109  TSharedPtr<IDatasmithCompositeTexture> MetalComp;
1110 
1111  FString EmitTexture;
1112  FDatasmithTextureSampler EmitSampler;
1113  FLinearColor EmitColor;
1114  double EmitTemperature;
1115  double EmitPower;
1116  TSharedPtr<IDatasmithCompositeTexture> EmitComp;
1117 
1118  bool bLightOnly;
1119 
1120  FLinearColor WeightColor;
1121  FString WeightTexture;
1122  FDatasmithTextureSampler WeightSampler;
1123  TSharedPtr<IDatasmithCompositeTexture> WeightComp;
1124  double WeightValue;
1125 
1126  EDatasmithBlendMode BlendMode;
1127  bool bIsStackedLayer;
1128 
1129  EDatasmithShaderUsage ShaderUsage;
1130  bool bUseEmissiveForDynamicAreaLighting;
1131 };
1132 
1133 template< typename InterfaceType >
1135 {
1136 public:
1137  explicit FDatasmithBaseMaterialElementImpl(const TCHAR* InName, EDatasmithElementType ChildType);
1138 };
1139 
1140 template< typename T >
1141 inline FDatasmithBaseMaterialElementImpl<T>::FDatasmithBaseMaterialElementImpl(const TCHAR* InName, EDatasmithElementType ChildType)
1142  : FDatasmithElementImpl<T>(InName, EDatasmithElementType::BaseMaterial | ChildType)
1143 {
1144 }
1145 
1146 class FDatasmithMaterialElementImpl : public FDatasmithBaseMaterialElementImpl< IDatasmithMaterialElement >
1147 {
1148 public:
1149  explicit FDatasmithMaterialElementImpl(const TCHAR* InName);
1150 
1151  virtual bool IsSingleShaderMaterial() const override;
1152  virtual bool IsClearCoatMaterial() const override;
1153 
1154  virtual void AddShader(const TSharedPtr< IDatasmithShaderElement >& InShader) override;
1155 
1156  virtual int32 GetShadersCount() const override;
1157  virtual TSharedPtr< IDatasmithShaderElement >& GetShader(int32 InIndex) override;
1158  virtual const TSharedPtr< IDatasmithShaderElement >& GetShader(int32 InIndex) const override;
1159 
1160 private:
1161  TArray< TSharedPtr< IDatasmithShaderElement > > Shaders;
1162 };
1163 
1164 class FDatasmithMasterMaterialElementImpl : public FDatasmithBaseMaterialElementImpl< IDatasmithMasterMaterialElement >
1165 {
1166 public:
1167  FDatasmithMasterMaterialElementImpl(const TCHAR* InName);
1168 
1169  virtual EDatasmithMasterMaterialType GetMaterialType() const { return MaterialType; }
1170  virtual void SetMaterialType( EDatasmithMasterMaterialType InType ) override { MaterialType = InType; }
1171 
1172  virtual EDatasmithMasterMaterialQuality GetQuality() const { return Quality; }
1173  virtual void SetQuality( EDatasmithMasterMaterialQuality InQuality ) { Quality = InQuality; }
1174 
1175  virtual const TCHAR* GetCustomMaterialPathName() const { return *CustomMaterialPathName; }
1176  virtual void SetCustomMaterialPathName( const TCHAR* InPathName ){ CustomMaterialPathName = InPathName; }
1177 
1178  int32 GetPropertiesCount() const override { return Properties.Num(); }
1179 
1180  const TSharedPtr< IDatasmithKeyValueProperty >& GetProperty( int32 InIndex ) const override;
1181  TSharedPtr< IDatasmithKeyValueProperty >& GetProperty( int32 InIndex ) override;
1182 
1183  const TSharedPtr< IDatasmithKeyValueProperty >& GetPropertyByName( const TCHAR* InName ) const override;
1184  TSharedPtr< IDatasmithKeyValueProperty >& GetPropertyByName( const TCHAR* InName ) override;
1185 
1186  void AddProperty( const TSharedPtr< IDatasmithKeyValueProperty >& InProperty ) override;
1187 
1188 private:
1189  TArray< TSharedPtr< IDatasmithKeyValueProperty > > Properties;
1190  TMap< FString, int > PropertyIndexMap;
1191 
1192  EDatasmithMasterMaterialType MaterialType;
1193  EDatasmithMasterMaterialQuality Quality;
1194 
1195  FString CustomMaterialPathName;
1196 };
1197 
1199 {
1200 public:
1201  FDatasmithCompositeSurface(const TSharedPtr<IDatasmithCompositeTexture>& SubComp);
1202  FDatasmithCompositeSurface(const TCHAR* InTexture, FDatasmithTextureSampler InTexUV);
1203  FDatasmithCompositeSurface(const FLinearColor& InColor);
1204 
1205  bool GetUseTexture() const;
1206  bool GetUseColor() const;
1207  bool GetUseComposite() const;
1208 
1209  FDatasmithTextureSampler& GetParamTextureSampler();
1210  const TCHAR* GetParamTexture() const;
1211  void SetParamTexture(const TCHAR* InTexture);
1212  const FLinearColor& GetParamColor() const;
1213  TSharedPtr<IDatasmithCompositeTexture>& GetParamSubComposite();
1214 
1215 private:
1216  FDatasmithTextureSampler ParamSampler;
1217  FString ParamTextures;
1218  FLinearColor ParamColor;
1219  TSharedPtr<IDatasmithCompositeTexture> ParamSubComposite;
1220  bool bParamUseTexture;
1221 };
1222 
1224 {
1225 public:
1227 
1228  virtual bool IsValid() const override;
1229 
1230  virtual EDatasmithCompMode GetMode() const override { return CompMode; }
1231  virtual void SetMode(EDatasmithCompMode InMode) override { CompMode = InMode; }
1232  virtual int32 GetParamSurfacesCount() const override { return ParamSurfaces.Num(); }
1233 
1234  virtual bool GetUseTexture(int32 InIndex) override;
1235 
1236  virtual const TCHAR* GetParamTexture(int32 InIndex) override;
1237  virtual void SetParamTexture(int32 InIndex, const TCHAR* InTexture) override;
1238 
1239  virtual FDatasmithTextureSampler& GetParamTextureSampler(int32 InIndex) override;
1240 
1241  virtual bool GetUseColor(int32 InIndex) override;
1242  virtual const FLinearColor& GetParamColor(int32 InIndex) override;
1243 
1244  virtual bool GetUseComposite(int32 InIndex) override;
1245 
1246  virtual int32 GetParamVal1Count() const override { return ParamVal1.Num(); }
1247  virtual ParamVal GetParamVal1(int32 InIndex) const override;
1248  virtual void AddParamVal1(ParamVal InParamVal) override { ParamVal1.Add( ParamValImpl( InParamVal.Key, InParamVal.Value ) ); }
1249 
1250  virtual int32 GetParamVal2Count() const override { return ParamVal2.Num(); }
1251  virtual ParamVal GetParamVal2(int32 InIndex) const override;
1252  virtual void AddParamVal2(ParamVal InParamVal) override { ParamVal2.Add( ParamValImpl( InParamVal.Key, InParamVal.Value ) ); }
1253 
1254  virtual int32 GetParamMaskSurfacesCount() const override { return ParamMaskSurfaces.Num(); }
1255  virtual const TCHAR* GetParamMask(int32 InIndex) override;
1256  virtual const FLinearColor& GetParamMaskColor(int32 i) const override;
1257  virtual bool GetMaskUseComposite(int32 InIndex) const override;
1258  virtual void AddMaskSurface(const TCHAR* InMask, const FDatasmithTextureSampler InMaskSampler) override { ParamMaskSurfaces.Add( FDatasmithCompositeSurface( InMask, InMaskSampler )); }
1259  virtual void AddMaskSurface(const FLinearColor& InColor) override { ParamMaskSurfaces.Add( FDatasmithCompositeSurface( InColor ) ); }
1260 
1261  virtual FDatasmithTextureSampler GetParamMaskTextureSampler(int32 InIndex) override;
1262 
1263  virtual TSharedPtr<IDatasmithCompositeTexture>& GetParamSubComposite(int32 InIndex) override;
1264  virtual void AddSurface(const TSharedPtr<IDatasmithCompositeTexture>& SubComp) override { ParamSurfaces.Add( FDatasmithCompositeSurface( SubComp ) ); }
1265 
1266  virtual TSharedPtr<IDatasmithCompositeTexture>& GetParamMaskSubComposite(int32 InIndex) override;
1267  virtual void AddMaskSurface(const TSharedPtr<IDatasmithCompositeTexture>& InMaskSubComp) override { ParamMaskSurfaces.Add( FDatasmithCompositeSurface( InMaskSubComp ) ); }
1268 
1269  virtual const TCHAR* GetBaseTextureName() const override { return *BaseTexName; }
1270  virtual const TCHAR* GetBaseColName() const override { return *BaseColName; }
1271  virtual const TCHAR* GetBaseValName() const override { return *BaseValName; }
1272  virtual const TCHAR* GetBaseCompName() const override { return *BaseCompName; }
1273 
1274  virtual void SetBaseNames(const TCHAR* InTextureName, const TCHAR* InColorName, const TCHAR* InValueName, const TCHAR* InCompName) override;
1275 
1276  virtual void AddSurface(const TCHAR* InTexture, FDatasmithTextureSampler InTexUV) override { ParamSurfaces.Add( FDatasmithCompositeSurface( InTexture, InTexUV )); }
1277  virtual void AddSurface(const FLinearColor& InColor) override { ParamSurfaces.Add( FDatasmithCompositeSurface( InColor )); }
1278  virtual void ClearSurface() override
1279  {
1280  ParamSurfaces.Empty();
1281  }
1282 
1283 private:
1284  TArray<FDatasmithCompositeSurface> ParamSurfaces;
1285  TArray<FDatasmithCompositeSurface> ParamMaskSurfaces;
1286 
1287  typedef TPair<float, FString> ParamValImpl;
1288  TArray<ParamValImpl> ParamVal1;
1289  TArray<ParamValImpl> ParamVal2;
1290 
1291  EDatasmithCompMode CompMode;
1292 
1293  // used for single material
1294  FString BaseTexName;
1295  FString BaseColName;
1296  FString BaseValName;
1297  FString BaseCompName;
1298 };
1299 
1300 class DATASMITHCORE_API FDatasmithMetaDataElementImpl : public FDatasmithElementImpl< IDatasmithMetaDataElement >
1301 {
1302 public:
1303  explicit FDatasmithMetaDataElementImpl(const TCHAR* InName);
1304 
1305  virtual const TSharedPtr< IDatasmithElement >& GetAssociatedElement() const override { return AssociatedElement; }
1306  virtual void SetAssociatedElement(const TSharedPtr< IDatasmithElement >& Element) { AssociatedElement = Element; }
1307 
1308  int32 GetPropertiesCount() const override { return Properties.Num(); }
1309 
1310  virtual const TSharedPtr< IDatasmithKeyValueProperty >& GetProperty(int32 i) const override { return Properties[i]; }
1311  virtual TSharedPtr< IDatasmithKeyValueProperty >& GetProperty(int32 i) override { return Properties[i]; }
1312 
1313  const TSharedPtr< IDatasmithKeyValueProperty >& GetPropertyByName( const TCHAR* InName ) const override;
1314  TSharedPtr< IDatasmithKeyValueProperty >& GetPropertyByName( const TCHAR* InName ) override;
1315 
1316  virtual void AddProperty( const TSharedPtr< IDatasmithKeyValueProperty >& Property ) override;
1317 
1318 private:
1319  TSharedPtr< IDatasmithElement > AssociatedElement;
1320  TArray< TSharedPtr< IDatasmithKeyValueProperty > > Properties;
1321  TMap< FString, int > PropertyIndexMap;
1322 };
1323 
1324 class DATASMITHCORE_API FDatasmithSceneImpl : public FDatasmithElementImpl< IDatasmithScene >
1325 {
1326 public:
1327  explicit FDatasmithSceneImpl(const TCHAR* InName);
1328 
1329  virtual void Reset() override;
1330 
1331  virtual const TCHAR* GetHost() const
1332  {
1333  return *Hostname;
1334  }
1335 
1336  virtual void SetHost(const TCHAR* InHostname)
1337  {
1338  Hostname = InHostname;
1339  }
1340 
1341  virtual const TCHAR* GetExporterVersion() const override { return *ExporterVersion; }
1342  virtual void SetExporterVersion(const TCHAR* InVersion) override { ExporterVersion = InVersion; }
1343 
1344  virtual const TCHAR* GetExporterSDKVersion() const override { return *ExporterSDKVersion; }
1345  virtual void SetExporterSDKVersion(const TCHAR* InVersion) override { ExporterSDKVersion = InVersion; }
1346 
1347  virtual const TCHAR* GetVendor() const override { return *Vendor; }
1348  virtual void SetVendor(const TCHAR* InVendor) override { Vendor = InVendor; }
1349 
1350  virtual const TCHAR* GetProductName() const override { return *ProductName; }
1351  virtual void SetProductName(const TCHAR* InProductName) override { ProductName = InProductName; }
1352 
1353  virtual const TCHAR* GetProductVersion() const override { return *ProductVersion; }
1354  virtual void SetProductVersion(const TCHAR* InProductVersion) override { ProductVersion = InProductVersion; }
1355 
1356  virtual const TCHAR* GetUserID() const override { return *UserID; }
1357  virtual void SetUserID(const TCHAR* InUserID) override { UserID = InUserID; }
1358 
1359  virtual const TCHAR* GetUserOS() const override { return *UserOS; }
1360  virtual void SetUserOS(const TCHAR* InUserOS) override { UserOS = InUserOS; }
1361 
1362  virtual int32 GetExportDuration() const override { return ExportDuration; }
1363  virtual void SetExportDuration(int32 InExportDuration) override { ExportDuration = InExportDuration; }
1364 
1365  virtual void AddMesh(const TSharedPtr< IDatasmithMeshElement >& InMesh) override { Meshes.Add(InMesh); }
1366  virtual int32 GetMeshesCount() const override { return Meshes.Num(); }
1367  virtual TSharedPtr< IDatasmithMeshElement > GetMesh(int32 InIndex) override;
1368  virtual const TSharedPtr< IDatasmithMeshElement >& GetMesh(int32 InIndex) const override;
1369  virtual void RemoveMesh(const TSharedPtr< IDatasmithMeshElement >& InMesh) override { Meshes.Remove(InMesh); }
1370  virtual void EmptyMeshes() override { Meshes.Empty(); }
1371 
1372  virtual void AddActor(const TSharedPtr< IDatasmithActorElement >& InActor) override { Actors.Add(InActor); }
1373  virtual int32 GetActorsCount() const override { return Actors.Num(); }
1374  virtual TSharedPtr< IDatasmithActorElement > GetActor(int32 InIndex) override { return Actors[InIndex]; }
1375  virtual const TSharedPtr< IDatasmithActorElement >& GetActor(int32 InIndex) const override { return Actors[InIndex]; }
1376  virtual void RemoveActor(const TSharedPtr< IDatasmithActorElement >& InActor, EDatasmithActorRemovalRule RemoveRule) override;
1377 
1378  virtual void AddMaterial(const TSharedPtr< IDatasmithBaseMaterialElement >& InMaterial) override { Materials.Add(InMaterial); }
1379  virtual int32 GetMaterialsCount() const override { return Materials.Num(); }
1380  virtual TSharedPtr< IDatasmithBaseMaterialElement > GetMaterial(int32 InIndex) override { return Materials[InIndex]; }
1381  virtual const TSharedPtr< IDatasmithBaseMaterialElement >& GetMaterial(int32 InIndex) const override { return Materials[InIndex]; }
1382  virtual void RemoveMaterial(const TSharedPtr< IDatasmithBaseMaterialElement >& InMaterial) override { Materials.Remove(InMaterial); }
1383  virtual void EmptyMaterials() override { Materials.Empty(); }
1384 
1385  virtual void AddTexture(const TSharedPtr< IDatasmithTextureElement >& InTexture) override { Textures.Add(InTexture); }
1386  virtual int32 GetTexturesCount() const override { return Textures.Num(); }
1387  virtual TSharedPtr< IDatasmithTextureElement > GetTexture(int32 InIndex) override { return Textures[InIndex]; }
1388  virtual const TSharedPtr< IDatasmithTextureElement >& GetTexture(int32 InIndex) const override { return Textures[InIndex]; }
1389  virtual void RemoveTexture(const TSharedPtr< IDatasmithTextureElement >& InTexture) override { Textures.Remove(InTexture); }
1390  virtual void EmptyTextures() override { Textures.Empty(); }
1391 
1392  virtual void SetPostProcess(const TSharedPtr< IDatasmithPostProcessElement >& InPostProcess) override { PostProcess = InPostProcess; }
1393  virtual TSharedPtr< IDatasmithPostProcessElement > GetPostProcess() override { return PostProcess; }
1394  virtual const TSharedPtr< IDatasmithPostProcessElement >& GetPostProcess() const override { return PostProcess; }
1395 
1396  virtual void SetUsePhysicalSky(bool bInUsePhysicalSky) override { bUseSky = bInUsePhysicalSky; }
1397  virtual bool GetUsePhysicalSky() const override { return bUseSky; }
1398 
1399  virtual void AddLODScreenSize( float ScreenSize ) override { LODScreenSizes.Add( FMath::Clamp( ScreenSize, 0.f, 1.f ) ); }
1400  virtual int32 GetLODScreenSizesCount() const override { return LODScreenSizes.Num(); }
1401  virtual float GetLODScreenSize(int32 InIndex) const override { return LODScreenSizes.IsValidIndex( InIndex ) ? LODScreenSizes[InIndex] : 0.f; }
1402 
1403  virtual void AddMetaData(const TSharedPtr< IDatasmithMetaDataElement >& InMetaData) override { MetaData.Add(InMetaData); ElementToMetaDataMap.Add(InMetaData->GetAssociatedElement(), InMetaData); }
1404 
1405  virtual int32 GetMetaDataCount() const override { return MetaData.Num(); }
1406  virtual TSharedPtr< IDatasmithMetaDataElement > GetMetaData(int32 InIndex) override;
1407  virtual const TSharedPtr< IDatasmithMetaDataElement >& GetMetaData(int32 InIndex) const override;
1408  virtual TSharedPtr< IDatasmithMetaDataElement > GetMetaData(const TSharedPtr<IDatasmithElement>& Element) override;
1409  virtual const TSharedPtr< IDatasmithMetaDataElement >& GetMetaData(const TSharedPtr<IDatasmithElement>& Element) const override;
1410 
1411  virtual void AddLevelSequence(const TSharedRef< IDatasmithLevelSequenceElement >& InSequence) override { LevelSequences.Add(InSequence); }
1412  virtual int32 GetLevelSequencesCount() const override { return LevelSequences.Num(); }
1413 
1414  virtual TSharedPtr< IDatasmithLevelSequenceElement > GetLevelSequence(int32 InIndex) override
1415  {
1416  return LevelSequences.IsValidIndex(InIndex) ? LevelSequences[InIndex] : TSharedPtr< IDatasmithLevelSequenceElement >();
1417  }
1418 
1419  virtual void RemoveLevelSequence(const TSharedRef< IDatasmithLevelSequenceElement >& InSequence) override { LevelSequences.Remove(InSequence); }
1420 
1421  virtual void AttachActor(const TSharedPtr< IDatasmithActorElement >& NewParent, const TSharedPtr< IDatasmithActorElement >& Child, EDatasmithActorAttachmentRule AttachmentRule) override;
1422  virtual void AttachActorToSceneRoot(const TSharedPtr< IDatasmithActorElement >& Child, EDatasmithActorAttachmentRule AttachmentRule) override;
1423 
1424 private:
1425  TArray< TSharedPtr< IDatasmithActorElement > > Actors;
1426  TArray< TSharedPtr< IDatasmithMeshElement > > Meshes;
1427  TArray< TSharedPtr< IDatasmithBaseMaterialElement > > Materials;
1428  TArray< TSharedPtr< IDatasmithTextureElement > > Textures;
1429  TArray< TSharedPtr< IDatasmithMetaDataElement > > MetaData;
1430  TArray< TSharedRef< IDatasmithLevelSequenceElement > > LevelSequences;
1431  TArray< float > LODScreenSizes;
1432  TSharedPtr< IDatasmithPostProcessElement > PostProcess;
1433  TMap< TSharedPtr< IDatasmithElement >, TSharedPtr< IDatasmithMetaDataElement> > ElementToMetaDataMap;
1434 
1435  FString Hostname;
1436  FString ExporterVersion;
1437  FString ExporterSDKVersion;
1438  FString Vendor;
1439  FString ProductName;
1440  FString ProductVersion;
1441  FString UserID;
1442  FString UserOS;
1443 
1444  uint32 ExportDuration;
1445 
1446  bool bUseSky;
1447 };
FDatasmithSceneImpl::RemoveMaterial
virtual void RemoveMaterial(const TSharedPtr< IDatasmithBaseMaterialElement > &InMaterial) override
Removes a Material Element from the scene.
Definition: DatasmithSceneElementsImpl.h:1382
FDatasmithCameraActorElementImpl::SetLookAtActor
virtual void SetLookAtActor(const TCHAR *InActorName) override
Set camera look at actor name.
Definition: DatasmithSceneElementsImpl.h:739
FDatasmithMetaDataElementImpl::GetPropertiesCount
int32 GetPropertiesCount() const override
Get the total amount of properties in this meta data.
Definition: DatasmithSceneElementsImpl.h:1308
FDatasmithCompositeTextureImpl::ClearSurface
virtual void ClearSurface() override
Purges all the surfaces that could be used as layers inside this composite.
Definition: DatasmithSceneElementsImpl.h:1278
FDatasmithCompositeSurface
Definition: DatasmithSceneElementsImpl.h:1198
FDatasmithShaderElementImpl::SetMetalTexture
virtual void SetMetalTexture(const TCHAR *InValue) override
Set the diffuse filename.
Definition: DatasmithSceneElementsImpl.h:1001
FDatasmithMeshElementImpl::GetDimensions
virtual FVector GetDimensions() const override
Get the bounding box dimension of the mesh, in a vector in the form of (Width, Height,...
Definition: DatasmithSceneElementsImpl.h:261
FDatasmithShaderElementImpl::SetDisplaceComp
virtual void SetDisplaceComp(const TSharedPtr< IDatasmithCompositeTexture > &InValue) override
Set the displacement compound map.
Definition: DatasmithSceneElementsImpl.h:995
FDatasmithMeshElementImpl::GetLightmapCoordinateIndex
virtual int32 GetLightmapCoordinateIndex() const
Get the UV channel that will be used for the lightmap.
Definition: DatasmithSceneElementsImpl.h:268
FDatasmithKeyValuePropertyImpl::SetPropertyType
void SetPropertyType(EDatasmithKeyValuePropertyType InType) override
Set the type of this property.
FDatasmithShaderElementImpl::GetReflectanceTexture
virtual const TCHAR * GetReflectanceTexture() const override
Get the reflectance filename.
Definition: DatasmithSceneElementsImpl.h:915
FDatasmithSceneImpl::AddTexture
virtual void AddTexture(const TSharedPtr< IDatasmithTextureElement > &InTexture) override
Adds a new Texture Element to the scene (it won't be applied to any material).
Definition: DatasmithSceneElementsImpl.h:1385
FDatasmithMaterialElementImpl::IsClearCoatMaterial
virtual bool IsClearCoatMaterial() const override
Returns true if the material has a clear coat layer, false otherwise.
FDatasmithShaderElementImpl::SetDisplace
virtual void SetDisplace(double InValue) override
Set the displacement value in centimeters.
Definition: DatasmithSceneElementsImpl.h:988
FDatasmithCompositeTextureImpl
Definition: DatasmithSceneElementsImpl.h:1223
FDatasmithShaderElementImpl::SetTransparencyTexture
virtual void SetTransparencyTexture(const TCHAR *InValue) override
Set the transparency filename.
Definition: DatasmithSceneElementsImpl.h:962
FDatasmithCompositeTextureImpl::GetBaseValName
virtual const TCHAR * GetBaseValName() const override
Returns the string that identifies the value element.
Definition: DatasmithSceneElementsImpl.h:1271
FDatasmithMeshElementImpl::GetFileHash
virtual FMD5Hash GetFileHash() const override
Return a MD5 hash of the content of the Mesh Element.
Definition: DatasmithSceneElementsImpl.h:257
FDatasmithShaderElementImpl::GetBumpComp
virtual const TSharedPtr< IDatasmithCompositeTexture > & GetBumpComp() const override
Get the bumpmapping compound map.
Definition: DatasmithSceneElementsImpl.h:955
FDatasmithSceneImpl::SetProductVersion
virtual void SetProductVersion(const TCHAR *InProductVersion) override
Sets the product version of the application used to export the scene.
Definition: DatasmithSceneElementsImpl.h:1354
FDatasmithShaderElementImpl::GetDiffuseComp
virtual TSharedPtr< IDatasmithCompositeTexture > & GetDiffuseComp() override
Get the diffuse compound map.
Definition: DatasmithSceneElementsImpl.h:908
FDatasmithCompositeTextureImpl::GetMode
virtual EDatasmithCompMode GetMode() const override
Gets the composition mode like color correction etc.
Definition: DatasmithSceneElementsImpl.h:1230
FDatasmithMeshElementImpl::CalculateElementHash
virtual FMD5Hash CalculateElementHash(bool bForce) override
Return a MD5 hash of the content of the Element.
FDatasmithShaderElementImpl::SetMaskTextureSampler
virtual void SetMaskTextureSampler(FDatasmithTextureSampler InValue) override
Set the opacity mask UV coordinates.
Definition: DatasmithSceneElementsImpl.h:975
FDatasmithCompositeTextureImpl::GetParamVal2Count
virtual int32 GetParamVal2Count() const override
Get the number of value2 parameters.
Definition: DatasmithSceneElementsImpl.h:1250
FDatasmithCompositeTextureImpl::GetBaseTextureName
virtual const TCHAR * GetBaseTextureName() const override
Returns the string that identifies the texture element.
Definition: DatasmithSceneElementsImpl.h:1269
FDatasmithShaderElementImpl::GetTwoSided
virtual bool GetTwoSided() const override
Get the two sided material attribute.
Definition: DatasmithSceneElementsImpl.h:896
FDatasmithTextureElementImpl::SetTextureAddressY
virtual void SetTextureAddressY(EDatasmithTextureAddress InMode) override
Set texture Y axis address mode.
FDatasmithCustomActorElementImpl::GetProperty
virtual const TSharedPtr< IDatasmithKeyValueProperty > & GetProperty(int32 i) const override
Get the property i-th of this actor.
Definition: DatasmithSceneElementsImpl.h:773
FDatasmithShaderElementImpl::SetLightOnly
virtual void SetLightOnly(bool InValue) override
Sets material is used as lighting only.
Definition: DatasmithSceneElementsImpl.h:1030
FDatasmithSceneImpl::SetPostProcess
virtual void SetPostProcess(const TSharedPtr< IDatasmithPostProcessElement > &InPostProcess) override
Set a new Postprocess for the scene.
Definition: DatasmithSceneElementsImpl.h:1392
FDatasmithPostProcessElementImpl::SetCameraISO
virtual void SetCameraISO(float InCameraISO) override
Set camera ISO.
Definition: DatasmithSceneElementsImpl.h:670
FDatasmithShaderElementImpl::GetNormalComp
virtual const TSharedPtr< IDatasmithCompositeTexture > & GetNormalComp() const override
Get the normalmapping compound map.
Definition: DatasmithSceneElementsImpl.h:945
FDatasmithMeshElementImpl
Definition: DatasmithSceneElementsImpl.h:247
FDatasmithShaderElementImpl::GetMetal
virtual double GetMetal() const override
Get the metalness value.
Definition: DatasmithSceneElementsImpl.h:997
FDatasmithCameraActorElementImpl::SetEnableDepthOfField
virtual void SetEnableDepthOfField(bool bInEnableDepthOfField) override
The focus method of the camera, either None (no DoF) or Manual.
Definition: DatasmithSceneElementsImpl.h:723
FDatasmithShaderElementImpl::GetEmitColor
virtual FLinearColor GetEmitColor() const override
Get the emmitance color in linear space.
Definition: DatasmithSceneElementsImpl.h:1016
FDatasmithCameraActorElementImpl::GetSensorAspectRatio
virtual float GetSensorAspectRatio() const override
Get framebuffer aspect ratio (width/height)
FDatasmithCompositeTextureImpl::GetUseColor
virtual bool GetUseColor(int32 InIndex) override
Gets color usage.
FDatasmithCompositeTextureImpl::AddSurface
virtual void AddSurface(const FLinearColor &InColor) override
Creates a new surface that will be used as layer inside this composite using a color in linear space.
Definition: DatasmithSceneElementsImpl.h:1277
FDatasmithShaderElementImpl::GetDisplace
virtual double GetDisplace() const override
Get the displacement value in centimeters.
Definition: DatasmithSceneElementsImpl.h:987
IDatasmithCompositeTexture
Definition: IDatasmithSceneElements.h:1243
FDatasmithPostProcessVolumeElementImpl
Definition: DatasmithSceneElementsImpl.h:690
FDatasmithShaderElementImpl::GetIORRefra
virtual double GetIORRefra() const override
Get the InIndex of Refraction value.
Definition: DatasmithSceneElementsImpl.h:890
FDatasmithShaderElementImpl::SetTransTextureSampler
virtual void SetTransTextureSampler(FDatasmithTextureSampler InValue) override
Set the transparency UV coordinates.
Definition: DatasmithSceneElementsImpl.h:965
FDatasmithCompositeTextureImpl::GetBaseCompName
virtual const TCHAR * GetBaseCompName() const override
Returns the string that identifies the composite element.
Definition: DatasmithSceneElementsImpl.h:1272
FDatasmithCompositeTextureImpl::IsValid
virtual bool IsValid() const override
Gets the validity of the composite texture.
FDatasmithShaderElementImpl::GetTransComp
virtual const TSharedPtr< IDatasmithCompositeTexture > & GetTransComp() const override
Get the transparency compound map.
Definition: DatasmithSceneElementsImpl.h:968
FDatasmithHierarchicalInstancedStaticMeshActorElementImpl::AddInstance
virtual int32 AddInstance(const FTransform &Transform) override
Add an instance.
FDatasmithMaterialElementImpl
Definition: DatasmithSceneElementsImpl.h:1146
FDatasmithTextureElementImpl::GetRGBCurve
virtual float GetRGBCurve() const override
Get texture gamma <= 0 for auto.
FDatasmithSceneImpl::EmptyTextures
virtual void EmptyTextures() override
Remove all textures from the scene.
Definition: DatasmithSceneElementsImpl.h:1390
FDatasmithPostProcessElementImpl::SetTemperature
virtual void SetTemperature(float InTemperature) override
Set color filter temperature in Kelvin.
Definition: DatasmithSceneElementsImpl.h:652
FDatasmithPostProcessVolumeElementImpl::GetEnabled
virtual bool GetEnabled() const
Whether this volume is enabled or not.
Definition: DatasmithSceneElementsImpl.h:698
FDatasmithSceneImpl::GetLevelSequencesCount
virtual int32 GetLevelSequencesCount() const override
Returns the number of level sequences in the scene.
Definition: DatasmithSceneElementsImpl.h:1412
FDatasmithShaderElementImpl::SetWeightTextureSampler
virtual void SetWeightTextureSampler(FDatasmithTextureSampler InValue) override
Set the weight UV coordinates Weight color, texture and value are only used for multilayered material...
Definition: DatasmithSceneElementsImpl.h:1039
FDatasmithMeshElementImpl::SetMaterial
virtual void SetMaterial(const TCHAR *MaterialPathName, int32 SlotId) override
Set the material slot Id to use the material MaterialPathName.
FDatasmithShaderElementImpl::SetBumpTexture
virtual void SetBumpTexture(const TCHAR *Value) override
Set the bumpmapping filename.
Definition: DatasmithSceneElementsImpl.h:949
FDatasmithShaderElementImpl::GetDiffuseTexture
virtual const TCHAR * GetDiffuseTexture() const override
Get the diffuse filename.
Definition: DatasmithSceneElementsImpl.h:902
FDatasmithPostProcessElementImpl::GetDepthOfFieldFstop
virtual float GetDepthOfFieldFstop() const override
Defines the opening of the camera lens, Aperture is 1/fstop, typical lens go down to f/1....
Definition: DatasmithSceneElementsImpl.h:675
FDatasmithShaderElementImpl::GetMetalComp
virtual TSharedPtr< IDatasmithCompositeTexture > & GetMetalComp() override
Get the diffuse compound map.
Definition: DatasmithSceneElementsImpl.h:1006
FDatasmithCustomActorElementImpl::GetClassOrPathName
virtual const TCHAR * GetClassOrPathName() const override
The class name or path to the blueprint to instantiate.
Definition: DatasmithSceneElementsImpl.h:766
FDatasmithActorElementImpl::ConvertChildsToWorld
void ConvertChildsToWorld()
Converts all childs transforms to world.
Definition: DatasmithSceneElementsImpl.h:223
FDatasmithEnvironmentElementImpl
Definition: DatasmithSceneElementsImpl.h:813
FDatasmithSceneImpl::AddActor
virtual void AddActor(const TSharedPtr< IDatasmithActorElement > &InActor) override
Adds an Actor to the scene.
Definition: DatasmithSceneElementsImpl.h:1372
FDatasmithMasterMaterialElementImpl::GetPropertiesCount
int32 GetPropertiesCount() const override
Get the total amount of properties in this material.
Definition: DatasmithSceneElementsImpl.h:1178
FDatasmithSceneImpl::SetUserOS
virtual void SetUserOS(const TCHAR *InUserOS) override
Sets the user's OS name.
Definition: DatasmithSceneElementsImpl.h:1360
FDatasmithShaderElementImpl::GetEmitComp
virtual TSharedPtr< IDatasmithCompositeTexture > & GetEmitComp() override
Get the emmitance compound map.
Definition: DatasmithSceneElementsImpl.h:1025
FDatasmithTextureElementImpl::GetData
virtual const uint8 * GetData(uint32 &OutDataSize, EDatasmithTextureFormat &OutFormat) const override
Retun the optional data, if loading from memory.
FDatasmithCompositeTextureImpl::GetParamMaskSubComposite
virtual TSharedPtr< IDatasmithCompositeTexture > & GetParamMaskSubComposite(int32 InIndex) override
Get the ith composite texture inside this composite used as layer mask.
FDatasmithCompositeTextureImpl::GetBaseColName
virtual const TCHAR * GetBaseColName() const override
Returns the string that identifies the color element.
Definition: DatasmithSceneElementsImpl.h:1270
FDatasmithSceneImpl
Definition: DatasmithSceneElementsImpl.h:1324
FDatasmithMeshElementImpl::GetMaterialSlotCount
virtual int32 GetMaterialSlotCount() const override
Get the number of material slot set on this mesh.
FDatasmithShaderElementImpl::SetBumpAmount
virtual void SetBumpAmount(double InValue) override
Set the bump/normal amount.
Definition: DatasmithSceneElementsImpl.h:894
FDatasmithCameraActorElementImpl::GetLookAtActor
virtual const TCHAR * GetLookAtActor() const override
Get camera look at actor name.
Definition: DatasmithSceneElementsImpl.h:738
FDatasmithMeshElementImpl::GetFile
virtual const TCHAR * GetFile() const override
Get the output filename, it can be absolute or relative to the scene file.
Definition: DatasmithSceneElementsImpl.h:254
FDatasmithShaderElementImpl::SetIORk
virtual void SetIORk(double InValue) override
Set the Ior K effect, this is used for more advanced representations of the reflection fresnel effect...
Definition: DatasmithSceneElementsImpl.h:888
FDatasmithShaderElementImpl::SetEmitPower
virtual void SetEmitPower(double InValue) override
Set the emmitance power in lumens.
Definition: DatasmithSceneElementsImpl.h:1023
FDatasmithShaderElementImpl::SetTransComp
virtual void SetTransComp(const TSharedPtr< IDatasmithCompositeTexture > &InValue) override
Set the transparency compound map.
Definition: DatasmithSceneElementsImpl.h:969
FDatasmithShaderElementImpl::GetRoughnessComp
virtual TSharedPtr< IDatasmithCompositeTexture > & GetRoughnessComp() override
Get the roughness compound map.
Definition: DatasmithSceneElementsImpl.h:931
FDatasmithTextureElementImpl::SetTextureFilter
virtual void SetTextureFilter(EDatasmithTextureFilter InFilter) override
Set texture filter.
FDatasmithMeshElementImpl::SetLODCount
virtual void SetLODCount(int32 Count) override
Set number of LODs.
Definition: DatasmithSceneElementsImpl.h:283
FDatasmithCompositeTextureImpl::GetParamMask
virtual const TCHAR * GetParamMask(int32 InIndex) override
Get the i-th layer mask's filename.
FDatasmithPostProcessElementImpl::SetSaturation
virtual void SetSaturation(float InSaturation) override
Set color saturation.
Definition: DatasmithSceneElementsImpl.h:667
FDatasmithCompositeTextureImpl::AddSurface
virtual void AddSurface(const TCHAR *InTexture, FDatasmithTextureSampler InTexUV) override
Creates a new surface that will be used as layer inside this composite using the texture filename and...
Definition: DatasmithSceneElementsImpl.h:1276
FDatasmithElementImpl
Definition: DatasmithSceneElementsImpl.h:15
FDatasmithShaderElementImpl::GetLightOnly
virtual bool GetLightOnly() const override
Gets material is used as lighting only.
Definition: DatasmithSceneElementsImpl.h:1029
FDatasmithSceneImpl::SetVendor
virtual void SetVendor(const TCHAR *InVendor) override
Sets the vendor name of the application used to export the scene.
Definition: DatasmithSceneElementsImpl.h:1348
FDatasmithShaderElementImpl::SetDisplaceTextureSampler
virtual void SetDisplaceTextureSampler(FDatasmithTextureSampler InValue) override
Set the displacement UV coordinates.
Definition: DatasmithSceneElementsImpl.h:985
FDatasmithShaderElementImpl::SetNormalTexture
virtual void SetNormalTexture(const TCHAR *InValue) override
Set the normalmapping filename.
Definition: DatasmithSceneElementsImpl.h:939
FDatasmithShaderElementImpl::GetBumpTexture
virtual const TCHAR * GetBumpTexture() const override
Get the bumpmapping filename.
Definition: DatasmithSceneElementsImpl.h:948
FDatasmithShaderElementImpl::GetEmitTemperature
virtual double GetEmitTemperature() const override
Get the emmitance temperature color.
Definition: DatasmithSceneElementsImpl.h:1019
FDatasmithTextureElementImpl::SetData
virtual void SetData(const uint8 *InData, uint32 InDataSize, EDatasmithTextureFormat InFormat) override
Set the output data buffer, used only when no output filename is set.
FDatasmithShaderElementImpl::SetTransparencyColor
virtual void SetTransparencyColor(FLinearColor InValue) override
Set the transparency color in linear space.
Definition: DatasmithSceneElementsImpl.h:959
FDatasmithShaderElementImpl::SetRoughnessTexture
virtual void SetRoughnessTexture(const TCHAR *InValue) override
Set the roughness filename.
Definition: DatasmithSceneElementsImpl.h:929
FDatasmithCompositeTextureImpl::GetParamColor
virtual const FLinearColor & GetParamColor(int32 InIndex) override
Get the i-th color in linear space.
FDatasmithCompositeTextureImpl::AddMaskSurface
virtual void AddMaskSurface(const TSharedPtr< IDatasmithCompositeTexture > &InMaskSubComp) override
Adds a new composite texture inside this composite used as layer mask.
Definition: DatasmithSceneElementsImpl.h:1267
FDatasmithShaderElementImpl::GetDisplaceTextureSampler
virtual FDatasmithTextureSampler GetDisplaceTextureSampler() const override
Get the displacement UV coordinates.
Definition: DatasmithSceneElementsImpl.h:984
FDatasmithTextureElementImpl::GetTextureAddressX
virtual EDatasmithTextureAddress GetTextureAddressX() const override
Get texture X axis address mode.
FDatasmithSceneImpl::GetExporterVersion
virtual const TCHAR * GetExporterVersion() const override
Returns the Datasmith format version used to export the scene.
Definition: DatasmithSceneElementsImpl.h:1341
FDatasmithHierarchicalInstancedStaticMeshActorElementImpl::ReserveSpaceForInstances
virtual void ReserveSpaceForInstances(int32 NumIntances) override
Reserve memory for a number of instance.
FDatasmithSceneImpl::GetTexturesCount
virtual int32 GetTexturesCount() const override
Returns the amount of textures added to the scene.
Definition: DatasmithSceneElementsImpl.h:1386
FDatasmithShaderElementImpl::GetBumpAmount
virtual double GetBumpAmount() const override
Get the bump/normal amount.
Definition: DatasmithSceneElementsImpl.h:893
FDatasmithTextureElementImpl::GetTextureAddressY
virtual EDatasmithTextureAddress GetTextureAddressY() const override
Get texture Y axis address mode.
FDatasmithTextureElementImpl::GetTextureMode
virtual EDatasmithTextureMode GetTextureMode() const override
Get texture usage.
FDatasmithCompositeTextureImpl::GetParamMaskSurfacesCount
virtual int32 GetParamMaskSurfacesCount() const override
Get the amount of layer masks.
Definition: DatasmithSceneElementsImpl.h:1254
FDatasmithActorElementImpl::SetSelectionIndex
virtual void SetSelectionIndex(int32 InSelectionIdx) override
Set the index of the child which is active in a selector
Definition: DatasmithSceneElementsImpl.h:111
FDatasmithShaderElementImpl::SetEmitColor
virtual void SetEmitColor(FLinearColor InValue) override
Set the emmitance color in linear space.
Definition: DatasmithSceneElementsImpl.h:1017
FDatasmithMasterMaterialElementImpl::AddProperty
void AddProperty(const TSharedPtr< IDatasmithKeyValueProperty > &InProperty) override
Add a property to this material.
FDatasmithShaderElementImpl::SetEmitTemperature
virtual void SetEmitTemperature(double InValue) override
Set the emmitance temperature color.
Definition: DatasmithSceneElementsImpl.h:1020
FDatasmithPostProcessElementImpl::GetColorFilter
virtual FLinearColor GetColorFilter() const override
Set color filter in linear color scale.
Definition: DatasmithSceneElementsImpl.h:654
FDatasmithMetaDataElementImpl::SetAssociatedElement
virtual void SetAssociatedElement(const TSharedPtr< IDatasmithElement > &Element)
Sets the Datasmith element that is associated with this meta data, if any.
Definition: DatasmithSceneElementsImpl.h:1306
FDatasmithLandscapeElementImpl
Definition: DatasmithSceneElementsImpl.h:793
FDatasmithAreaLightElementImpl::SetWidth
virtual void SetWidth(float InWidth) override
Set the area light shape size on the Y axis.
Definition: DatasmithSceneElementsImpl.h:624
FDatasmithShaderElementImpl::SetMetalTextureSampler
virtual void SetMetalTextureSampler(FDatasmithTextureSampler InValue) override
Set the diffuse UV coordinates.
Definition: DatasmithSceneElementsImpl.h:1004
FDatasmithSceneImpl::AddMaterial
virtual void AddMaterial(const TSharedPtr< IDatasmithBaseMaterialElement > &InMaterial) override
Adds a new Material to the scene (it won't be applied to any mesh).
Definition: DatasmithSceneElementsImpl.h:1378
FDatasmithShaderElementImpl::GetRoughness
virtual double GetRoughness() const override
Get the roughness color in linear space.
Definition: DatasmithSceneElementsImpl.h:925
FDatasmithShaderElementImpl::GetDiffuseComp
virtual const TSharedPtr< IDatasmithCompositeTexture > & GetDiffuseComp() const override
Get the diffuse compound map.
Definition: DatasmithSceneElementsImpl.h:909
FDatasmithAreaLightElementImpl::SetLightType
virtual void SetLightType(EDatasmithAreaLightType InLightType) override
Set the type of light for an area light: Point/Spot/Rect.
Definition: DatasmithSceneElementsImpl.h:622
FDatasmithSceneImpl::GetExporterSDKVersion
virtual const TCHAR * GetExporterSDKVersion() const override
Return the enterprise version of the SDK used by the exporter.
Definition: DatasmithSceneElementsImpl.h:1344
FDatasmithShaderElementImpl::GetDisplaceSubDivision
virtual double GetDisplaceSubDivision() const override
Get the displacement subdivision multiplier.
Definition: DatasmithSceneElementsImpl.h:990
FDatasmithSceneImpl::EmptyMaterials
virtual void EmptyMaterials() override
Remove all materials from the scene.
Definition: DatasmithSceneElementsImpl.h:1383
FDatasmithPostProcessElementImpl::SetDof
virtual void SetDof(float InDof) override
Set depth of field multiplier.
Definition: DatasmithSceneElementsImpl.h:661
FDatasmithSceneImpl::AddMesh
virtual void AddMesh(const TSharedPtr< IDatasmithMeshElement > &InMesh) override
Adds a new Mesh to the scene.
Definition: DatasmithSceneElementsImpl.h:1365
FDatasmithShaderElementImpl::SetBumpTextureSampler
virtual void SetBumpTextureSampler(FDatasmithTextureSampler InValue) override
Set the bumpmapping UV coordinates.
Definition: DatasmithSceneElementsImpl.h:952
FDatasmithCompositeTextureImpl::GetParamVal1Count
virtual int32 GetParamVal1Count() const override
Get the number of value1 parameters.
Definition: DatasmithSceneElementsImpl.h:1246
FDatasmithShaderElementImpl::GetShaderUsage
virtual const EDatasmithShaderUsage GetShaderUsage() const override
Get the domain of this shader.
Definition: DatasmithSceneElementsImpl.h:1054
FDatasmithMaterialIDElementImpl
Definition: DatasmithSceneElementsImpl.h:298
FDatasmithShaderElementImpl::SetIORRefra
virtual void SetIORRefra(double Value) override
Set the InIndex of Refraction value.
Definition: DatasmithSceneElementsImpl.h:891
FDatasmithTextureElementImpl::GetFile
virtual const TCHAR * GetFile() const override
Get texture filename.
FDatasmithShaderElementImpl::SetNormalTextureSampler
virtual void SetNormalTextureSampler(FDatasmithTextureSampler InValue) override
Set the normalmapping UV coordinates.
Definition: DatasmithSceneElementsImpl.h:942
FDatasmithSceneImpl::SetExportDuration
virtual void SetExportDuration(int32 InExportDuration) override
Sets the time taken to export the scene.
Definition: DatasmithSceneElementsImpl.h:1363
FDatasmithShaderElementImpl::GetIsStackedLayer
virtual bool GetIsStackedLayer() const override
Get the if this layer is weighted as a stack.
Definition: DatasmithSceneElementsImpl.h:1051
FDatasmithSceneImpl::GetProductName
virtual const TCHAR * GetProductName() const override
Returns the product name of the application used to export the scene.
Definition: DatasmithSceneElementsImpl.h:1350
FDatasmithShaderElementImpl::GetWeightTextureSampler
virtual FDatasmithTextureSampler GetWeightTextureSampler() const override
Get the weight UV coordinates Weight color, texture and value are only used for multilayered material...
Definition: DatasmithSceneElementsImpl.h:1038
FDatasmithCameraActorElementImpl::GetFocalLength
virtual float GetFocalLength() const override
Get camera focal length in millimeters.
FDatasmithShaderElementImpl::GetDisplaceTexture
virtual const TCHAR * GetDisplaceTexture() const override
Get the displacement filename.
Definition: DatasmithSceneElementsImpl.h:981
FDatasmithSceneImpl::SetUserID
virtual void SetUserID(const TCHAR *InUserID) override
Sets the user identifier who exported the scene.
Definition: DatasmithSceneElementsImpl.h:1357
FDatasmithShaderElementImpl::SetIsStackedLayer
virtual void SetIsStackedLayer(bool InValue) override
Set the if this layer is weighted as a stack.
Definition: DatasmithSceneElementsImpl.h:1052
FDatasmithTextureElementImpl::SetRGBCurve
virtual void SetRGBCurve(float InRGBCurve) override
Set texture gamma <= 0 for auto.
FDatasmithLandscapeElementImpl::SetMaterial
virtual void SetMaterial(const TCHAR *InMaterialPathName) override
The name or path to the material to assign to this landscape layer.
Definition: DatasmithSceneElementsImpl.h:805
FDatasmithShaderElementImpl::GetReflectanceColor
virtual FLinearColor GetReflectanceColor() const override
Get the reflectance color in linear space.
Definition: DatasmithSceneElementsImpl.h:912
FDatasmithCompositeTextureImpl::AddMaskSurface
virtual void AddMaskSurface(const TCHAR *InMask, const FDatasmithTextureSampler InMaskSampler) override
Adds a new layer mask from its filename.
Definition: DatasmithSceneElementsImpl.h:1258
FDatasmithShaderElementImpl::GetRefleComp
virtual const TSharedPtr< IDatasmithCompositeTexture > & GetRefleComp() const override
Get the reflectance compound map.
Definition: DatasmithSceneElementsImpl.h:922
FDatasmithMeshElementImpl::GetLightmapSourceUV
virtual int32 GetLightmapSourceUV() const override
Get the source UV channel that will be used at import to generate the lightmap UVs.
Definition: DatasmithSceneElementsImpl.h:271
FDatasmithCompositeTextureImpl::GetParamMaskTextureSampler
virtual FDatasmithTextureSampler GetParamMaskTextureSampler(int32 InIndex) override
Get the ith layer mask's uv element.
FDatasmithSpotLightElementImpl
Definition: DatasmithSceneElementsImpl.h:556
FDatasmithCompositeTextureImpl::GetParamTexture
virtual const TCHAR * GetParamTexture(int32 InIndex) override
Get the filename of the i-th texture.
FDatasmithShaderElementImpl
Definition: DatasmithSceneElementsImpl.h:879
FDatasmithSceneImpl::RemoveTexture
virtual void RemoveTexture(const TSharedPtr< IDatasmithTextureElement > &InTexture) override
Removes a Texture Element from the scene.
Definition: DatasmithSceneElementsImpl.h:1389
FDatasmithSceneImpl::GetVendor
virtual const TCHAR * GetVendor() const override
Returns the vendor name of the application used to export the scene.
Definition: DatasmithSceneElementsImpl.h:1347
FDatasmithMeshElementImpl::SetFile
virtual void SetFile(const TCHAR *InFile) override
Set the output filename, it can be absolute or relative to the scene file.
Definition: DatasmithSceneElementsImpl.h:255
FDatasmithPostProcessElementImpl
Definition: DatasmithSceneElementsImpl.h:646
FDatasmithShaderElementImpl::SetMaskTexture
virtual void SetMaskTexture(const TCHAR *InValue) override
Set the opacity mask filename.
Definition: DatasmithSceneElementsImpl.h:972
FDatasmithShaderElementImpl::SetEmitTextureSampler
virtual void SetEmitTextureSampler(FDatasmithTextureSampler InValue) override
Set the emmitance UV coordinates.
Definition: DatasmithSceneElementsImpl.h:1014
FDatasmithCameraActorElementImpl::GetSensorWidth
virtual float GetSensorWidth() const override
Get camera sensor width in millimeters.
FDatasmithShaderElementImpl::GetWeightColor
virtual FLinearColor GetWeightColor() const override
Get the weight color in linear space.
Definition: DatasmithSceneElementsImpl.h:1032
FDatasmithShaderElementImpl::GetDiffuseColor
virtual FLinearColor GetDiffuseColor() const override
Get the diffuse color in linear space.
Definition: DatasmithSceneElementsImpl.h:899
FDatasmithCompositeTextureImpl::AddSurface
virtual void AddSurface(const TSharedPtr< IDatasmithCompositeTexture > &SubComp) override
Adds a new nested composite texture.
Definition: DatasmithSceneElementsImpl.h:1264
FDatasmithCompositeTextureImpl::GetParamVal2
virtual ParamVal GetParamVal2(int32 InIndex) const override
Get the Value2 parameter.
FDatasmithShaderElementImpl::SetReflectanceTexture
virtual void SetReflectanceTexture(const TCHAR *InValue) override
Set the reflectance filename.
Definition: DatasmithSceneElementsImpl.h:916
FDatasmithPostProcessElementImpl::GetCameraShutterSpeed
virtual float GetCameraShutterSpeed() const override
The camera shutter speed in 1/seconds (ie: 60 = 1/60s)
Definition: DatasmithSceneElementsImpl.h:672
FDatasmithCompositeTextureImpl::GetMaskUseComposite
virtual bool GetMaskUseComposite(int32 InIndex) const override
Returns true if composite texture mask should be used.
FDatasmithShaderElementImpl::GetEmitComp
virtual const TSharedPtr< IDatasmithCompositeTexture > & GetEmitComp() const override
Get the emmitance compound map.
Definition: DatasmithSceneElementsImpl.h:1026
FDatasmithTextureElementImpl::GetFileHash
virtual FMD5Hash GetFileHash() const override
Return a MD5 hash of the content of the Texture Element.
Definition: DatasmithSceneElementsImpl.h:843
FDatasmithCameraActorElementImpl
Definition: DatasmithSceneElementsImpl.h:711
FDatasmithShaderElementImpl::GetWeightValue
virtual double GetWeightValue() const override
Get the weight power value Weight color, texture and value are only used for multilayered materials.
Definition: DatasmithSceneElementsImpl.h:1045
FDatasmithMeshElementImpl::SetDimensions
virtual void SetDimensions(const float InArea, const float InWidth, const float InHeight, const float InDepth) override
Set surface area and bounding box dimensions to be used on lightmap size calculation.
Definition: DatasmithSceneElementsImpl.h:260
FDatasmithAreaLightElementImpl::GetLightShape
virtual EDatasmithLightShape GetLightShape() const override
Get the light shape Rectangle/Sphere/Disc/Cylinder.
Definition: DatasmithSceneElementsImpl.h:618
FDatasmithCameraActorElementImpl::GetEnableDepthOfField
virtual bool GetEnableDepthOfField() const override
The focus method of the camera, either None (no DoF) or Manual.
Definition: DatasmithSceneElementsImpl.h:722
FDatasmithSceneImpl::GetActorsCount
virtual int32 GetActorsCount() const override
Returns the amount of actors added to the scene.
Definition: DatasmithSceneElementsImpl.h:1373
FDatasmithShaderElementImpl::SetMaskComp
virtual void SetMaskComp(const TSharedPtr< IDatasmithCompositeTexture > &InValue) override
Set the opacity mask compound map.
Definition: DatasmithSceneElementsImpl.h:979
FDatasmithMetaDataElementImpl
Definition: DatasmithSceneElementsImpl.h:1300
FDatasmithCustomActorElementImpl
Definition: DatasmithSceneElementsImpl.h:757
FDatasmithSceneImpl::GetMeshesCount
virtual int32 GetMeshesCount() const override
Returns the amount of meshes added to the scene.
Definition: DatasmithSceneElementsImpl.h:1366
FDatasmithShaderElementImpl::GetMaskTextureSampler
virtual FDatasmithTextureSampler GetMaskTextureSampler() const override
Get the opacity mask UV coordinates.
Definition: DatasmithSceneElementsImpl.h:974
FDatasmithShaderElementImpl::GetWeightComp
virtual TSharedPtr< IDatasmithCompositeTexture > & GetWeightComp() override
Get the weight compound map Weight color, texture and value are only used for multilayered materials.
Definition: DatasmithSceneElementsImpl.h:1041
FDatasmithShaderElementImpl::SetWeightColor
virtual void SetWeightColor(FLinearColor InValue) override
Set the weight color in linear space.
Definition: DatasmithSceneElementsImpl.h:1033
FDatasmithTextureElementImpl
Definition: DatasmithSceneElementsImpl.h:830
FDatasmithHierarchicalInstancedStaticMeshActorElementImpl::GetInstance
virtual FTransform GetInstance(int32 InstanceIndex) const override
Get the transform of a specified instance.
FDatasmithCameraActorElementImpl::GetLookAtAllowRoll
virtual bool GetLookAtAllowRoll() const override
Get camera look at allow roll state.
Definition: DatasmithSceneElementsImpl.h:741
FDatasmithMeshElementImpl::GetLODCount
virtual int32 GetLODCount() const override
Get number of LODs.
Definition: DatasmithSceneElementsImpl.h:282
FDatasmithEnvironmentElementImpl::GetIsIlluminationMap
virtual bool GetIsIlluminationMap() const override
Returns true if it is used for illumination, false if it is used as background.
FDatasmithPostProcessElementImpl::GetTemperature
virtual float GetTemperature() const override
Get color filter temperature in Kelvin.
Definition: DatasmithSceneElementsImpl.h:651
FDatasmithMaterialElementImpl::GetShader
virtual TSharedPtr< IDatasmithShaderElement > & GetShader(int32 InIndex) override
Get the shader i-th of this material.
FDatasmithSceneImpl::GetActor
virtual TSharedPtr< IDatasmithActorElement > GetActor(int32 InIndex) override
Returns the actor using this index.
Definition: DatasmithSceneElementsImpl.h:1374
FDatasmithActorElementImpl::GetChild
virtual TSharedPtr< IDatasmithActorElement > GetChild(int32 InIndex) override
Get the 'InIndex'th child of the actor
Definition: DatasmithSceneElementsImpl.h:100
FDatasmithShaderElementImpl::SetTwoSided
virtual void SetTwoSided(bool InValue) override
Set the two sided material attribute.
Definition: DatasmithSceneElementsImpl.h:897
FDatasmithMasterMaterialElementImpl
Definition: DatasmithSceneElementsImpl.h:1164
FDatasmithShaderElementImpl::SetDiffuseComp
virtual void SetDiffuseComp(const TSharedPtr< IDatasmithCompositeTexture > &InValue) override
Set the diffuse compound map.
Definition: DatasmithSceneElementsImpl.h:910
FDatasmithShaderElementImpl::GetMetalTexture
virtual const TCHAR * GetMetalTexture() const override
Get the diffuse filename.
Definition: DatasmithSceneElementsImpl.h:1000
FDatasmithShaderElementImpl::GetDisplaceComp
virtual TSharedPtr< IDatasmithCompositeTexture > & GetDisplaceComp() override
Get the displacement compound map.
Definition: DatasmithSceneElementsImpl.h:993
FDatasmithSceneImpl::GetActor
virtual const TSharedPtr< IDatasmithActorElement > & GetActor(int32 InIndex) const override
Returns the actor using this index.
Definition: DatasmithSceneElementsImpl.h:1375
FDatasmithMeshElementImpl::GetMaterialSlotAt
virtual TSharedPtr< const IDatasmithMaterialIDElement > GetMaterialSlotAt(int32 Index) const override
Get the material mapping for slot Index.
FDatasmithShaderElementImpl::GetTransTextureSampler
virtual FDatasmithTextureSampler GetTransTextureSampler() const override
Get the transparency UV coordinates.
Definition: DatasmithSceneElementsImpl.h:964
FDatasmithShaderElementImpl::SetWeightComp
virtual void SetWeightComp(const TSharedPtr< IDatasmithCompositeTexture > &InValue) override
Set the weight compound map Weight color, texture and value are only used for multilayered materials.
Definition: DatasmithSceneElementsImpl.h:1043
FDatasmithShaderElementImpl::GetRefleTextureSampler
virtual FDatasmithTextureSampler GetRefleTextureSampler() const override
Get the reflectance UV coordinates.
Definition: DatasmithSceneElementsImpl.h:918
FDatasmithShaderElementImpl::GetTransparencyTexture
virtual const TCHAR * GetTransparencyTexture() const override
Get the transparency filename.
Definition: DatasmithSceneElementsImpl.h:961
FDatasmithCompositeTextureImpl::GetUseComposite
virtual bool GetUseComposite(int32 InIndex) override
Returns true if composite texture should be used.
FDatasmithShaderElementImpl::GetNormalTexture
virtual const TCHAR * GetNormalTexture() const override
Get the normalmapping filename.
Definition: DatasmithSceneElementsImpl.h:938
FDatasmithCompositeTextureImpl::AddMaskSurface
virtual void AddMaskSurface(const FLinearColor &InColor) override
Creates a new surface to be used as mask that will be used as layer inside this composite using a col...
Definition: DatasmithSceneElementsImpl.h:1259
FDatasmithSceneImpl::GetUserID
virtual const TCHAR * GetUserID() const override
Returns the user identifier who exported the scene.
Definition: DatasmithSceneElementsImpl.h:1356
FDatasmithShaderElementImpl::GetMetalTextureSampler
virtual FDatasmithTextureSampler GetMetalTextureSampler() const override
Get the diffuse UV coordinates.
Definition: DatasmithSceneElementsImpl.h:1003
FDatasmithShaderElementImpl::SetMetal
virtual void SetMetal(double InValue) override
Set the metalness value.
Definition: DatasmithSceneElementsImpl.h:998
FDatasmithPostProcessElementImpl::SetMotionBlur
virtual void SetMotionBlur(float InMotionBlur) override
Set motion blur multiplier.
Definition: DatasmithSceneElementsImpl.h:664
FDatasmithMeshElementImpl::GetHeight
virtual float GetHeight() const override
Get the bounding box height.
Definition: DatasmithSceneElementsImpl.h:265
FDatasmithMeshElementImpl::GetArea
virtual float GetArea() const override
Get the total surface area.
Definition: DatasmithSceneElementsImpl.h:263
FDatasmithShaderElementImpl::SetBlendMode
virtual void SetBlendMode(EDatasmithBlendMode InValue) override
Set the blending mode.
Definition: DatasmithSceneElementsImpl.h:1049
FDatasmithShaderElementImpl::SetEmitTexture
virtual void SetEmitTexture(const TCHAR *InValue) override
Set the emmitance filename.
Definition: DatasmithSceneElementsImpl.h:1011
FDatasmithMeshElementImpl::SetLightmapSourceUV
virtual void SetLightmapSourceUV(int32 UVChannel) override
Set the source UV channel that will be used at import to generate the lightmap UVs.
Definition: DatasmithSceneElementsImpl.h:272
FDatasmithShaderElementImpl::GetBumpTextureSampler
virtual FDatasmithTextureSampler GetBumpTextureSampler() const override
Get the bumpmapping UV coordinates.
Definition: DatasmithSceneElementsImpl.h:951
FDatasmithShaderElementImpl::GetIOR
virtual double GetIOR() const override
Get the Ior N value, usually Ior K is set to 0 so this will control the entire reflection fresnel eff...
Definition: DatasmithSceneElementsImpl.h:884
FDatasmithCompositeTextureImpl::AddParamVal1
virtual void AddParamVal1(ParamVal InParamVal) override
Add a new Value1 parameter.
Definition: DatasmithSceneElementsImpl.h:1248
FDatasmithShaderElementImpl::SetDiffuseColor
virtual void SetDiffuseColor(FLinearColor InValue) override
Set the diffuse color in linear space.
Definition: DatasmithSceneElementsImpl.h:900
FDatasmithSceneImpl::SetProductName
virtual void SetProductName(const TCHAR *InProductName) override
Sets the product name of the application used to export the scene.
Definition: DatasmithSceneElementsImpl.h:1351
FDatasmithShaderElementImpl::SetIOR
virtual void SetIOR(double InValue) override
Set the Ior N value, usually Ior K is set to 0 so this will control the entire reflection fresnel eff...
Definition: DatasmithSceneElementsImpl.h:885
FDatasmithMasterMaterialElementImpl::GetProperty
const TSharedPtr< IDatasmithKeyValueProperty > & GetProperty(int32 InIndex) const override
Get the property i-th of this material.
FDatasmithShaderElementImpl::GetDiffTextureSampler
virtual FDatasmithTextureSampler GetDiffTextureSampler() const override
Get the diffuse UV coordinates.
Definition: DatasmithSceneElementsImpl.h:905
FDatasmithCompositeTextureImpl::GetParamMaskColor
virtual const FLinearColor & GetParamMaskColor(int32 i) const override
Get the i-th color in linear space.
FDatasmithTextureElementImpl::SetAllowResize
virtual void SetAllowResize(bool bInAllowResize) override
Set allow texture resizing.
FDatasmithShaderElementImpl::SetBumpComp
virtual void SetBumpComp(const TSharedPtr< IDatasmithCompositeTexture > &InValue) override
Set the bumpmapping compound map.
Definition: DatasmithSceneElementsImpl.h:956
FDatasmithDirectionalLightElementImpl
Definition: DatasmithSceneElementsImpl.h:597
FDatasmithMeshActorElementImpl
Definition: DatasmithSceneElementsImpl.h:311
FDatasmithSceneImpl::RemoveMesh
virtual void RemoveMesh(const TSharedPtr< IDatasmithMeshElement > &InMesh) override
Remove a Mesh to the scene.
Definition: DatasmithSceneElementsImpl.h:1369
FDatasmithSceneImpl::SetHost
virtual void SetHost(const TCHAR *InHostname)
Sets the name of the host application from which we're exporting from.
Definition: DatasmithSceneElementsImpl.h:1336
FDatasmithMasterMaterialElementImpl::GetPropertyByName
const TSharedPtr< IDatasmithKeyValueProperty > & GetPropertyByName(const TCHAR *InName) const override
Get a property by its name if it exists.
FDatasmithShaderElementImpl::GetBumpComp
virtual TSharedPtr< IDatasmithCompositeTexture > & GetBumpComp() override
Get the bumpmapping compound map.
Definition: DatasmithSceneElementsImpl.h:954
FDatasmithShaderElementImpl::SetUseEmissiveForDynamicAreaLighting
virtual void SetUseEmissiveForDynamicAreaLighting(bool InUseEmissiveForDynamicAreaLighting) override
Get use Emissive for dynamic area lighting.
Definition: DatasmithSceneElementsImpl.h:1058
FDatasmithSceneImpl::GetLevelSequence
virtual TSharedPtr< IDatasmithLevelSequenceElement > GetLevelSequence(int32 InIndex) override
Returns the level sequence using this index.
Definition: DatasmithSceneElementsImpl.h:1414
FDatasmithCompositeTextureImpl::SetParamTexture
virtual void SetParamTexture(int32 InIndex, const TCHAR *InTexture) override
Sets the new texture for the index-th item.
FDatasmithBaseMaterialElementImpl
Definition: DatasmithSceneElementsImpl.h:1134
FDatasmithShaderElementImpl::SetReflectanceColor
virtual void SetReflectanceColor(FLinearColor InValue) override
Set the reflectance color in linear space.
Definition: DatasmithSceneElementsImpl.h:913
FDatasmithMaterialElementImpl::IsSingleShaderMaterial
virtual bool IsSingleShaderMaterial() const override
Returns true if the material has only one shader, false otherwise.
FDatasmithShaderElementImpl::GetTransparencyColor
virtual FLinearColor GetTransparencyColor() const override
Get the transparency color in linear space.
Definition: DatasmithSceneElementsImpl.h:958
FDatasmithCameraActorElementImpl::SetPostProcess
virtual void SetPostProcess(const TSharedPtr< IDatasmithPostProcessElement > &InPostProcess) override
Set camera's postprocess.
FDatasmithPointLightElementImpl
Definition: DatasmithSceneElementsImpl.h:518
FDatasmithSceneImpl::GetMaterialsCount
virtual int32 GetMaterialsCount() const override
Returns the amount of materials added to the scene.
Definition: DatasmithSceneElementsImpl.h:1379
FDatasmithActorElementImpl
Definition: DatasmithSceneElementsImpl.h:69
FDatasmithPostProcessElementImpl::GetVignette
virtual float GetVignette() const override
Get vignette amount.
Definition: DatasmithSceneElementsImpl.h:657
FDatasmithLightmassPortalElementImpl
Definition: DatasmithSceneElementsImpl.h:637
FDatasmithCameraActorElementImpl::SetFocalLength
virtual void SetFocalLength(float InFocalLength) override
Set camera focal length in millimeters.
FDatasmithEnvironmentElementImpl::SetEnvironmentComp
virtual void SetEnvironmentComp(const TSharedPtr< IDatasmithCompositeTexture > &InEnvironmentComp) override
Set the environment map.
FDatasmithSceneImpl::GetExportDuration
virtual int32 GetExportDuration() const override
Returns the time taken to export the scene.
Definition: DatasmithSceneElementsImpl.h:1362
FDatasmithMetaDataElementImpl::GetProperty
virtual const TSharedPtr< IDatasmithKeyValueProperty > & GetProperty(int32 i) const override
Get the property i-th of this meta data.
Definition: DatasmithSceneElementsImpl.h:1310
FDatasmithMeshElementImpl::GetDepth
virtual float GetDepth() const override
Get the bounding box depth.
Definition: DatasmithSceneElementsImpl.h:266
FDatasmithShaderElementImpl::SetRefleComp
virtual void SetRefleComp(const TSharedPtr< IDatasmithCompositeTexture > &InValue) override
Set the reflectance compound map.
Definition: DatasmithSceneElementsImpl.h:923
FDatasmithTextureElementImpl::GetAllowResize
virtual bool GetAllowResize() const override
Get allow texture resizing.
FDatasmithTextureElementImpl::SetTextureAddressX
virtual void SetTextureAddressX(EDatasmithTextureAddress InMode) override
Set texture X axis address mode.
FDatasmithCompositeTextureImpl::AddParamVal2
virtual void AddParamVal2(ParamVal InParamVal) override
Add a new Value2 parameter.
Definition: DatasmithSceneElementsImpl.h:1252
FDatasmithShaderElementImpl::GetEmitTextureSampler
virtual FDatasmithTextureSampler GetEmitTextureSampler() const override
Get the emmitance UV coordinates.
Definition: DatasmithSceneElementsImpl.h:1013
FDatasmithShaderElementImpl::SetDisplaceTexture
virtual void SetDisplaceTexture(const TCHAR *InValue) override
Set the displacement filename.
Definition: DatasmithSceneElementsImpl.h:982
FDatasmithSceneImpl::GetUsePhysicalSky
virtual bool GetUsePhysicalSky() const override
Physical Sky could be generated in a large amount of modes, like material, lights etc that's why it h...
Definition: DatasmithSceneElementsImpl.h:1397
FDatasmithShaderElementImpl::GetNormalComp
virtual TSharedPtr< IDatasmithCompositeTexture > & GetNormalComp() override
Get the normalmapping compound map.
Definition: DatasmithSceneElementsImpl.h:944
FDatasmithShaderElementImpl::GetBlendMode
virtual EDatasmithBlendMode GetBlendMode() const override
Get the blending mode.
Definition: DatasmithSceneElementsImpl.h:1048
FDatasmithSceneImpl::GetUserOS
virtual const TCHAR * GetUserOS() const override
Returns the OS name used by user who exported the scene.
Definition: DatasmithSceneElementsImpl.h:1359
FDatasmithCompositeTextureImpl::GetParamVal1
virtual ParamVal GetParamVal1(int32 InIndex) const override
Get the i-th Value1 parameter.
FDatasmithActorElementImpl::ConvertChildsToRelative
void ConvertChildsToRelative()
Converts all childs transforms to relative.
Definition: DatasmithSceneElementsImpl.h:199
FDatasmithLandscapeElementImpl::SetHeightmap
virtual void SetHeightmap(const TCHAR *InFilePath) override
The path to the heightmap file.
Definition: DatasmithSceneElementsImpl.h:802
FDatasmithCustomActorElementImpl::GetPropertiesCount
virtual int32 GetPropertiesCount() const override
Get the total amount of properties in this actor.
Definition: DatasmithSceneElementsImpl.h:770
FDatasmithShaderElementImpl::GetIORk
virtual double GetIORk() const override
Get the Ior K effect, this is used for more advanced representations of the reflection fresnel effect...
Definition: DatasmithSceneElementsImpl.h:887
FDatasmithShaderElementImpl::SetRoughnessComp
virtual void SetRoughnessComp(const TSharedPtr< IDatasmithCompositeTexture > &InValue) override
Set the roughness compound map.
Definition: DatasmithSceneElementsImpl.h:933
FDatasmithShaderElementImpl::SetDiffTextureSampler
virtual void SetDiffTextureSampler(FDatasmithTextureSampler InValue) override
Set the diffuse UV coordinates.
Definition: DatasmithSceneElementsImpl.h:906
FDatasmithPostProcessElementImpl::SetVignette
virtual void SetVignette(float InVignette) override
Set vignette amount.
Definition: DatasmithSceneElementsImpl.h:658
FDatasmithHierarchicalInstancedStaticMeshActorElementImpl::GetInstancesCount
virtual int32 GetInstancesCount() const override
Get the number of instances.
FDatasmithCompositeTextureImpl::SetBaseNames
virtual void SetBaseNames(const TCHAR *InTextureName, const TCHAR *InColorName, const TCHAR *InValueName, const TCHAR *InCompName) override
Sets the strings that identifies the different elements on this composite.
FDatasmithShaderElementImpl::SetDisplaceSubDivision
virtual void SetDisplaceSubDivision(double InValue) override
Set the displacement subdivision multiplier.
Definition: DatasmithSceneElementsImpl.h:991
FDatasmithShaderElementImpl::SetDiffuseTexture
virtual void SetDiffuseTexture(const TCHAR *InValue) override
Set the diffuse filename.
Definition: DatasmithSceneElementsImpl.h:903
FDatasmithCustomActorElementImpl::RemoveProperty
virtual void RemoveProperty(const TSharedPtr< IDatasmithKeyValueProperty > &Property) override
Removes a property from this actor, doesn't preserve ordering.
Definition: DatasmithSceneElementsImpl.h:784
FDatasmithSceneImpl::SetExporterVersion
virtual void SetExporterVersion(const TCHAR *InVersion) override
Sets the Datasmith version used to export the scene.
Definition: DatasmithSceneElementsImpl.h:1342
FDatasmithShaderElementImpl::GetTransComp
virtual TSharedPtr< IDatasmithCompositeTexture > & GetTransComp() override
Get the transparency compound map.
Definition: DatasmithSceneElementsImpl.h:967
FDatasmithShaderElementImpl::SetShaderUsage
virtual void SetShaderUsage(EDatasmithShaderUsage InShaderUsage) override
Set the domain of this shader.
Definition: DatasmithSceneElementsImpl.h:1055
FDatasmithPostProcessElementImpl::GetSaturation
virtual float GetSaturation() const override
Get color saturation.
Definition: DatasmithSceneElementsImpl.h:666
FDatasmithShaderElementImpl::GetMaskTexture
virtual const TCHAR * GetMaskTexture() const override
Get the opacity mask filename.
Definition: DatasmithSceneElementsImpl.h:971
FDatasmithCameraActorElementImpl::SetLookAtAllowRoll
virtual void SetLookAtAllowRoll(bool bAllow) override
Set camera look at allow roll state.
Definition: DatasmithSceneElementsImpl.h:742
FDatasmithMeshElementImpl::SetLightmapCoordinateIndex
virtual void SetLightmapCoordinateIndex(int32 UVChannel)
Set the UV channel that will be used for the lightmap Note: If the lightmap coordinate index is somet...
Definition: DatasmithSceneElementsImpl.h:269
FDatasmithShaderElementImpl::GetRefleComp
virtual TSharedPtr< IDatasmithCompositeTexture > & GetRefleComp() override
Get the reflectance compound map.
Definition: DatasmithSceneElementsImpl.h:921
FDatasmithKeyValuePropertyImpl::GetValue
const TCHAR * GetValue() const override
Get the value of this property.
Definition: DatasmithSceneElementsImpl.h:57
FDatasmithCameraActorElementImpl::SetSensorAspectRatio
virtual void SetSensorAspectRatio(float InSensorAspectRatio) override
Set framebuffer aspect ratio (width/height)
FDatasmithKeyValuePropertyImpl
Definition: DatasmithSceneElementsImpl.h:49
FDatasmithCameraActorElementImpl::GetFocusDistance
virtual float GetFocusDistance() const override
Get camera focus distance in centimeters.
FDatasmithShaderElementImpl::GetWeightComp
virtual const TSharedPtr< IDatasmithCompositeTexture > & GetWeightComp() const override
Get the weight compound map Weight color, texture and value are only used for multilayered materials.
Definition: DatasmithSceneElementsImpl.h:1042
FDatasmithKeyValuePropertyImpl::GetPropertyType
EDatasmithKeyValuePropertyType GetPropertyType() const override
Get the type of this property.
Definition: DatasmithSceneElementsImpl.h:54
FDatasmithCompositeTextureImpl::GetParamTextureSampler
virtual FDatasmithTextureSampler & GetParamTextureSampler(int32 InIndex) override
Get the i-th uv element.
FDatasmithTextureSampler
Definition: DatasmithTypes.h:16
FDatasmithPostProcessElementImpl::GetMotionBlur
virtual float GetMotionBlur() const override
Get motion blur multiplier.
Definition: DatasmithSceneElementsImpl.h:663
FDatasmithEnvironmentElementImpl::GetEnvironmentComp
virtual TSharedPtr< IDatasmithCompositeTexture > & GetEnvironmentComp() override
Get the environment map.
FDatasmithMaterialElementImpl::GetShadersCount
virtual int32 GetShadersCount() const override
Get the total amount of shaders in this material.
FDatasmithMetaDataElementImpl::GetAssociatedElement
virtual const TSharedPtr< IDatasmithElement > & GetAssociatedElement() const override
Gets the Datasmith element that is associated with this meta data, if any.
Definition: DatasmithSceneElementsImpl.h:1305
FDatasmithCameraActorElementImpl::SetSensorWidth
virtual void SetSensorWidth(float InSensorWidth) override
Set camera sensor width in millimeters.
FDatasmithMasterMaterialElementImpl::GetCustomMaterialPathName
virtual const TCHAR * GetCustomMaterialPathName() const
Only used when the material type is set to Custom.
Definition: DatasmithSceneElementsImpl.h:1175
FDatasmithTextureElementImpl::SetTextureMode
virtual void SetTextureMode(EDatasmithTextureMode InMode) override
Set texture usage.
FDatasmithCompositeTextureImpl::SetMode
virtual void SetMode(EDatasmithCompMode InMode) override
Sets the composition mode like color correction etc.
Definition: DatasmithSceneElementsImpl.h:1231
FDatasmithSceneImpl::GetHost
virtual const TCHAR * GetHost() const
Sets the name of the host application which created the scene.
Definition: DatasmithSceneElementsImpl.h:1331
FDatasmithShaderElementImpl::SetNormalComp
virtual void SetNormalComp(const TSharedPtr< IDatasmithCompositeTexture > &InValue) override
Set the normalmapping compound map.
Definition: DatasmithSceneElementsImpl.h:946
FDatasmithTextureElementImpl::GetTextureFilter
virtual EDatasmithTextureFilter GetTextureFilter() const override
Get texture filter.
FDatasmithCameraActorElementImpl::GetFStop
virtual float GetFStop() const override
Get camera FStop also known as FNumber.
FDatasmithShaderElementImpl::GetDisplaceComp
virtual const TSharedPtr< IDatasmithCompositeTexture > & GetDisplaceComp() const override
Get the displacement compound map.
Definition: DatasmithSceneElementsImpl.h:994
FDatasmithSceneImpl::RemoveLevelSequence
virtual void RemoveLevelSequence(const TSharedRef< IDatasmithLevelSequenceElement > &InSequence) override
Removes a level sequence from the scene.
Definition: DatasmithSceneElementsImpl.h:1419
FDatasmithShaderElementImpl::SetRoughness
virtual void SetRoughness(double InValue) override
Set the roughness color in linear space.
Definition: DatasmithSceneElementsImpl.h:926
FDatasmithShaderElementImpl::SetRoughTextureSampler
virtual void SetRoughTextureSampler(FDatasmithTextureSampler InValue) override
Set the roughness UV coordinates.
Definition: DatasmithSceneElementsImpl.h:936
FDatasmithHierarchicalInstancedStaticMeshActorElementImpl::RemoveInstance
virtual void RemoveInstance(int32 InstanceIndex) override
Remove an instance.
FDatasmithCameraActorElementImpl::GetPostProcess
virtual TSharedPtr< IDatasmithPostProcessElement > & GetPostProcess() override
Get camera's postprocess.
FDatasmithMeshElementImpl::GetWidth
virtual float GetWidth() const override
Get the bounding box width.
Definition: DatasmithSceneElementsImpl.h:264
FDatasmithShaderElementImpl::GetNormalTextureSampler
virtual FDatasmithTextureSampler GetNormalTextureSampler() const override
Get the normalmapping UV coordinates.
Definition: DatasmithSceneElementsImpl.h:941
FDatasmithShaderElementImpl::SetEmitComp
virtual void SetEmitComp(const TSharedPtr< IDatasmithCompositeTexture > &InValue) override
Set the emmitance compound map.
Definition: DatasmithSceneElementsImpl.h:1027
FDatasmithShaderElementImpl::GetMaskComp
virtual const TSharedPtr< IDatasmithCompositeTexture > & GetMaskComp() const override
Get the opacity mask compound map.
Definition: DatasmithSceneElementsImpl.h:978
FDatasmithShaderElementImpl::GetEmitPower
virtual double GetEmitPower() const override
Get the emmitance power in lumens.
Definition: DatasmithSceneElementsImpl.h:1022
FDatasmithUtils
Definition: DatasmithUtils.h:14
FDatasmithSceneImpl::AddMetaData
virtual void AddMetaData(const TSharedPtr< IDatasmithMetaDataElement > &InMetaData) override
Add a metadata to the scene There should be only one metadata per Datasmith element (the element asso...
Definition: DatasmithSceneElementsImpl.h:1403
FDatasmithShaderElementImpl::SetMetalComp
virtual void SetMetalComp(const TSharedPtr< IDatasmithCompositeTexture > &Value) override
Set the diffuse compound map.
Definition: DatasmithSceneElementsImpl.h:1008
FDatasmithSceneImpl::SetUsePhysicalSky
virtual void SetUsePhysicalSky(bool bInUsePhysicalSky) override
Enable or disable the usage of Physical Sky Notice that if a HDRI environment is used this gets disab...
Definition: DatasmithSceneElementsImpl.h:1396
FDatasmithShaderElementImpl::SetWeightValue
virtual void SetWeightValue(double InValue) override
Set the weight power value Weight color, texture and value are only used for multilayered materials.
Definition: DatasmithSceneElementsImpl.h:1046
FDatasmithAreaLightElementImpl
Definition: DatasmithSceneElementsImpl.h:606
FDatasmithHierarchicalInstancedStaticMeshActorElementImpl
Definition: DatasmithSceneElementsImpl.h:417
FDatasmithCompositeTextureImpl::GetParamSubComposite
virtual TSharedPtr< IDatasmithCompositeTexture > & GetParamSubComposite(int32 InIndex) override
Get the i-th nested composite texture.
FDatasmithPostProcessElementImpl::SetColorFilter
virtual void SetColorFilter(FLinearColor InColorFilter) override
Get color filter in linear color scale.
Definition: DatasmithSceneElementsImpl.h:655
FDatasmithCompositeTextureImpl::GetUseTexture
virtual bool GetUseTexture(int32 InIndex) override
Gets texture usage.
FDatasmithShaderElementImpl::GetMetalComp
virtual const TSharedPtr< IDatasmithCompositeTexture > & GetMetalComp() const override
Get the diffuse compound map.
Definition: DatasmithSceneElementsImpl.h:1007
FDatasmithShaderElementImpl::GetRoughnessComp
virtual const TSharedPtr< IDatasmithCompositeTexture > & GetRoughnessComp() const override
Get the roughness compound map.
Definition: DatasmithSceneElementsImpl.h:932
FDatasmithEnvironmentElementImpl::SetIsIlluminationMap
virtual void SetIsIlluminationMap(bool bInIsIlluminationMap) override
Set true for being used as illumination, false for being used as background.
FDatasmithSceneImpl::AddLevelSequence
virtual void AddLevelSequence(const TSharedRef< IDatasmithLevelSequenceElement > &InSequence) override
Adds a level sequence to the scene.
Definition: DatasmithSceneElementsImpl.h:1411
FDatasmithTextureElementImpl::CalculateElementHash
virtual FMD5Hash CalculateElementHash(bool bForce) override
Return a MD5 hash of the content of the Element.
FDatasmithShaderElementImpl::SetRefleTextureSampler
virtual void SetRefleTextureSampler(FDatasmithTextureSampler InValue) override
Set the reflectance UV coordinates.
Definition: DatasmithSceneElementsImpl.h:919
FDatasmithShaderElementImpl::GetMaskComp
virtual TSharedPtr< IDatasmithCompositeTexture > & GetMaskComp() override
Get the opacity mask compound map.
Definition: DatasmithSceneElementsImpl.h:977
FDatasmithSceneImpl::AddLODScreenSize
virtual void AddLODScreenSize(float ScreenSize) override
Adds a new LOD screen size setting.
Definition: DatasmithSceneElementsImpl.h:1399
FDatasmithTextureElementImpl::SetFile
virtual void SetFile(const TCHAR *InFile) override
Set texture filename.
FDatasmithSceneImpl::GetProductVersion
virtual const TCHAR * GetProductVersion() const override
Returns the product version of the application used to export the scene.
Definition: DatasmithSceneElementsImpl.h:1353
FDatasmithPostProcessVolumeElementImpl::GetUnbound
virtual bool GetUnbound() const override
Whether this volume covers the whole world, or just the area inside its bounds.
Definition: DatasmithSceneElementsImpl.h:701
FDatasmithShaderElementImpl::GetRoughnessTexture
virtual const TCHAR * GetRoughnessTexture() const override
Get the roughness filename.
Definition: DatasmithSceneElementsImpl.h:928
FDatasmithKeyValuePropertyImpl::SetValue
void SetValue(const TCHAR *InValue) override
Sets the value of this property.
FDatasmithCameraActorElementImpl::SetFStop
virtual void SetFStop(float InFStop) override
Set camera FStop also known as FNumber.
FDatasmithShaderElementImpl::GetEmitTexture
virtual const TCHAR * GetEmitTexture() const override
Get the emmitance filename.
Definition: DatasmithSceneElementsImpl.h:1010
FDatasmithPostProcessElementImpl::GetCameraISO
virtual float GetCameraISO() const override
Get camera ISO.
Definition: DatasmithSceneElementsImpl.h:669
FDatasmithMaterialElementImpl::AddShader
virtual void AddShader(const TSharedPtr< IDatasmithShaderElement > &InShader) override
Adds a new shader to the material stack.
FDatasmithAreaLightElementImpl::SetLightShape
virtual void SetLightShape(EDatasmithLightShape InShape) override
Set the light shape Rectangle/Sphere/Disc/Cylinder.
Definition: DatasmithSceneElementsImpl.h:619
FDatasmithLightActorElementImpl
Definition: DatasmithSceneElementsImpl.h:435
FDatasmithShaderElementImpl::GetRoughTextureSampler
virtual FDatasmithTextureSampler GetRoughTextureSampler() const override
Get the roughness UV coordinates.
Definition: DatasmithSceneElementsImpl.h:935
FDatasmithShaderElementImpl::SetWeightTexture
virtual void SetWeightTexture(const TCHAR *InValue) override
Set the weight filename Weight color, texture and value are only used for multilayered materials.
Definition: DatasmithSceneElementsImpl.h:1036
FDatasmithPostProcessVolumeElementImpl::GetSettings
virtual const TSharedRef< IDatasmithPostProcessElement > & GetSettings() const override
The post process settings to use for this volume.
Definition: DatasmithSceneElementsImpl.h:695
FDatasmithShaderElementImpl::GetUseEmissiveForDynamicAreaLighting
virtual const bool GetUseEmissiveForDynamicAreaLighting() const override
Set use Emissive for dynamic area lighting.
Definition: DatasmithSceneElementsImpl.h:1057
FDatasmithTextureElementImpl::SetFileHash
virtual void SetFileHash(FMD5Hash Hash) override
Set the MD5 hash of the current texture file.
Definition: DatasmithSceneElementsImpl.h:844
FDatasmithPostProcessElementImpl::GetDof
virtual float GetDof() const override
Get depth of field multiplier.
Definition: DatasmithSceneElementsImpl.h:660
FDatasmithAreaLightElementImpl::SetLength
virtual void SetLength(float InLength) override
Set the area light shape size on the X axis.
Definition: DatasmithSceneElementsImpl.h:627
FDatasmithActorElementImpl::GetSelectionIndex
virtual int32 GetSelectionIndex() const override
Get the index of the child which is active in a selector.
Definition: DatasmithSceneElementsImpl.h:114
FDatasmithCompositeTextureImpl::GetParamSurfacesCount
virtual int32 GetParamSurfacesCount() const override
Get the number of surfaces.
Definition: DatasmithSceneElementsImpl.h:1232
FDatasmithSceneImpl::EmptyMeshes
virtual void EmptyMeshes() override
Remove all meshes from the scene.
Definition: DatasmithSceneElementsImpl.h:1370
FDatasmithShaderElementImpl::GetWeightTexture
virtual const TCHAR * GetWeightTexture() const override
Get the weight filename Weight color, texture and value are only used for multilayered materials.
Definition: DatasmithSceneElementsImpl.h:1035
FDatasmithMeshElementImpl::SetFileHash
virtual void SetFileHash(FMD5Hash Hash) override
Set the MD5 hash of the current mesh file.
Definition: DatasmithSceneElementsImpl.h:258
FDatasmithCameraActorElementImpl::SetFocusDistance
virtual void SetFocusDistance(float InFocusDistance) override
Set camera focus distance in centimeters.
FDatasmithMeshElementImpl::GetMaterial
virtual const TCHAR * GetMaterial(int32 SlotId) const override
Get the name of the material mapped to slot Id, return nullptr if slot isn't mapped.
FDatasmithSceneImpl::SetExporterSDKVersion
virtual void SetExporterSDKVersion(const TCHAR *InVersion) override
Sets the enterprise SDK version used to export the scene.
Definition: DatasmithSceneElementsImpl.h:1345