Protected Member Functions

KFbxImplementation Class Reference

This reference page is linked to from the following overview topics: Using hardware shaders to create materials.


Search for all occurrences

Detailed Description

This object represents the shading node implementation.

It defines basic information about the shader and the binding table(KFbxBindingTable). For example, you can create a new KFbxImplementation like this:

 KFbxImplementation* lImpl = KFbxImplementation::Create( &pMyScene, "MyImplementation" );
 pMyObject.AddImplementation( lImpl );
 pMyObject.SetDefaultImplementation( lImpl );
 lImpl->RenderAPI = sDirectX; //sDirectX, sOpenGL, sMentalRay or sPreview
 lImpl->RenderAPIVersion = "9.0"; //API Version

 lImpl->Language = sHLSL; //sHLSL, sGLSL, sCGFX or sMentalRaySL
 lImpl->LanguageVersion = "1.0";  //Language Version

After the new KFbxImplementation is created, you can access KFbxBindingTable like this:

 KFbxBindingTable* lTable = lImpl->GetTableByTargetName("root");

Also, you can access the exist KFbxImplementation in KFbxObject by this:

 const KFbxImplementation* lImpl = GetImplementation( pMyObject, ImplementationCGFX ); // ImplementationPreview, ImplementationMentalRay, ImplementationCGFX, ImplementationHLSL, ImplementaitonOGS or ImplementationNone
See also:
KFbxImplementationFilter
Examples:

ImportScene/DisplayMaterial.cxx.

Definition at line 79 of file kfbximplementation.h.

#include <kfbximplementation.h>

Inheritance diagram for KFbxImplementation:
Inheritance graph
[legend]

List of all members.

Protected Member Functions

  KFbxImplementation (KFbxSdkManager &pManager, char const *pName)
virtual bool  ConstructProperties (bool pForceSet)

Target Name

KString  RenderName

Shader Language and API descriptions

KFbxTypedProperty< fbxString Language
  Shader Language.
KFbxTypedProperty< fbxString LanguageVersion
  Shader Language version.
KFbxTypedProperty< fbxString RenderAPI
  Render API.
KFbxTypedProperty< fbxString RenderAPIVersion
  Render API version.

Binding description

KFbxTypedProperty< fbxString RootBindingName
  Name of root binding table.
KFbxProperty  GetConstants () const
  Property to store the shader parameters(constants) values in this implementation.
KFbxBindingTable AddNewTable (char const *pTargetName, char const *pTargetType)
  Add a new binding table to the table list.
KFbxBindingTable const *  GetRootTable () const
  Retrieves a handle on the root binding table.
KFbxBindingTable GetRootTable ()
int  GetTableCount () const
  Gets the number of binding tables.
KFbxBindingTable const *  GetTable (int pIndex) const
  Retrieves a handle on the (pIndex)th binding table.
KFbxBindingTable GetTable (int pIndex)
  Retrieves a handle on the (pIndex)th binding table.
KFbxBindingTable const *  GetTableByTargetName (char const *pName) const
  Returns the binding table that has the given name.
KFbxBindingTable GetTableByTargetName (char const *pName)
  Returns the binding table that has the given name.
KFbxBindingTable const *  GetTableByTargetType (char const *pTargetName) const
  Returns the binding table for a given target.
KFbxBindingTable GetTableByTargetType (char const *pTargetName)
  Returns the binding table for a given target.
KFbxBindingOperator AddNewBindingOperator (char const *pTargetName, char const *pFunctionName)
  Add a new binding table to the table list.
int  GetBindingOperatorCount () const
  Gets the number of binding table operators.
KFbxBindingOperator const *  GetOperatorByTargetName (char const *pTargetName) const
  Returns the binding table that has the given name.

Static values

static const char *  sLanguage
  Shader Language name.
static const char *  sLanguageVersion
  Shader Language version.
static const char *  sRenderAPI
  Shader render API.
static const char *  sRenderAPIVersion
  Shader render API version.
static const char *  sRootBindingName
  Name of root binding table.
static const char *  sConstants
  Name of property to store the shader parameters(constants) values in this implementation.
static const char *  sDefaultType
  default value for implementation type
static const char *  sDefaultLanguage
  default value for shader language
static const char *  sDefaultLanguageVersion
  default value for shader language version
static const char *  sDefaultRenderAPI
  default value for shader render API
static const char *  sDefaultRenderAPIVersion
  default value for shader render API version
static const char *  sDefaultRootBindingName
  default value for root binding table name

Constructor & Destructor Documentation

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

Member Function Documentation

KFbxProperty GetConstants ( ) const

Property to store the shader parameters(constants) values in this implementation.

KFbxBindingTable* AddNewTable ( char const *  pTargetName,
char const *  pTargetType 
)

Add a new binding table to the table list.

Parameters:
pTargetName The target name for the binding table
pTargetType The target type for the binding table
Returns:
the new binding table
KFbxBindingTable const* GetRootTable ( ) const

Retrieves a handle on the root binding table.

Returns:
A const pointer to the root table or NULL if it does not exist.
KFbxBindingTable* GetRootTable ( )
int GetTableCount ( ) const

Gets the number of binding tables.

Returns:
the number of binding tables
KFbxBindingTable const* GetTable ( int  pIndex ) const

Retrieves a handle on the (pIndex)th binding table.

Parameters:
pIndex The index of the table to retrieve. Valid values are [ 0, GetTableCount() )
Returns:
A const pointer to the pIndex-th table or NULL if pIndex is out of range
KFbxBindingTable* GetTable ( int  pIndex )

Retrieves a handle on the (pIndex)th binding table.

Parameters:
pIndex The index of the table to retrieve. Valid values are [ 0, GetTableCount() )
Returns:
A const pointer to the pIndex-th table or NULL if pIndex is out of range
KFbxBindingTable const* GetTableByTargetName ( char const *  pName ) const

Returns the binding table that has the given name.

Parameters:
pName The name of the table to look for
Returns:
A const pointer to the binding table with the given name, or NULL if there is no such binding table
KFbxBindingTable* GetTableByTargetName ( char const *  pName )

Returns the binding table that has the given name.

Parameters:
pName The name of the table to look for
Returns:
A const pointer to the binding table with the given name, or NULL if there is no such binding table
KFbxBindingTable const* GetTableByTargetType ( char const *  pTargetName ) const

Returns the binding table for a given target.

Parameters:
pTargetName The name of the target to look for
Returns:
A const pointer to the binding table with the given target, or SIZE_MAX if there is no such binding table
KFbxBindingTable* GetTableByTargetType ( char const *  pTargetName )

Returns the binding table for a given target.

Parameters:
pTargetName The name of the target to look for
Returns:
A const pointer to the binding table with the given target, or SIZE_MAX if there is no such binding table
KFbxBindingOperator* AddNewBindingOperator ( char const *  pTargetName,
char const *  pFunctionName 
)

Add a new binding table to the table list.

Parameters:
pTargetName The target name for the binding table
pFunctionName The target type for the binding table
Returns:
the new operator
int GetBindingOperatorCount ( ) const

Gets the number of binding table operators.

Returns:
the number of binding table operators.
KFbxBindingOperator const* GetOperatorByTargetName ( char const *  pTargetName ) const

Returns the binding table that has the given name.

Parameters:
pTargetName The name of the table to look for
Returns:
A const pointer to the binding table with the given name, or NULL if there is no such binding table
virtual bool ConstructProperties ( bool  pForceSet ) [protected, virtual]

Member Data Documentation

Definition at line 88 of file kfbximplementation.h.

Shader Language.

See also:
sHLSL, sGLSL, sCGFX and sMentalRaySL in conventions.h

Definition at line 99 of file kfbximplementation.h.

Shader Language version.

Definition at line 102 of file kfbximplementation.h.

Render API.

See also:
sHLSL, sGLSL, sCGFX and sMentalRaySL in conventions.h

Definition at line 107 of file kfbximplementation.h.

Render API version.

Definition at line 110 of file kfbximplementation.h.

Name of root binding table.

Definition at line 120 of file kfbximplementation.h.

const char* sLanguage [static]

Shader Language name.

See also:
Language

Definition at line 207 of file kfbximplementation.h.

const char* sLanguageVersion [static]

Shader Language version.

See also:
LanguageVersion

Definition at line 212 of file kfbximplementation.h.

const char* sRenderAPI [static]

Shader render API.

See also:
RenderAPI

Definition at line 217 of file kfbximplementation.h.

const char* sRenderAPIVersion [static]

Shader render API version.

See also:
RenderAPIVersion

Definition at line 222 of file kfbximplementation.h.

const char* sRootBindingName [static]

Name of root binding table.

See also:
RootBindingName

Definition at line 227 of file kfbximplementation.h.

const char* sConstants [static]

Name of property to store the shader parameters(constants) values in this implementation.

See also:
GetConstants

Definition at line 232 of file kfbximplementation.h.

const char* sDefaultType [static]

default value for implementation type

Definition at line 235 of file kfbximplementation.h.

const char* sDefaultLanguage [static]

default value for shader language

Definition at line 238 of file kfbximplementation.h.

const char* sDefaultLanguageVersion [static]

default value for shader language version

Definition at line 241 of file kfbximplementation.h.

const char* sDefaultRenderAPI [static]

default value for shader render API

Definition at line 244 of file kfbximplementation.h.

const char* sDefaultRenderAPIVersion [static]

default value for shader render API version

Definition at line 247 of file kfbximplementation.h.

const char* sDefaultRootBindingName [static]

default value for root binding table name

Definition at line 250 of file kfbximplementation.h.


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

KFbxImplementation KFbxImplementation KFbxImplementation KFbxImplementation KFbxImplementation KFbxImplementation KFbxImplementation KFbxImplementation KFbxImplementation KFbxImplementation
KFbxImplementation KFbxImplementation KFbxImplementation KFbxImplementation KFbxImplementation KFbxImplementation KFbxImplementation KFbxImplementation KFbxImplementation KFbxImplementation