This reference page is linked to from the following overview topics: Meshes, Materials and Textures, Meshes, Layered Textures, List of Python FBX classes.
Base class for elements of layers (KFbxLayer).
A layer element type is identified by ELayerElementType. A KFbxLayerElement describes how the layer element is mapped to a geometry surface and how the mapping information is arranged in memory. A KFbxLayerElement contains Normals, UVs or other kind of information.
Definition at line 56 of file kfbxlayer.h.
#include <kfbxlayer.h>

Public Types |
|
| enum | ELayerElementType
{ eUNDEFINED, eNORMAL, eBINORMAL, eTANGENT, eMATERIAL, ePOLYGON_GROUP, eUV, eVERTEX_COLOR, eSMOOTHING, eVERTEX_CREASE, eEDGE_CREASE, eHOLE, eUSER_DATA, eVISIBILITY, eDIFFUSE_TEXTURES, eDIFFUSE_FACTOR_TEXTURES, eEMISSIVE_TEXTURES, eEMISSIVE_FACTOR_TEXTURES, eAMBIENT_TEXTURES, eAMBIENT_FACTOR_TEXTURES, eSPECULAR_TEXTURES, eSPECULAR_FACTOR_TEXTURES, eSHININESS_TEXTURES, eNORMALMAP_TEXTURES, eBUMP_TEXTURES, eTRANSPARENT_TEXTURES, eTRANSPARENCY_FACTOR_TEXTURES, eREFLECTION_TEXTURES, eREFLECTION_FACTOR_TEXTURES, eDISPLACEMENT_TEXTURES, eVECTOR_DISPLACEMENT_TEXTURES, eLAST_ELEMENT_TYPE } |
|
Layer Element type identifier. More... |
|
| enum | EMappingMode
{ eNONE, eBY_CONTROL_POINT, eBY_POLYGON_VERTEX, eBY_POLYGON, eBY_EDGE, eALL_SAME } |
|
Determines how the element is mapped to a surface. More... |
|
| enum | EReferenceMode { eDIRECT, eINDEX, eINDEX_TO_DIRECT } |
|
Determines how the mapping information is stored in the array of coordinates. More... |
|
Public Member Functions |
|
| void | SetMappingMode (EMappingMode pMappingMode) |
| Sets the Mapping Mode. |
|
| void | SetReferenceMode (EReferenceMode pReferenceMode) |
| Sets the Reference Mode. |
|
| EMappingMode | GetMappingMode () const |
| Returns the Mapping Mode. |
|
| EReferenceMode | GetReferenceMode () const |
| Returns the Reference Mode. |
|
| void | SetName (const char *pName) |
| Sets the name of this object. |
|
| const char * | GetName () const |
| Returns the name of this object. |
|
| bool | operator== (const KFbxLayerElement &pOther) const |
| Equivalence operator. |
|
| KFbxLayerElement & | operator= (KFbxLayerElement const &pOther) |
| Assignment operator. |
|
| void | Destroy () |
| Removes this layer element from its owner
and delete it. |
|
| virtual bool | Clear () |
| Clears all the data from this layer element.
|
|
| void | SetType (const KFbxDataType *pType) |
| const KFbxLayerContainer * | GetOwner () const |
| virtual int | MemorySize () const |
| Queries the amount of memory used by this
object AND its content (does not consider the content pointed)
|
|
|
Serialization section
|
|
| virtual bool | ContentWriteTo (KFbxStream &pStream) const |
| Writes the content of this layer element to
the given stream. |
|
| virtual bool | ContentReadFrom (const KFbxStream &pStream) |
| Reads the content of this layer element from
the given stream. |
|
Static Public Attributes |
|
| static const int | LAYERELEMENT_TYPE_TEXTURE_START_INDEX = int(eDIFFUSE_TEXTURES) |
| The start index of texture type layer
elements. |
|
| static const int | LAYERELEMENT_TYPE_TEXTURE_END_INDEX = int(eLAST_ELEMENT_TYPE) - 1 |
| The end index of texture type layer
elements. |
|
| static const int | LAYERELEMENT_TYPE_TEXTURE_COUNT = LAYERELEMENT_TYPE_TEXTURE_END_INDEX - LAYERELEMENT_TYPE_TEXTURE_START_INDEX + 1 |
| The count of texture type layer elements.
|
|
| static const int | LAYERELEMENT_TYPE_NON_TEXTURE_START_INDEX = int(eNORMAL) |
| The start index of non-texture type layer
elements. |
|
| static const int | LAYERELEMENT_TYPE_NON_TEXTURE_END_INDEX = int(eVISIBILITY) |
| The end index of non-texture type layer
elements. |
|
| static const int | LAYERELEMENT_TYPE_NON_TEXTURE_COUNT = LAYERELEMENT_TYPE_NON_TEXTURE_END_INDEX - LAYERELEMENT_TYPE_NON_TEXTURE_START_INDEX + 1 |
| The count of non-texture type layer
elements. |
|
| static const char *const | TEXTURE_NAMES [] |
| Array of names of texture type layer
elements. |
|
| static const char *const | TEXTURE_UV_NAMES [] |
| Array of names of UV layer elements.
|
|
| static const char *const | NON_TEXTURE_NAMES [] |
| Array of names of non-texture type layer
elements. |
|
| static const KFbxDataType | TEXTURE_TYPES [] |
| Array of texture types. |
|
| static const char *const | TEXTURE_CHANNEL_NAMES [] |
| Array of texture channels. |
|
Protected Member Functions |
|
| KFbxLayerElement () | |
| virtual | ~KFbxLayerElement () |
| void | Destruct () |
| virtual void | SetOwner (KFbxLayerContainer *pOwner) |
Protected Attributes |
|
| EMappingMode | mMappingMode |
| EReferenceMode | mReferenceMode |
| KString | mName |
| const KFbxDataType * | mType |
| KFbxLayerContainer * | mOwner |
Friends |
|
| class | KFbxLayerContainer |
| enum ELayerElementType |
Layer Element type identifier.
Definition at line 95 of file kfbxlayer.h.
{
eUNDEFINED,
//NON-TEXTURE LAYER ELEMENT BEGIN
eNORMAL,
eBINORMAL,
eTANGENT,
eMATERIAL,
ePOLYGON_GROUP,
eUV,
eVERTEX_COLOR,
eSMOOTHING,
eVERTEX_CREASE,
eEDGE_CREASE,
eHOLE,
eUSER_DATA,
eVISIBILITY,
//NEW NON-TEXTURE LAYER ELEMENT ADD HERE...
//NON-TEXTURE LAYER ELEMENT END
//TEXTURE LAYER ELEMENT BEGIN
eDIFFUSE_TEXTURES,
eDIFFUSE_FACTOR_TEXTURES,
eEMISSIVE_TEXTURES,
eEMISSIVE_FACTOR_TEXTURES,
eAMBIENT_TEXTURES,
eAMBIENT_FACTOR_TEXTURES,
eSPECULAR_TEXTURES,
eSPECULAR_FACTOR_TEXTURES,
eSHININESS_TEXTURES,
eNORMALMAP_TEXTURES,
eBUMP_TEXTURES,
eTRANSPARENT_TEXTURES,
eTRANSPARENCY_FACTOR_TEXTURES,
eREFLECTION_TEXTURES,
eREFLECTION_FACTOR_TEXTURES,
eDISPLACEMENT_TEXTURES,
//NEW TEXTURE LAYER ELEMENT ADD HERE...
eVECTOR_DISPLACEMENT_TEXTURES,
//TEXTURE LAYER ELEMENT END
eLAST_ELEMENT_TYPE
} ELayerElementType;
| enum EMappingMode |
Determines how the element is mapped to a surface.
Definition at line 189 of file kfbxlayer.h.
| enum EReferenceMode |
Determines how the mapping information is stored in the array of coordinates.
Definition at line 212 of file kfbxlayer.h.
| KFbxLayerElement | ( | ) | [inline, protected] |
Definition at line 297 of file kfbxlayer.h.
: mMappingMode(eNONE)
, mReferenceMode(eDIRECT)
, mName("")
, mOwner(NULL)
{
}
| virtual ~KFbxLayerElement | ( | ) | [inline, protected, virtual] |
Definition at line 305 of file kfbxlayer.h.
{
}
| void SetMappingMode | ( | EMappingMode | pMappingMode | ) | [inline] |
Sets the Mapping Mode.
| pMappingMode | Specifies the way that layer element is mapped to a surface. |
Definition at line 223 of file kfbxlayer.h.
{ mMappingMode = pMappingMode; }
| void SetReferenceMode | ( | EReferenceMode | pReferenceMode | ) | [inline] |
Sets the Reference Mode.
| pReferenceMode | Specifies the reference mode. |
Reimplemented in KFbxLayerElementSmoothing, KFbxLayerElementCrease, and KFbxLayerElementHole.
Definition at line 228 of file kfbxlayer.h.
{ mReferenceMode = pReferenceMode; }
| EMappingMode GetMappingMode | ( | ) | const [inline] |
Returns the Mapping Mode.
Definition at line 233 of file kfbxlayer.h.
{ return mMappingMode; }
| EReferenceMode GetReferenceMode | ( | ) | const [inline] |
Returns the Reference Mode.
Definition at line 238 of file kfbxlayer.h.
{ return mReferenceMode; }
| void SetName | ( | const char * | pName | ) | [inline] |
Sets the name of this object.
| pName | Specifies the name of this LayerElement object. |
Definition at line 243 of file kfbxlayer.h.
| const char* GetName | ( | ) | const [inline] |
Returns the name of this object.
Definition at line 248 of file kfbxlayer.h.
{ return ((KFbxLayerElement*)this)->mName.Buffer(); }
| bool operator== | ( | const KFbxLayerElement & | pOther | ) | const [inline] |
Equivalence operator.
| pOther | Layer element to be compared. |
True if equal, false otherwise.Definition at line 254 of file kfbxlayer.h.
{
return (mName == pOther.mName) &&
(mMappingMode == pOther.mMappingMode) &&
(mReferenceMode == pOther.mReferenceMode);
}
| KFbxLayerElement& operator= | ( | KFbxLayerElement const & | pOther | ) | [inline] |
Assignment operator.
| pOther | Layer element assigned to this one. |
Definition at line 265 of file kfbxlayer.h.
{
mMappingMode = pOther.mMappingMode;
mReferenceMode = pOther.mReferenceMode;
// name, type and owner should not be copied because they are
// initialized when this object is created
return *this;
}
| void Destroy | ( | ) |
Removes this layer element from its owner and delete it.
| virtual bool Clear | ( | ) | [inline, virtual] |
Clears all the data from this layer element.
Reimplemented in KFbxLayerElementTemplate< Type >, KFbxLayerElementUserData, KFbxLayerElementTemplate< double >, KFbxLayerElementTemplate< int >, KFbxLayerElementTemplate< KFbxColor >, KFbxLayerElementTemplate< KFbxVector4 >, KFbxLayerElementTemplate< KFbxVector2 >, KFbxLayerElementTemplate< void * >, KFbxLayerElementTemplate< bool >, and KFbxLayerElementTemplate< KFbxSurfaceMaterial * >.
Definition at line 278 of file kfbxlayer.h.
{
return true;
}
| void SetType | ( | const KFbxDataType * | pType | ) | [inline] |
| const KFbxLayerContainer* GetOwner | ( | ) | const [inline] |
| void Destruct | ( | ) | [inline, protected] |
| virtual void SetOwner | ( | KFbxLayerContainer * | pOwner | ) | [protected, virtual] |
| virtual int MemorySize | ( | ) | const [inline, virtual] |
Queries the amount of memory used by this object AND its content (does not consider the content pointed)
Reimplemented in KFbxLayerElementTemplate< Type >, KFbxLayerElementUserData, KFbxLayerElementTemplate< double >, KFbxLayerElementTemplate< int >, KFbxLayerElementTemplate< KFbxColor >, KFbxLayerElementTemplate< KFbxVector4 >, KFbxLayerElementTemplate< KFbxVector2 >, KFbxLayerElementTemplate< void * >, KFbxLayerElementTemplate< bool >, and KFbxLayerElementTemplate< KFbxSurfaceMaterial * >.
Definition at line 327 of file kfbxlayer.h.
{ return 0; }
| virtual bool ContentWriteTo | ( | KFbxStream & | pStream | ) | const [virtual] |
Writes the content of this layer element to the given stream.
| pStream | The destination stream. |
True if the content is successfully processed by
the receiving stream, false otherwise.Reimplemented in KFbxLayerElementTemplate< Type >, KFbxLayerElementTemplate< double >, KFbxLayerElementTemplate< int >, KFbxLayerElementTemplate< KFbxColor >, KFbxLayerElementTemplate< KFbxVector4 >, KFbxLayerElementTemplate< KFbxVector2 >, KFbxLayerElementTemplate< void * >, KFbxLayerElementTemplate< bool >, and KFbxLayerElementTemplate< KFbxSurfaceMaterial * >.
| virtual bool ContentReadFrom | ( | const KFbxStream & | pStream | ) | [virtual] |
Reads the content of this layer element from the given stream.
| pStream | The source stream. |
True if the object fills itself with the received
data from the stream successfully, false
otherwise.Reimplemented in KFbxLayerElementTemplate< Type >, KFbxLayerElementTemplate< double >, KFbxLayerElementTemplate< int >, KFbxLayerElementTemplate< KFbxColor >, KFbxLayerElementTemplate< KFbxVector4 >, KFbxLayerElementTemplate< KFbxVector2 >, KFbxLayerElementTemplate< void * >, KFbxLayerElementTemplate< bool >, and KFbxLayerElementTemplate< KFbxSurfaceMaterial * >.
friend class KFbxLayerContainer
[friend] |
Reimplemented in KFbxLayerElementMaterial.
Definition at line 320 of file kfbxlayer.h.
const int LAYERELEMENT_TYPE_TEXTURE_START_INDEX
= int(eDIFFUSE_TEXTURES) [static] |
The start index of texture type layer elements.
Definition at line 145 of file kfbxlayer.h.
const int LAYERELEMENT_TYPE_TEXTURE_END_INDEX
= int(eLAST_ELEMENT_TYPE) - 1 [static] |
The end index of texture type layer elements.
Definition at line 148 of file kfbxlayer.h.
const int LAYERELEMENT_TYPE_TEXTURE_COUNT
= LAYERELEMENT_TYPE_TEXTURE_END_INDEX
- LAYERELEMENT_TYPE_TEXTURE_START_INDEX
+ 1 [static] |
The count of texture type layer elements.
Definition at line 151 of file kfbxlayer.h.
const int LAYERELEMENT_TYPE_NON_TEXTURE_START_INDEX
= int(eNORMAL) [static] |
The start index of non-texture type layer elements.
Definition at line 154 of file kfbxlayer.h.
const int LAYERELEMENT_TYPE_NON_TEXTURE_END_INDEX
= int(eVISIBILITY) [static] |
The end index of non-texture type layer elements.
Definition at line 157 of file kfbxlayer.h.
const int LAYERELEMENT_TYPE_NON_TEXTURE_COUNT
= LAYERELEMENT_TYPE_NON_TEXTURE_END_INDEX
- LAYERELEMENT_TYPE_NON_TEXTURE_START_INDEX
+ 1 [static] |
The count of non-texture type layer elements.
Definition at line 160 of file kfbxlayer.h.
const char* const TEXTURE_NAMES[]
[static] |
Array of names of texture type layer elements.
Definition at line 165 of file kfbxlayer.h.
const char* const TEXTURE_UV_NAMES[]
[static] |
Array of names of UV layer elements.
Definition at line 168 of file kfbxlayer.h.
const char* const NON_TEXTURE_NAMES[]
[static] |
Array of names of non-texture type layer elements.
Definition at line 171 of file kfbxlayer.h.
const KFbxDataType TEXTURE_TYPES[]
[static] |
const char* const TEXTURE_CHANNEL_NAMES[]
[static] |
Array of texture channels.
Definition at line 177 of file kfbxlayer.h.
EMappingMode
mMappingMode
[protected] |
Definition at line 309 of file kfbxlayer.h.
EReferenceMode
mReferenceMode
[protected] |
Definition at line 310 of file kfbxlayer.h.
Definition at line 312 of file kfbxlayer.h.
const KFbxDataType* mType
[protected] |
Definition at line 313 of file kfbxlayer.h.
KFbxLayerContainer*
mOwner
[protected] |
Definition at line 314 of file kfbxlayer.h.