DATAKIT SDK  V2026.4
Dtk_TextureInfos Class Referenceabstract
+ Inheritance diagram for Dtk_TextureInfos:

Public Types

enum  TextureMappingTypeEnum {
  StoredUVMapping = 0, PlanarMapping = 1, CylinderMapping = 2, SphericalMapping = 3,
  CubicalMapping = 4, SkyPlanarMapping = 5, SkyCylinderMapping = 6, SkySphericalMapping = 7,
  SkyCubicalMapping = 8, UVBRepMapping = 9, BuildingMapping = 10
}
 

Public Member Functions

Dtk_Int32 DtkDynamicType (const Dtk_Int32 &inId)
 Retrieves the dynamic entity type. More...
 
virtual int DtkDynamicType (const int &inId)=0
 
virtual void dump (FILE *file=stdout)
 
Dtk_string GetImagePath () const
 Return image path. More...
 
Dtk_Double64 GetImageSize () const
 Returns image size. More...
 
TextureMappingTypeEnum GetMappingType () const
 Returns mapping type. More...
 
Dtk_Double64 GetRotateAngle () const
 Returns rotate angle. More...
 
virtual Dtk_Size_t GetSize () const
 
Dtk_picture * GetTextureImage () const
 Returns Dtk_picture. More...
 
Dtk_transfoPtr GetTransfo () const
 Returns texture transfo. More...
 
Dtk_Double64 GetUOffset () const
 Returns U offset. More...
 
Dtk_Double64 GetUScale () const
 Returns U scale factor. More...
 
Dtk_Double64 GetVOffset () const
 Returns V offset. More...
 
Dtk_Double64 GetVScale () const
 Returns V scale factor. More...
 
Dtk_bool IsUFlipped () const
 Returns if U flipped. More...
 
Dtk_bool IsURepeat () const
 Returns if texture is U repeat. More...
 
Dtk_bool IsVFlipped () const
 Returns if V flipped. More...
 
Dtk_bool IsVRepeat () const
 Returns if texture is V repeat. More...
 
void SetFlipFlag (Dtk_bool inUFlip, Dtk_bool inVFlip)
 Sets image U and V flip. More...
 
void SetImagePath (Dtk_string inImagePath)
 Sets image file path. More...
 
void SetImageSize (Dtk_Double64 inSize)
 Sets image size. More...
 
void SetOffset (Dtk_Double64 inUOffset, Dtk_Double64 inVOffset)
 Sets image U and V offset. More...
 
void SetRepeat (Dtk_bool inURepeat, Dtk_bool inVRepeat)
 Sets image U and V flip. More...
 
void SetRotateAngle (Dtk_Double64 inAlpha)
 Sets image rotate angle. More...
 
void SetScale (Dtk_Double64 inUScale, Dtk_Double64 inVScale)
 Sets image U and V scale. More...
 
void SetTextureImage (Dtk_picture *inImage)
 Sets Dtk_picture. More...
 
void SetTransfo (Dtk_transfoPtr inTransfo)
 Sets image transfo. More...
 

Static Public Member Functions

static Dtk_TextureInfosPtr Create (const Dtk_TextureInfos &in)
 Calls copy constructor to allocate a new object. More...
 
static Dtk_TextureInfosPtr Create (const TextureMappingTypeEnum &inType)
 Create a Dtk_TextureInfosPtr. More...
 
static Dtk_TextureInfos * DtkDynamicCast (Dtk_Object *s)
 Performs a dynamic cast - doesn't need RTTI -. More...
 

Protected Types

enum  { _typeID = DTK_TYPE_TEXTURE }
 

Protected Member Functions

virtual Dtk_Object * Clone ()
 
 Dtk_TextureInfos (const Dtk_TextureInfos &)
 
 Dtk_TextureInfos (const TextureMappingTypeEnum &inType)
 
 Dtk_TextureInfos (Dtk_TextureInfos &&) DTK_NOEXCEPT
 
virtual ~Dtk_TextureInfos ()
 Destructor. More...
 

Protected Attributes

std::unique_ptr< Dtk_Handle > _Private
 
unsigned long count_
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
_typeID 

◆ TextureMappingTypeEnum

Enumerator
StoredUVMapping 
PlanarMapping 
CylinderMapping 
SphericalMapping 
CubicalMapping 
SkyPlanarMapping 
SkyCylinderMapping 
SkySphericalMapping 
SkyCubicalMapping 
UVBRepMapping 
BuildingMapping 
34  {
35  StoredUVMapping = 0,
36  PlanarMapping = 1,
37  CylinderMapping = 2,
38  SphericalMapping = 3,
39  CubicalMapping = 4,
40  SkyPlanarMapping = 5,
44  UVBRepMapping = 9,
45  BuildingMapping = 10
46  };

Constructor & Destructor Documentation

◆ Dtk_TextureInfos() [1/3]

Dtk_TextureInfos::Dtk_TextureInfos ( const Dtk_TextureInfos &  )
protected

◆ Dtk_TextureInfos() [2/3]

Dtk_TextureInfos::Dtk_TextureInfos ( Dtk_TextureInfos &&  )
protected

◆ Dtk_TextureInfos() [3/3]

Dtk_TextureInfos::Dtk_TextureInfos ( const TextureMappingTypeEnum &  inType)
protected

◆ ~Dtk_TextureInfos()

virtual Dtk_TextureInfos::~Dtk_TextureInfos ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ Clone()

virtual Dtk_Object* Dtk_TextureInfos::Clone ( )
protectedvirtual
63 { return new Dtk_TextureInfos(*this); }

◆ Create() [1/2]

static Dtk_TextureInfosPtr Dtk_TextureInfos::Create ( const Dtk_TextureInfos &  in)
static

Calls copy constructor to allocate a new object.

Parameters
inObject to copy from.

◆ Create() [2/2]

static Dtk_TextureInfosPtr Dtk_TextureInfos::Create ( const TextureMappingTypeEnum &  inType)
static

Create a Dtk_TextureInfosPtr.

Parameters
inType: Mapping type: Mapping type can be :
  • StoredUVMapping : Using Dtk_Mesh UV texture coordinates,
  • PlanarMapping / CylinderMapping / SphericalMapping / CubicalMapping : Applying standard mapping Coordinate (0, 0) represents top left corner of image.
Returns
the constructed Dtk_TextureInfosPtr.

◆ DtkDynamicCast()

static Dtk_TextureInfos* Dtk_TextureInfos::DtkDynamicCast ( Dtk_Object *  s)
static

Performs a dynamic cast - doesn't need RTTI -.

87  {
88  if (s->DtkDynamicType(_typeID)) return static_cast<Dtk_TextureInfos*>(s);
89  return NULL;
90  }

◆ DtkDynamicType() [1/2]

Dtk_Int32 Dtk_TextureInfos::DtkDynamicType ( const Dtk_Int32 &  inId)

Retrieves the dynamic entity type.

80  {
81  if (inId == _typeID) return 1;
82  return Dtk_Object::DtkDynamicType(inId);
83  }

◆ DtkDynamicType() [2/2]

◆ dump()

virtual void Dtk_Object::dump ( FILE *  file = stdout)
virtualinherited

◆ GetImagePath()

Dtk_string Dtk_TextureInfos::GetImagePath ( ) const

Return image path.

◆ GetImageSize()

Dtk_Double64 Dtk_TextureInfos::GetImageSize ( ) const

Returns image size.

◆ GetMappingType()

TextureMappingTypeEnum Dtk_TextureInfos::GetMappingType ( ) const

Returns mapping type.

◆ GetRotateAngle()

Dtk_Double64 Dtk_TextureInfos::GetRotateAngle ( ) const

Returns rotate angle.

◆ GetSize()

◆ GetTextureImage()

Dtk_picture* Dtk_TextureInfos::GetTextureImage ( ) const

Returns Dtk_picture.

◆ GetTransfo()

Dtk_transfoPtr Dtk_TextureInfos::GetTransfo ( ) const

Returns texture transfo.

◆ GetUOffset()

Dtk_Double64 Dtk_TextureInfos::GetUOffset ( ) const

Returns U offset.

◆ GetUScale()

Dtk_Double64 Dtk_TextureInfos::GetUScale ( ) const

Returns U scale factor.

◆ GetVOffset()

Dtk_Double64 Dtk_TextureInfos::GetVOffset ( ) const

Returns V offset.

◆ GetVScale()

Dtk_Double64 Dtk_TextureInfos::GetVScale ( ) const

Returns V scale factor.

◆ IsUFlipped()

Dtk_bool Dtk_TextureInfos::IsUFlipped ( ) const

Returns if U flipped.

◆ IsURepeat()

Dtk_bool Dtk_TextureInfos::IsURepeat ( ) const

Returns if texture is U repeat.

◆ IsVFlipped()

Dtk_bool Dtk_TextureInfos::IsVFlipped ( ) const

Returns if V flipped.

◆ IsVRepeat()

Dtk_bool Dtk_TextureInfos::IsVRepeat ( ) const

Returns if texture is V repeat.

◆ SetFlipFlag()

void Dtk_TextureInfos::SetFlipFlag ( Dtk_bool  inUFlip,
Dtk_bool  inVFlip 
)

Sets image U and V flip.

◆ SetImagePath()

void Dtk_TextureInfos::SetImagePath ( Dtk_string  inImagePath)

Sets image file path.

◆ SetImageSize()

void Dtk_TextureInfos::SetImageSize ( Dtk_Double64  inSize)

Sets image size.

◆ SetOffset()

void Dtk_TextureInfos::SetOffset ( Dtk_Double64  inUOffset,
Dtk_Double64  inVOffset 
)

Sets image U and V offset.

◆ SetRepeat()

void Dtk_TextureInfos::SetRepeat ( Dtk_bool  inURepeat,
Dtk_bool  inVRepeat 
)

Sets image U and V flip.

◆ SetRotateAngle()

void Dtk_TextureInfos::SetRotateAngle ( Dtk_Double64  inAlpha)

Sets image rotate angle.

◆ SetScale()

void Dtk_TextureInfos::SetScale ( Dtk_Double64  inUScale,
Dtk_Double64  inVScale 
)

Sets image U and V scale.

◆ SetTextureImage()

void Dtk_TextureInfos::SetTextureImage ( Dtk_picture *  inImage)

Sets Dtk_picture.

◆ SetTransfo()

void Dtk_TextureInfos::SetTransfo ( Dtk_transfoPtr  inTransfo)

Sets image transfo.

Field Documentation

◆ _Private

std::unique_ptr<Dtk_Handle> Dtk_TextureInfos::_Private
protected

◆ count_

unsigned long Dtk_Object::count_
protectedinherited
Dtk_TextureInfos::SkyCylinderMapping
@ SkyCylinderMapping
Definition: dtk_render.hpp:41
Dtk_TextureInfos::CylinderMapping
@ CylinderMapping
Definition: dtk_render.hpp:37
Dtk_TextureInfos::UVBRepMapping
@ UVBRepMapping
Definition: dtk_render.hpp:44
Dtk_TextureInfos
Definition: dtk_render.hpp:31
Dtk_TextureInfos::SkyPlanarMapping
@ SkyPlanarMapping
Definition: dtk_render.hpp:40
DTK_TYPE_TEXTURE
@ DTK_TYPE_TEXTURE
Definition: define.h:559
Dtk_TextureInfos::_typeID
@ _typeID
Definition: dtk_render.hpp:49
Dtk_TextureInfos::SphericalMapping
@ SphericalMapping
Definition: dtk_render.hpp:38
Dtk_TextureInfos::PlanarMapping
@ PlanarMapping
Definition: dtk_render.hpp:36
Dtk_TextureInfos::StoredUVMapping
@ StoredUVMapping
Definition: dtk_render.hpp:35
Dtk_TextureInfos::SkyCubicalMapping
@ SkyCubicalMapping
Definition: dtk_render.hpp:43
Dtk_TextureInfos::BuildingMapping
@ BuildingMapping
Definition: dtk_render.hpp:45
Dtk_TextureInfos::SkySphericalMapping
@ SkySphericalMapping
Definition: dtk_render.hpp:42
Dtk_Object::DtkDynamicType
virtual int DtkDynamicType(const int &inId)=0
Dtk_TextureInfos::Dtk_TextureInfos
Dtk_TextureInfos(const Dtk_TextureInfos &)
Dtk_TextureInfos::CubicalMapping
@ CubicalMapping
Definition: dtk_render.hpp:39