- Main Page
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes | Friends

# FbxFileTexture Class Reference

This reference page is linked to from the following overview topics: Referencing Media, Meshes, Materials and Textures, Textures.

Search for all occurrences

## Detailed Description

This class describes image mapping on top of geometry.

Note:
  To apply a texture to geometry, first connect the geometry to a FbxSurfaceMaterial object (e.g. FbxSurfaceLambert) and then connect one of its properties (e.g. Diffuse) to the FbxFileTexture object.

See also:
  FbxSurfaceLambert
  FbxSurfacePhong
  FbxSurfaceMaterial

Note:
  For some example code, see also the CreateTexture() function in the ExportScene03 of FBX SDK examples.

Examples:

  ExportDocument/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, ExportShader/main.cxx, ImportScene/DisplayMaterial.cxx, ImportScene/DisplayTexture.cxx, Layers/main.cxx, ViewScene/SceneCache.cxx, and ViewScene/SceneContext.cxx.

Definition at line 34 of file fbxfiletexture.h.

`#include <fbxfiletexture.h>`

Inheritance diagram for FbxFileTexture:
[legend]

List of all members.

## Public Member Functions
virtual FbxObject & | Copy (const FbxObject &pObject)
| Copy an object content into this object.
bool | operator== (FbxFileTexture const &pTexture) const
FbxString & | GetMediaName ()
void | SetMediaName (char const *pMediaName)
## Protected Member Functions
| FbxFileTexture (FbxManager &pManager, char const *pName)
virtual void | Construct (const FbxFileTexture *pFrom)
virtual bool | ConstructProperties (bool pForceSet)
void | Init ()
void | SyncVideoFileName (char const *pFileName)
void | SyncVideoRelativeFileName (char const *pFileName)
## Protected Attributes
FbxString | mFileName
FbxString | mRelativeFileName
FbxString | mMediaName
## Friends
class | FbxLayerContainer
## Texture Properties
enum | EMaterialUse { eModelMaterial, eDefaultMaterial }
| Specify if texture uses model material. More...
FbxPropertyT< FbxBool > | UseMaterial
| This property handles the material use.
FbxPropertyT< FbxBool > | UseMipMap
| This property handles the Mipmap use.
void | Reset ()
| Resets the default texture values.
bool | SetFileName (char const *pName)
| Sets the associated texture file.
bool | SetRelativeFileName (char const *pName)
| Sets the associated texture file.
char const * | GetFileName () const
| Returns the absolute texture file path.
char const * | GetRelativeFileName () const
| Returns the relative texture file path.
void | SetMaterialUse (EMaterialUse pMaterialUse)
| Sets the material use.
EMaterialUse | GetMaterialUse () const
| Returns the material use.

## Member Enumeration Documentation

enum EMaterialUse

Search for all occurrences

Specify if texture uses model material.

Enumerator:

  eModelMaterial | Search for all occurrences
  eDefaultMaterial | Texture uses model material. Texture does not use model material. Search for all occurrences

Definition at line 89 of file fbxfiletexture.h.

        {
            eModelMaterial,
            eDefaultMaterial
        };

## Constructor & Destructor Documentation

FbxFileTexture | ( | FbxManager & | pManager,
|  | char const * | pName
| ) |  | `[protected]`

## Member Function Documentation

void Reset | ( |  | ) | `[virtual]`

Search for all occurrences

Resets the default texture values.

Remarks:
  The texture file name is not reset.

Reimplemented from FbxTexture.

bool SetFileName | ( | char const * | pName | ) |

Search for all occurrences

Sets the associated texture file.

Parameters:

  pName | The absolute path of the texture file.

Returns:
  `True` if successful, returns `false` otherwise.

Remarks:
  The texture file name must be valid, you cannot leave the name empty.

Examples:
  ExportDocument/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, ExportShader/main.cxx, and Layers/main.cxx.

bool SetRelativeFileName | ( | char const * | pName | ) |

Search for all occurrences

Sets the associated texture file.

Parameters:

  pName | The relative path of the texture file.

Returns:
  `True` if successful, returns `false` otherwise.

Remarks:
  The texture file name must be valid.

char const* GetFileName | ( |  | ) | const

Search for all occurrences

Returns the absolute texture file path.

Returns:
  The absolute texture file path.

Remarks:
  An empty string is returned if FbxFileTexture::SetFileName() has not been called before.

Examples:
  ImportScene/DisplayMaterial.cxx, ImportScene/DisplayTexture.cxx, and ViewScene/SceneContext.cxx.

char const* GetRelativeFileName | ( |  | ) | const

Search for all occurrences

Returns the relative texture file path.

Returns:
  The relative texture file path.

Remarks:
  An empty string is returned if FbxFileTexture::SetRelativeFileName() has not been called before.

Examples:
  ViewScene/SceneContext.cxx.

void SetMaterialUse | ( | EMaterialUse | pMaterialUse | ) |

Search for all occurrences

Sets the material use.

Parameters:

  pMaterialUse | Specify how texture uses model material.

Examples:
  ExportDocument/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, and Layers/main.cxx.

EMaterialUse GetMaterialUse | ( |  | ) | const

Search for all occurrences

Returns the material use.

Returns:
  How the texture uses model material.

Examples:
  ImportScene/DisplayTexture.cxx.

virtual FbxObject& Copy | ( | const FbxObject & | pObject | ) | `[virtual]`

Search for all occurrences

Copy an object content into this object.

Parameters:

  pObject | The source object to copy data from.

Returns:
  Returns the destination object being modified by the source.

Remarks:
  This function replace the assignment operator (operator=). It will copy all property values and the name. Connections are NOT copied.

Reimplemented from FbxTexture.

bool operator== | ( | FbxFileTexture const & | pTexture | ) | const

FbxString& GetMediaName | ( |  | ) |

Search for all occurrences

void SetMediaName | ( | char const * | pMediaName | ) |

Search for all occurrences

virtual void Construct | ( | const FbxFileTexture * | pFrom | ) | `[protected, virtual]`

Search for all occurrences

virtual bool ConstructProperties | ( | bool | pForceSet | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from FbxTexture.

void Init | ( |  | ) | `[protected]`

Search for all occurrences

Reimplemented from FbxTexture.

void SyncVideoFileName | ( | char const * | pFileName | ) | `[protected]`

Search for all occurrences

void SyncVideoRelativeFileName | ( | char const * | pFileName | ) | `[protected]`

Search for all occurrences

## Friends And Related Function Documentation

friend class FbxLayerContainer `[friend]`

Search for all occurrences

Reimplemented from FbxTexture.

Definition at line 139 of file fbxfiletexture.h.

## Member Data Documentation

FbxPropertyT<FbxBool> UseMaterial

Search for all occurrences

This property handles the material use.

Default value is false.

Definition at line 49 of file fbxfiletexture.h.

FbxPropertyT<FbxBool> UseMipMap

Search for all occurrences

This property handles the Mipmap use.

Default value is false.

Definition at line 54 of file fbxfiletexture.h.

FbxString mFileName `[protected]`

Search for all occurrences

Definition at line 135 of file fbxfiletexture.h.

FbxString mRelativeFileName `[protected]`

Search for all occurrences

Definition at line 136 of file fbxfiletexture.h.

FbxString mMediaName `[protected]`

Search for all occurrences

Definition at line 137 of file fbxfiletexture.h.

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

- fbxsdk/scene/shading/fbxfiletexture.h

FbxFileTexture FbxFileTexture FbxFileTexture FbxFileTexture FbxFileTexture FbxFileTexture FbxFileTexture FbxFileTexture FbxFileTexture FbxFileTexture
FbxFileTexture FbxFileTexture FbxFileTexture FbxFileTexture FbxFileTexture FbxFileTexture FbxFileTexture FbxFileTexture FbxFileTexture FbxFileTexture