Provides an interface to texture parameters. More...
Public Types | |
typedef cadex::internal::ModelData_TextureParametersImpl | ImplType |
![]() | |
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 |
![]() | |
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 | |
![]() | |
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. | |
Provides an interface to texture parameters.
cadex::ModelData_TextureParameters::ModelData_TextureParameters | ( | ) |
Constructor. Creates default initialized parameters.
ModelData_TextureBlendMode cadex::ModelData_TextureParameters::BlendMode | ( | ) | const |
Returns the blend mode. Default is #ModelData_TextureBlendMode::ModelData_TBM_Modulate
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.
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.
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.
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.
double cadex::ModelData_TextureParameters::ScaleU | ( | ) | const |
Returns scale applied to the texture width.
double cadex::ModelData_TextureParameters::ScaleV | ( | ) | const |
Returns scale applied to the texture height.
void cadex::ModelData_TextureParameters::SetBlendMode | ( | ModelData_TextureBlendMode | theMode | ) |
Sets the blend mode.
void cadex::ModelData_TextureParameters::SetMappingMode | ( | ModelData_TextureMappingMode | theMode | ) |
Sets the mapping type.
void cadex::ModelData_TextureParameters::SetScale | ( | double | theScaleU, |
double | theScaleV | ||
) |
void cadex::ModelData_TextureParameters::SetTranslation | ( | double | theTranslationU, |
double | theTranslationV | ||
) |
Sets translation applied to the texture.
void cadex::ModelData_TextureParameters::SetWrapMode | ( | ModelData_TextureWrapMode | theModeU, |
ModelData_TextureWrapMode | theModeV | ||
) |
Sets the wrap modes.
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.
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.
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 //!
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