CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
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 setTexture (OdGiMaterialTexturePtr pTexture)
 
OdGiMappermapper ()
 
Source source () const
 
OdString sourceFileName () const
 
double blendFactor () 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 1822 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 1829 of file GiMaterial.h.

Constructor & Destructor Documentation

◆ OdGiMaterialMap()

OdGiMaterialMap::OdGiMaterialMap ( )
inline

Default constructor for the OdGiMaterialMap class. Sets the material map source to kFile and blend factor to 1.0.

Definition at line 2087 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 2112 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 2100 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 2118 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 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 1996 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, mapper and texture to this material map.

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

Definition at line 2010 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 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 1969 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 2094 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 2124 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 2106 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 2130 of file GiMaterial.h.

Member Data Documentation

◆ kNull

ODGI_EXPORT_STATIC const OdGiMaterialMap OdGiMaterialMap::kNull
static

Definition at line 1839 of file GiMaterial.h.


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