CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdGiMaterialMap Class Reference

#include <GiMaterial.h>

Public Types

enum  Source { kScene = 0 , kFile = 1 , kProcedural = 2 }
 

Public Member Functions

 OdGiMaterialMap ()
 
void setSource (Source source)
 
void setSourceFileName (const OdString &filename)
 
void setBlendFactor (double blendFactor)
 
void setBrightness (double brightness)
 
void setInverted (bool bInvert)
 
void setInvertedBrightness (bool bInvert)
 
void setTexture (OdGiMaterialTexturePtr pTexture)
 
OdGiMappermapper ()
 
Source source () const
 
OdString sourceFileName () const
 
double blendFactor () const
 
double brightness () const
 
bool isInverted () const
 
bool isInvertedBrightness () const
 
const OdGiMappermapper () const
 
void setMapper (const OdGiMapper &mapper)
 
const OdGiMaterialTexturePtr texture (void) const
 
bool operator== (const OdGiMaterialMap &other) const
 
bool operator!= (const OdGiMaterialMap &other) const
 
OdGiMaterialMapoperator= (const OdGiMaterialMap &mmap)
 

Static Public Attributes

static ODGI_EXPORT_STATIC const OdGiMaterialMap kNull
 

Detailed Description

This class implements material maps.

Remarks
Material maps define bitmapped images that are applied to object surfaces.
See also
<link tv_working_with_attributes_materials_mapping, Work with Mapping Properties> <group OdGi_Classes>

Definition at line 2005 of file GiMaterial.h.

Member Enumeration Documentation

◆ Source

Describes the image source of this MaterialMap object.

Enumerator
kScene 

Map is created from the current scene.

kFile 

Map is from a file.

kProcedural 

Map is procedural.

Definition at line 2012 of file GiMaterial.h.

Constructor & Destructor Documentation

◆ OdGiMaterialMap()

OdGiMaterialMap::OdGiMaterialMap ( )
inline

Default constructor for the OdGiMaterialMap class. Sets the material map source to kFile, all flags as disabled, blend factor and brightness to 1.0.

Definition at line 2360 of file GiMaterial.h.

Member Function Documentation

◆ blendFactor()

double OdGiMaterialMap::blendFactor ( ) const
inline

Retrieves the blend factor for this MaterialMap object.

Returns
blend factor as a value of the double type.
Remarks
A blend factor of 0.0 makes the MaterialMap invisible. A blend factor of 1.0 makes it opaque. In between, the MaterialMap is transparent.

Definition at line 2405 of file GiMaterial.h.

◆ brightness()

double OdGiMaterialMap::brightness ( ) const
inline

Retrieves the brightness of this MaterialMap object.

Returns
brightness as a value of the double type.
Remarks
A brightness of 0.0 makes the MaterialMap black. A brightness of 1.0 keeps it unchanged.

Definition at line 2411 of file GiMaterial.h.

◆ isInverted()

bool OdGiMaterialMap::isInverted ( ) const
inline

Retrieves the source invertion of this MaterialMap object.

Returns
invertion flag as a value of the boolean type.

Definition at line 2417 of file GiMaterial.h.

◆ isInvertedBrightness()

bool OdGiMaterialMap::isInvertedBrightness ( ) const
inline

Retrieves the order exchanging of invertion and brightness operations for this MaterialMap object.

Returns
invertion flag as a value of the boolean type.

Definition at line 2423 of file GiMaterial.h.

◆ mapper() [1/2]

OdGiMapper & OdGiMaterialMap::mapper ( )
inline

Retrieves a mapper for this material map.

Returns
Returns a reference to, or a copy of, the OdGiMapper for this MaterialMap object.
Remarks
The transform matrix defines mapping of an OdGiMaterialMap image when applied to the surface of an object.

Definition at line 2393 of file GiMaterial.h.

◆ mapper() [2/2]

const OdGiMapper & OdGiMaterialMap::mapper ( ) const
inline

Retrieves a mapper for this material map.

Returns
a reference to the OdGiMapper for this MaterialMap object.

Definition at line 2429 of file GiMaterial.h.

◆ operator!=()

bool OdGiMaterialMap::operator!= ( const OdGiMaterialMap & other) const
inline

Inequality operator for the OdGiMaterialMap class. Material maps are not equal if at least one of the following conditions fails: the texture source file values are equal (both can be NULL) source file names are equal blend factors are equal brightness are equal material map flags are equal mapper objects are equal.

Parameters
other[in] Material mapper to be compared.
Returns
true if the material map is not equal to this material map, false otherwise.

Definition at line 2237 of file GiMaterial.h.

◆ operator=()

OdGiMaterialMap & OdGiMaterialMap::operator= ( const OdGiMaterialMap & mmap)
inline

Assignment operator for the OdGiMaterialMap class. Assigns map source, file name, blend factor, brightness, flags, mapper and texture to this material map.

Parameters
texture[in] Texture to be assigned.
Returns
a reference to this material map.

Definition at line 2251 of file GiMaterial.h.

◆ operator==()

bool OdGiMaterialMap::operator== ( const OdGiMaterialMap & other) const
inline

Equality operator for the OdGiMaterialMap class. Material maps are equal if: the texture source file values are equal (both can be NULL) source file names are equal blend factors are equal brightness are equal material map flags are equal mapper objects are equal.

Parameters
other[in] Material mapper to be compared.
Returns
true if the material map is equal to this material map, false otherwise.

Definition at line 2206 of file GiMaterial.h.

◆ setBlendFactor()

void OdGiMaterialMap::setBlendFactor ( double blendFactor)
inline

Sets the blend factor for this MaterialMap object.

Parameters
blendFactor[in] Blend factor.
Remarks
A blend factor of 0.0 makes the MaterialMap invisible. A blend factor of 1.0 makes it opaque. In between, the MaterialMap is transparent.

Definition at line 2369 of file GiMaterial.h.

◆ setBrightness()

void OdGiMaterialMap::setBrightness ( double brightness)
inline

Sets the brightness for this MaterialMap object.

Parameters
brightness[in] Texture brightness.
Remarks
A brightness of 0.0 makes the MaterialMap black. A brightness of 1.0 keeps it unchanged.

Definition at line 2375 of file GiMaterial.h.

◆ setInverted()

void OdGiMaterialMap::setInverted ( bool bInvert)
inline

Sets the source invertion for this MaterialMap object.

Parameters
bInvert[in] Invert texture image.

Definition at line 2381 of file GiMaterial.h.

◆ setInvertedBrightness()

void OdGiMaterialMap::setInvertedBrightness ( bool bInvert)
inline

Exchange order of invertion and brightness operations for this MaterialMap object.

Parameters
bInvert[in] Exchange order of invertion and brightness operations.

Definition at line 2387 of file GiMaterial.h.

◆ setMapper()

void OdGiMaterialMap::setMapper ( const OdGiMapper & mapper)
inline

Sets the OdGiMapper for this MaterialMap object.

Parameters
mapper[in] OdGiMapper reference.

Definition at line 2435 of file GiMaterial.h.

◆ setSource()

void OdGiMaterialMap::setSource ( Source source)

Sets the image source for this MaterialMap object.

Parameters
source[in] Image source.
Remarks
Source must be one of the following:

Value Description kScene 0 Image is created from the current scene. kFile 1 Image is from a file. kProcedural 2 Image is procedurally generated.

◆ setSourceFileName()

void OdGiMaterialMap::setSourceFileName ( const OdString & filename)

Sets the source filename for this MaterialMap object.

Parameters
filename[in] Source filename.

◆ setTexture()

void OdGiMaterialMap::setTexture ( OdGiMaterialTexturePtr pTexture)

Sets the material texture for this MaterialMap object.

Parameters
pTexture[in] Material texture.

◆ source()

OdGiMaterialMap::Source OdGiMaterialMap::source ( ) const
inline

Retrieves the image source for this MaterialMap object.

Returns
a value from the Source enumeration that can be one of the following:

Value Description kScene 0 Image is created from the current scene. kFile 1 Image is from a file. kProcedural 2 Image is procedurally generated.

Definition at line 2399 of file GiMaterial.h.

◆ sourceFileName()

OdString OdGiMaterialMap::sourceFileName ( ) const

Retrieves the source filename for this MaterialMap object.

Returns
source filename as OdString instance.

◆ texture()

const OdGiMaterialTexturePtr OdGiMaterialMap::texture ( void ) const
inline

Retrieves the material texture for this MaterialMap object.

Returns
a smart pointer to the material texture.

Definition at line 2441 of file GiMaterial.h.

Member Data Documentation

◆ kNull

ODGI_EXPORT_STATIC const OdGiMaterialMap OdGiMaterialMap::kNull
static

A null material mapper (map source is kFile, flags disabled, blend factor and brightness is 1.0).

Definition at line 2023 of file GiMaterial.h.


The documentation for this class was generated from the following file: