Hide menu

Provides an interface to set of textures. More...

Inheritance diagram for cadex::ModelData_TextureSet:
cadex::ModelData_BaseObject

Classes

class  TextureIterator
 Iterator over layers this element belongs to. More...
 

Public Types

typedef cadex::internal::ModelData_TextureSetImpl ImplType
 
- Public Types inherited from cadex::ModelData_BaseObject
typedef int IdType
 Defines a type identifier.
 

Public Member Functions

 ModelData_TextureSet ()
 Constructor. More...
 
 ModelData_TextureSet (initialized)
 
 ModelData_TextureSet (ImplType *theImpl)
 
bool IsEmpty () const
 
size_t NumberOfTextures () const
 
bool Add (const ModelData_Texture &theTexture)
 
bool Remove (const ModelData_Texture &theTexture)
 
bool Contains (const ModelData_Texture &theTexture)
 
void Accept (ModelData_TextureVisitor &theVisitor) const
 
- Public Member Functions inherited from cadex::ModelData_BaseObject
 ModelData_BaseObject ()
 Constructor. More...
 
IdType TypeId () const
 Returns an object type id. More...
 
template<typename T >
bool IsOfType () const
 Returns true if the object has a type T. More...
 
void SetName (const Base_UTF16String &theName)
 Sets an object name. More...
 
Base_UTF16String Name () const
 
void SetUuid (const Base_Uuid &theUuid)
 
Base_Uuid Uuid () const
 
void Nullify ()
 Resets reference to implementation object. More...
 
bool IsNull () const
 Returns true if the object is nullified. More...
 
 operator bool () const
 Casts the object to the bool type. More...
 
internal::ModelData_BaseObjectImpl * Impl () const
 Return a handle to backend (reserved for internal use).
 
const internal::Base_Handle & HImpl () const
 
template<typename T >
T * Impl () const
 Reserved for internal use.
 

Static Public Member Functions

static IdType GetTypeId ()
 

Additional Inherited Members

- Protected Member Functions inherited from cadex::ModelData_BaseObject
 ModelData_BaseObject (const internal::ModelData_BaseObjectImpl *theImpl)
 Constructor (reserved for internal use).
 
 ModelData_BaseObject (const internal::ModelData_BaseObjectImpl *theImpl, const Base_UTF16String &theName)
 Constructor (reserved for internal use).
 
template<typename T >
T * GetOrCreateImpl ()
 Reserved for internal use.
 

Detailed Description

Provides an interface to set of textures.

Constructor & Destructor Documentation

◆ ModelData_TextureSet()

cadex::ModelData_TextureSet::ModelData_TextureSet ( )

Constructor.

Create empty object.

Member Function Documentation

◆ Add()

bool cadex::ModelData_TextureSet::Add ( const ModelData_Texture theTexture)

Adds texture to the texture set. Returns false if theTexture is already existed in the set. Otherwise returns true.

◆ Contains()

bool cadex::ModelData_TextureSet::Contains ( const ModelData_Texture theTexture)

Returns true if texture set contains theTexture. Otherwise returns false.

◆ GetTypeId()

ModelData_TextureSet::IdType cadex::ModelData_TextureSet::GetTypeId ( )
static

TODO: Add cube textures support when will be required. https://docs.unity3d.com/Manual/class-Cubemap.html https://en.wikipedia.org/wiki/Cube_mapping https://threejs.org/docs/#api/en/textures/CubeTexture Array order: +x, -x, +y, -y, +z, -z front, back, top, bottom, left, right

◆ IsEmpty()

bool cadex::ModelData_TextureSet::IsEmpty ( ) const

Returns true is no textures added into texture set

◆ NumberOfTextures()

size_t cadex::ModelData_TextureSet::NumberOfTextures ( ) const

Returns number of added textures. Returns 0 if IsNull()

◆ Remove()

bool cadex::ModelData_TextureSet::Remove ( const ModelData_Texture theTexture)

Removes texture from the texture set. Returns true on success. Otherwise returns false.