DATAKIT API  V2025.1
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 ()
 Return image path. More...
 
Dtk_Double64 GetImageSize ()
 Returns image size. More...
 
TextureMappingTypeEnum GetMappingType ()
 Returns mapping type. More...
 
Dtk_Double64 GetRotateAngle ()
 Returns rotate angle. More...
 
virtual Dtk_Size_t GetSize () const
 
Dtk_pictureGetTextureImage ()
 Returns Dtk_picture. More...
 
Dtk_transfoPtr GetTransfo ()
 Returns texture transfo. More...
 
Dtk_Double64 GetUOffset ()
 Returns U offset. More...
 
Dtk_Double64 GetUScale ()
 Returns U scale factor. More...
 
Dtk_Double64 GetVOffset ()
 Returns V offset. More...
 
Dtk_Double64 GetVScale ()
 Returns V scale factor. More...
 
Dtk_bool IsUFlipped ()
 Returns if U flipped. More...
 
Dtk_bool IsURepeat ()
 Returns if texture is U repeat. More...
 
Dtk_bool IsVFlipped ()
 Returns if V flipped. More...
 
Dtk_bool IsVRepeat ()
 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 TextureMappingTypeEnum &inType)
 Create a Dtk_TextureInfosPtr. More...
 
static Dtk_TextureInfosDtkDynamicCast (Dtk_Object *s)
 Performs a dynamic cast - doesn't need RTTI -. More...
 

Protected Types

enum  { _typeID = DTK_TYPE_TEXTURE }
 

Protected Member Functions

void _copy (const Dtk_Object &s)
 
void _Copy (const Dtk_TextureInfos &inToBeCopied)
 
void _init ()
 
void _Init ()
 
void _reset ()
 
void _Reset ()
 
virtual Dtk_ObjectClone ()
 
 Dtk_TextureInfos (const Dtk_TextureInfos &inToBeCopied)
 Copy constructor. More...
 
 Dtk_TextureInfos (const TextureMappingTypeEnum &inType)
 
virtual ~Dtk_TextureInfos ()
 Destructor. More...
 

Protected Attributes

Dtk_Handle * _Private
 
unsigned long count_
 

Friends

class Dtk_SmartPtr< Dtk_TextureInfos >
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
_typeID 

◆ TextureMappingTypeEnum

Enumerator
StoredUVMapping 
PlanarMapping 
CylinderMapping 
SphericalMapping 
CubicalMapping 
SkyPlanarMapping 
SkyCylinderMapping 
SkySphericalMapping 
SkyCubicalMapping 
UVBRepMapping 
BuildingMapping 
28  {
29  StoredUVMapping = 0,
30  PlanarMapping = 1,
31  CylinderMapping = 2,
32  SphericalMapping = 3,
33  CubicalMapping = 4,
34  SkyPlanarMapping = 5,
38  UVBRepMapping = 9,
39  BuildingMapping = 10
40  };

Constructor & Destructor Documentation

◆ Dtk_TextureInfos() [1/2]

Dtk_TextureInfos::Dtk_TextureInfos ( const Dtk_TextureInfos inToBeCopied)
protected

Copy constructor.

Parameters
inToBeCopiedObject to copy.

◆ Dtk_TextureInfos() [2/2]

Dtk_TextureInfos::Dtk_TextureInfos ( const TextureMappingTypeEnum inType)
protected
See also
CreateMetaData
CreateParameterMetaData

◆ ~Dtk_TextureInfos()

virtual Dtk_TextureInfos::~Dtk_TextureInfos ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ _copy()

void Dtk_Object::_copy ( const Dtk_Object s)
protectedinherited

◆ _Copy()

void Dtk_TextureInfos::_Copy ( const Dtk_TextureInfos inToBeCopied)
protected

◆ _init()

void Dtk_Object::_init ( )
protectedinherited

◆ _Init()

void Dtk_TextureInfos::_Init ( )
protected

◆ _reset()

void Dtk_Object::_reset ( )
protectedinherited

◆ _Reset()

void Dtk_TextureInfos::_Reset ( )
protected

◆ Clone()

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

◆ Create()

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 -.

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

◆ DtkDynamicType() [1/2]

Dtk_Int32 Dtk_TextureInfos::DtkDynamicType ( const Dtk_Int32 inId)

Retrieves the dynamic entity type.

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

◆ DtkDynamicType() [2/2]

◆ dump()

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

◆ GetImagePath()

Dtk_string Dtk_TextureInfos::GetImagePath ( )

Return image path.

◆ GetImageSize()

Dtk_Double64 Dtk_TextureInfos::GetImageSize ( )

Returns image size.

◆ GetMappingType()

TextureMappingTypeEnum Dtk_TextureInfos::GetMappingType ( )

Returns mapping type.

◆ GetRotateAngle()

Dtk_Double64 Dtk_TextureInfos::GetRotateAngle ( )

Returns rotate angle.

◆ GetSize()

◆ GetTextureImage()

Dtk_picture* Dtk_TextureInfos::GetTextureImage ( )

Returns Dtk_picture.

◆ GetTransfo()

Dtk_transfoPtr Dtk_TextureInfos::GetTransfo ( )

Returns texture transfo.

◆ GetUOffset()

Dtk_Double64 Dtk_TextureInfos::GetUOffset ( )

Returns U offset.

◆ GetUScale()

Dtk_Double64 Dtk_TextureInfos::GetUScale ( )

Returns U scale factor.

◆ GetVOffset()

Dtk_Double64 Dtk_TextureInfos::GetVOffset ( )

Returns V offset.

◆ GetVScale()

Dtk_Double64 Dtk_TextureInfos::GetVScale ( )

Returns V scale factor.

◆ IsUFlipped()

Dtk_bool Dtk_TextureInfos::IsUFlipped ( )

Returns if U flipped.

◆ IsURepeat()

Dtk_bool Dtk_TextureInfos::IsURepeat ( )

Returns if texture is U repeat.

◆ IsVFlipped()

Dtk_bool Dtk_TextureInfos::IsVFlipped ( )

Returns if V flipped.

◆ IsVRepeat()

Dtk_bool Dtk_TextureInfos::IsVRepeat ( )

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.

Friends And Related Function Documentation

◆ Dtk_SmartPtr< Dtk_TextureInfos >

friend class Dtk_SmartPtr< Dtk_TextureInfos >
friend

Field Documentation

◆ _Private

Dtk_Handle* Dtk_TextureInfos::_Private
protected

◆ count_

unsigned long Dtk_Object::count_
protectedinherited
Dtk_TextureInfos::SkyCylinderMapping
@ SkyCylinderMapping
Definition: dtk_render.hpp:35
Dtk_TextureInfos::CylinderMapping
@ CylinderMapping
Definition: dtk_render.hpp:31
Dtk_TextureInfos::UVBRepMapping
@ UVBRepMapping
Definition: dtk_render.hpp:38
Dtk_TextureInfos::Dtk_TextureInfos
Dtk_TextureInfos(const Dtk_TextureInfos &inToBeCopied)
Copy constructor.
Dtk_TextureInfos
Definition: dtk_render.hpp:25
Dtk_TextureInfos::SkyPlanarMapping
@ SkyPlanarMapping
Definition: dtk_render.hpp:34
DTK_TYPE_TEXTURE
@ DTK_TYPE_TEXTURE
Definition: define.h:568
Dtk_TextureInfos::_typeID
@ _typeID
Definition: dtk_render.hpp:43
Dtk_TextureInfos::SphericalMapping
@ SphericalMapping
Definition: dtk_render.hpp:32
Dtk_TextureInfos::PlanarMapping
@ PlanarMapping
Definition: dtk_render.hpp:30
Dtk_TextureInfos::StoredUVMapping
@ StoredUVMapping
Definition: dtk_render.hpp:29
Dtk_TextureInfos::SkyCubicalMapping
@ SkyCubicalMapping
Definition: dtk_render.hpp:37
Dtk_TextureInfos::BuildingMapping
@ BuildingMapping
Definition: dtk_render.hpp:39
Dtk_TextureInfos::SkySphericalMapping
@ SkySphericalMapping
Definition: dtk_render.hpp:36
Dtk_Object::DtkDynamicType
virtual int DtkDynamicType(const int &inId)=0
Dtk_TextureInfos::CubicalMapping
@ CubicalMapping
Definition: dtk_render.hpp:33