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

KFbxFileTexture Class Reference

This reference page is linked to from the following overview topics: FBX SDK 2012, 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 KFbxSurfaceMaterial object (e.g. KFbxSurfaceLambert) and then connect one of its properties (e.g. Diffuse) to the KFbxFileTexture object.
See also:
KFbxSurfaceLambert
KFbxSurfacePhong
KFbxSurfaceMaterial
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, ImportScene/DisplayMaterial.cxx, ImportScene/DisplayTexture.cxx, Layers/main.cxx, UIExamples/CubeCreator/SDK_Utility.cxx, ViewScene/Texture.cxx, and ViewScene/Texture.h.

Definition at line 61 of file kfbxfiletexture.h.

#include <kfbxfiletexture.h>

Inheritance diagram for KFbxFileTexture:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual KFbxObject Copy (const KFbxObject &pObject)
  Copy an object content into this object.
bool  operator== (KFbxFileTexture const &pTexture) const
KString GetMediaName ()
void  SetMediaName (char const *pMediaName)

Protected Member Functions

  KFbxFileTexture (KFbxSdkManager &pManager, char const *pName)
virtual void  Construct (const KFbxFileTexture *pFrom)
virtual bool  ConstructProperties (bool pForceSet)
void  Init ()
void  SyncVideoFileName (char const *pFileName)
void  SyncVideoRelativeFileName (char const *pFileName)

Protected Attributes

KString  mFileName
KString  mRelativeFileName
KString  mMediaName

Friends

class  KFbxLayerContainer

Texture Properties

enum   EMaterialUse { eMODEL_MATERIAL, eDEFAULT_MATERIAL }
 

Specify if texture uses model material.

More...
KFbxTypedProperty< fbxBool1 UseMaterial
  This property handles the material use.
KFbxTypedProperty< fbxBool1 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

Specify if texture uses model material.

Enumerator:
eMODEL_MATERIAL 

Texture uses model material.

eDEFAULT_MATERIAL 

Texture does not use model material.

Definition at line 116 of file kfbxfiletexture.h.


Constructor & Destructor Documentation

KFbxFileTexture ( KFbxSdkManager pManager,
char const *  pName 
) [protected]

Member Function Documentation

void Reset ( ) [virtual]

Resets the default texture values.

Remarks:
The texture file name is not reset.

Reimplemented from KFbxTexture.

bool SetFileName ( char const *  pName )

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, Layers/main.cxx, and UIExamples/CubeCreator/SDK_Utility.cxx.
bool SetRelativeFileName ( char const *  pName )

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

Returns the absolute texture file path.

Returns:
The absolute texture file path.
Remarks:
An empty string is returned if KFbxFileTexture::SetFileName() has not been called before.
Examples:
ImportScene/DisplayMaterial.cxx, ImportScene/DisplayTexture.cxx, and ViewScene/Texture.cxx.
char const* GetRelativeFileName ( ) const

Returns the relative texture file path.

Returns:
The relative texture file path.
Remarks:
An empty string is returned if KFbxFileTexture::SetRelativeFileName() has not been called before.
void SetMaterialUse ( EMaterialUse  pMaterialUse )

Sets the material use.

Parameters:
pMaterialUse Specify how texture uses model material.
Examples:
ExportDocument/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, Layers/main.cxx, and UIExamples/CubeCreator/SDK_Utility.cxx.
EMaterialUse GetMaterialUse ( ) const

Returns the material use.

Returns:
How the texture uses model material.
Examples:
ImportScene/DisplayTexture.cxx.
virtual KFbxObject& Copy ( const KFbxObject pObject ) [virtual]

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 KFbxTexture.

bool operator== ( KFbxFileTexture const &  pTexture ) const
KString& GetMediaName ( )
void SetMediaName ( char const *  pMediaName )
virtual void Construct ( const KFbxFileTexture pFrom ) [protected, virtual]
virtual bool ConstructProperties ( bool  pForceSet ) [protected, virtual]
void Init ( ) [protected]
void SyncVideoFileName ( char const *  pFileName ) [protected]
void SyncVideoRelativeFileName ( char const *  pFileName ) [protected]

Friends And Related Function Documentation

friend class KFbxLayerContainer [friend]

Reimplemented from KFbxTexture.

Definition at line 168 of file kfbxfiletexture.h.


Member Data Documentation

This property handles the material use.

Default value is false.

Definition at line 76 of file kfbxfiletexture.h.

This property handles the Mipmap use.

Default value is false.

Definition at line 81 of file kfbxfiletexture.h.

KString mFileName [protected]

Definition at line 164 of file kfbxfiletexture.h.

Definition at line 165 of file kfbxfiletexture.h.

KString mMediaName [protected]

Definition at line 166 of file kfbxfiletexture.h.


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

KFbxFileTexture KFbxFileTexture KFbxFileTexture KFbxFileTexture KFbxFileTexture KFbxFileTexture KFbxFileTexture KFbxFileTexture KFbxFileTexture KFbxFileTexture
KFbxFileTexture KFbxFileTexture KFbxFileTexture KFbxFileTexture KFbxFileTexture KFbxFileTexture KFbxFileTexture KFbxFileTexture KFbxFileTexture KFbxFileTexture