Hide menu
Loading...
Searching...
No Matches
cadex::ModelData_TextureParameters Class Reference

Provides an interface to texture parameters. More...

#include <cadex/ModelData_TextureParameters.hxx>

Inheritance diagram for cadex::ModelData_TextureParameters:
cadex::ModelData_BaseObject

Public Types

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

Public Member Functions

 ModelData_TextureParameters ()
 
 ModelData_TextureParameters (initialized)
 
 ModelData_TextureParameters (ImplType *theImpl)
 
void SetGenerateMipmaps (bool theEnabled)
 
bool GenerateMipmaps () const
 Indicates to generate mipmaps (if possible) for a texture or not. True by default.
 
void SetMagnificationFilter (ModelData_TextureMagnificationFilter theFilter)
 Sets magnification filter.
 
ModelData_TextureMagnificationFilter MagnificationFilter () const
 
void SetMinificationFilter (ModelData_TextureMinificationFilter theFilter)
 Sets minification filter.
 
ModelData_TextureMinificationFilter MinificationFilter () const
 
void SetWrapMode (ModelData_TextureWrapMode theModeU, ModelData_TextureWrapMode theModeV)
 
ModelData_TextureWrapMode WrapModeU () const
 
ModelData_TextureWrapMode WrapModeV () const
 
void SetBlendMode (ModelData_TextureBlendMode theMode)
 
ModelData_TextureBlendMode BlendMode () const
 
void SetMappingMode (ModelData_TextureMappingMode theMode)
 
ModelData_TextureMappingMode MappingMode () const
 
void SetRotation (float theAngle)
 Sets rotation (in radians).
 
float Rotation () const
 
void SetScale (double theScaleU, double theScaleV)
 
double ScaleU () const
 
double ScaleV () const
 
void SetTranslation (double theTranslationU, double theTranslationV)
 
double TranslationU () const
 
double TranslationV () const
 
- Public Member Functions inherited from cadex::ModelData_BaseObject
 ModelData_BaseObject ()
 Constructor.
 
IdType TypeId () const
 Returns an object type id.
 
template<typename T >
bool IsOfType () const
 Returns true if the object has a type T.
 
void SetName (const Base_UTF16String &theName)
 Sets an object name.
 
Base_UTF16String Name () const
 
void SetUuid (const Base_Uuid &theUuid)
 
Base_Uuid Uuid () const
 
void Nullify ()
 Resets reference to implementation object.
 
bool IsNull () const
 Returns true if the object is nullified.
 
 operator bool () const
 Casts the object to the bool type.
 
internal::ModelData_BaseObjectImpl * Impl () const
 Return a handle to backend (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 texture parameters.

Constructor & Destructor Documentation

◆ ModelData_TextureParameters()

cadex::ModelData_TextureParameters::ModelData_TextureParameters ( )

Constructor. Creates default initialized parameters.

Member Function Documentation

◆ BlendMode()

ModelData_TextureBlendMode cadex::ModelData_TextureParameters::BlendMode ( ) const

Returns the blend mode. Default is ModelData_TextureBlendMode::ModelData_TBM_Modulate

See also
SetBlendMode

◆ MagnificationFilter()

ModelData_TextureMagnificationFilter cadex::ModelData_TextureParameters::MagnificationFilter ( ) const

Returns the magnification filter which indicates how the texture is sampled when a texel covers more than one pixel. The default is ModelData_TextureMagnificationFilter::ModelData_TMagF_Linear, which takes the four closest texels and bilinearly interpolates among them. The other option is ModelData_TextureMagnificationFilter::ModelData_TMagF_Nearest, which uses the value of the closest texel.

See also
ModelData_TextureMagnificationFilter

◆ MappingMode()

ModelData_TextureMappingMode cadex::ModelData_TextureParameters::MappingMode ( ) const

Returns the mapping type which indicates how the texture is applied to the object. Default is ModelData_TMM_UVMapping, where the U,V coordinates are used to apply the map.

See also
SetMappingMode()

◆ MinificationFilter()

ModelData_TextureMinificationFilter cadex::ModelData_TextureParameters::MinificationFilter ( ) const

Returns the minification filter which indicates how the texture is sampled when a texel covers less than one pixel. The default is ModelData_TextureMinificationFilter::ModelData_TMinF_LinearMipMapLinear, which uses mipmapping and a trilinear filter.

See also
ModelData_TextureMinificationFilter

◆ Rotation()

float cadex::ModelData_TextureParameters::Rotation ( ) const

Returns how much the texture is rotated around the origin ({0, 0} point), in radians. Positive values are counter-clockwise. Default is 0.

◆ ScaleU()

double cadex::ModelData_TextureParameters::ScaleU ( ) const

Returns scale applied to the texture width.

See also
ScaleV(), SetScale()

◆ ScaleV()

double cadex::ModelData_TextureParameters::ScaleV ( ) const

Returns scale applied to the texture height.

See also
ScaleU(), SetScale()

◆ SetBlendMode()

void cadex::ModelData_TextureParameters::SetBlendMode ( ModelData_TextureBlendMode  theMode)

Sets the blend mode.

See also
BlendMode()

◆ SetMappingMode()

void cadex::ModelData_TextureParameters::SetMappingMode ( ModelData_TextureMappingMode  theMode)

Sets the mapping type.

See also
MappingMode()

◆ SetScale()

void cadex::ModelData_TextureParameters::SetScale ( double  theScaleU,
double  theScaleV 
)

Sets scale applied to the texture width and height.

See also
ScaleU(), ScaleV()

◆ SetTranslation()

void cadex::ModelData_TextureParameters::SetTranslation ( double  theTranslationU,
double  theTranslationV 
)

Sets translation applied to the texture.

See also
TranslationU(), TranslationV()

◆ SetWrapMode()

void cadex::ModelData_TextureParameters::SetWrapMode ( ModelData_TextureWrapMode  theModeU,
ModelData_TextureWrapMode  theModeV 
)

Sets the wrap modes.

See also
WrapModeU(), WrapModeV()

◆ TranslationU()

double cadex::ModelData_TextureParameters::TranslationU ( ) const

Returns translation which indicates how much a single repetition of the texture is offset from the beginning in U direction.

See also
TranslationV(), SetTranslation()

◆ TranslationV()

double cadex::ModelData_TextureParameters::TranslationV ( ) const

Returns translation which indicates how much a single repetition of the texture is offset from the beginning in V direction.

See also
TranslationU(), SetTranslation()

◆ WrapModeU()

ModelData_TextureWrapMode cadex::ModelData_TextureParameters::WrapModeU ( ) const

Returns the wrap mode which defines how the texture is wrapped horizontally and corresponds to U in UV mapping. Default is ModelData_TextureMappingMode::ModelData_TMM_UVMapping //!

See also
SetWrapMode()

◆ WrapModeV()

ModelData_TextureWrapMode cadex::ModelData_TextureParameters::WrapModeV ( ) const

Returns the wrap mode which defines how the texture is wrapped vertically and corresponds to U in UV mapping. Default is ModelData_TextureMappingMode::ModelData_TMM_UVMapping

See also
SetWrapMode()