Public Member Functions | Protected Member Functions | Protected Attributes

KFbxPatch Class Reference

This reference page is linked to from the following overview topics: FBX Node Attributes, Geometry, List of Python FBX classes.


Search for all occurrences

Detailed Description

A patch is a type of node attribute with parametric surface.

A patch object is useful for creating gently curved surfaces, and provides very detailed control for manipulating complex geometry.

Examples:

ExportScene01/main.cxx, and ImportScene/DisplayPatch.cxx.

Definition at line 53 of file kfbxpatch.h.

#include <kfbxpatch.h>

Inheritance diagram for KFbxPatch:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual EAttributeType  GetAttributeType () const
  Returns the EAttributeType::ePATCH node attribute type.
void  Reset ()
  Resets the patch to its default values.
virtual KFbxObject Copy (const KFbxObject &pObject)
  Copy an object content into this object.

Protected Member Functions

  KFbxPatch (KFbxSdkManager &pManager, char const *pName)
virtual void  Destruct (bool pRecursive, bool pDependents)

Protected Attributes

EPatchType  mUType
EPatchType  mVType
int  mUCount
int  mVCount
int  mUStep
int  mVStep
bool  mUClosed
bool  mVClosed
bool  mUCappedBottom
bool  mUCappedTop
bool  mVCappedBottom
bool  mVCappedTop
KFbxGeometry::ESurfaceMode  mSurfaceMode

Patch Properties

enum   EPatchType {
  eBEZIER = 0, eBEZIER_QUADRIC = 1, eCARDINAL = 2, eBSPLINE = 3,
  eLINEAR = 4
}
 

Patch types.

More...
void  SetSurfaceMode (KFbxGeometry::ESurfaceMode pMode)
  Sets the surface mode.
KFbxGeometry::ESurfaceMode  GetSurfaceMode () const
  Returns the surface mode.
void  InitControlPoints (int pUCount, EPatchType pUType, int pVCount, EPatchType pVType)
  Allocates memory space for the control points array.
int  GetUCount () const
  Returns the number of control points in the U-dimension.
int  GetVCount () const
  Returns the number of control points in the V-dimension.
EPatchType  GetPatchUType () const
  Returns the U-dimension patch type.
EPatchType  GetPatchVType () const
  Returns the V-dimension patch type.
void  SetStep (int pUStep, int pVStep)
  Sets the patch step.
int  GetUStep () const
  Returns the number of divisions between adjacent control points in the U-dimension.
int  GetVStep () const
  Returns the number of divisions between adjacent control points in the V-dimension.
void  SetClosed (bool pU, bool pV)
  Sets closed flags.
bool  GetUClosed () const
  Returns state of the U closed flag.
bool  GetVClosed () const
  Returns state of the V closed flag.
void  SetUCapped (bool pUBottom, bool pUTop)
  Sets U-capped flags.
bool  GetUCappedBottom () const
  Returns state of the bottom U-capped flag.
bool  GetUCappedTop () const
  Returns state of the top U-capped flag.
void  SetVCapped (bool pVBottom, bool pVTop)
  Sets V-capped flags.
bool  GetVCappedBottom () const
  Returns state of the bottom V-capped flag.
bool  GetVCappedTop () const
  Returns state of the top V-capped flag.

Off-loading Serialization section

virtual bool  ContentWriteTo (KFbxStream &pStream) const
  Writes the content of the patch to the given stream.
virtual bool  ContentReadFrom (const KFbxStream &pStream)
  Reads the content of the patch from the given stream.

Member Enumeration Documentation

enum EPatchType

Patch types.

  • eBEZIER
  • eBEZIER_QUADRIC
  • eCARDINAL
  • eBSPLINE
  • eLINEAR
Enumerator:
eBEZIER 
eBEZIER_QUADRIC 
eCARDINAL 
eBSPLINE 
eLINEAR 

Definition at line 86 of file kfbxpatch.h.


Constructor & Destructor Documentation

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

Member Function Documentation

virtual EAttributeType GetAttributeType ( ) const [virtual]

Returns the EAttributeType::ePATCH node attribute type.

Reimplemented from KFbxGeometry.

void Reset ( )

Resets the patch to its default values.

void SetSurfaceMode ( KFbxGeometry::ESurfaceMode  pMode )

Sets the surface mode.

Parameters:
pMode Surface mode identifier (see Class KFbxGeometry).
KFbxGeometry::ESurfaceMode GetSurfaceMode ( ) const [inline]

Returns the surface mode.

Returns:
The current surface mode identifier.
Examples:
ImportScene/DisplayPatch.cxx.

Definition at line 77 of file kfbxpatch.h.

{return mSurfaceMode;}
void InitControlPoints ( int  pUCount,
EPatchType  pUType,
int  pVCount,
EPatchType  pVType 
)

Allocates memory space for the control points array.

Parameters:
pUCount Number of U-dimension control points.
pUType U-dimension patch type.
pVCount Number of V-dimension control points.
pVType V-dimension patch type.
Examples:
ExportScene01/main.cxx.
int GetUCount ( ) const [inline]

Returns the number of control points in the U-dimension.

Returns:
The number of control points in the U-dimension.
Examples:
ImportScene/DisplayPatch.cxx.

Definition at line 106 of file kfbxpatch.h.

{return mUCount;}
int GetVCount ( ) const [inline]

Returns the number of control points in the V-dimension.

Returns:
The number of control points in the V-dimension.
Examples:
ImportScene/DisplayPatch.cxx.

Definition at line 111 of file kfbxpatch.h.

{return mVCount;}
EPatchType GetPatchUType ( ) const [inline]

Returns the U-dimension patch type.

Returns:
Patch type identifier in the U-dimension.
Examples:
ImportScene/DisplayPatch.cxx.

Definition at line 116 of file kfbxpatch.h.

{return mUType;}
EPatchType GetPatchVType ( ) const [inline]

Returns the V-dimension patch type.

Returns:
Patch type identifier in the V-dimension.
Examples:
ImportScene/DisplayPatch.cxx.

Definition at line 121 of file kfbxpatch.h.

{return mVType;}
void SetStep ( int  pUStep,
int  pVStep 
)

Sets the patch step.

The step is the number of divisions between adjacent control points.

Parameters:
pUStep Steps in U-dimension.
pVStep Steps in V-dimension.
Examples:
ExportScene01/main.cxx.
int GetUStep ( ) const [inline]

Returns the number of divisions between adjacent control points in the U-dimension.

Returns:
Step value in the U-dimension.
Examples:
ImportScene/DisplayPatch.cxx.

Definition at line 133 of file kfbxpatch.h.

{return mUStep;}
int GetVStep ( ) const [inline]

Returns the number of divisions between adjacent control points in the V-dimension.

Returns:
Step value in the V-dimension.
Examples:
ImportScene/DisplayPatch.cxx.

Definition at line 138 of file kfbxpatch.h.

{return mVStep;}
void SetClosed ( bool  pU,
bool  pV 
)

Sets closed flags.

Parameters:
pU Set to true if the patch is closed in U dimension.
pV Set to true if the patch is closed in V dimension.
Examples:
ExportScene01/main.cxx.
bool GetUClosed ( ) const [inline]

Returns state of the U closed flag.

Returns:
True if the patch is closed in U dimension.
Examples:
ImportScene/DisplayPatch.cxx.

Definition at line 149 of file kfbxpatch.h.

{return mUClosed;}
bool GetVClosed ( ) const [inline]

Returns state of the V closed flag.

Returns:
True if the patch is closed in V dimension.
Examples:
ImportScene/DisplayPatch.cxx.

Definition at line 154 of file kfbxpatch.h.

{return mVClosed;}
void SetUCapped ( bool  pUBottom,
bool  pUTop 
)

Sets U-capped flags.

Parameters:
pUBottom Set to true if the patch is capped at the bottom in the U-dimension.
pUTop Set to true if the patch is capped on the top in the U-dimension.
Remarks:
Capping options are saved but not loaded by Motionbuilder because they are computed from the patch topography.
bool GetUCappedBottom ( ) const [inline]

Returns state of the bottom U-capped flag.

Returns:
True if the patch is capped at the bottom in the U-dimension.
Examples:
ImportScene/DisplayPatch.cxx.

Definition at line 167 of file kfbxpatch.h.

{return mUCappedBottom;}
bool GetUCappedTop ( ) const [inline]

Returns state of the top U-capped flag.

Returns:
True if the patch is capped on the top in the U-dimension.
Examples:
ImportScene/DisplayPatch.cxx.

Definition at line 172 of file kfbxpatch.h.

{return mUCappedTop;}
void SetVCapped ( bool  pVBottom,
bool  pVTop 
)

Sets V-capped flags.

Parameters:
pVBottom Sets to true if the patch is capped at the bottom in the V-dimension.
pVTop Sets to true if the patch is capped on the top in the V-dimension.
Remarks:
Capping options are saved but not loaded by Motionbuilder because they are computed from the patch topography.
bool GetVCappedBottom ( ) const [inline]

Returns state of the bottom V-capped flag.

Returns:
True if the patch is capped at the bottom.
Examples:
ImportScene/DisplayPatch.cxx.

Definition at line 185 of file kfbxpatch.h.

{return mVCappedBottom;}
bool GetVCappedTop ( ) const [inline]

Returns state of the top V-capped flag.

Returns:
True if the patch is capped on the top.
Examples:
ImportScene/DisplayPatch.cxx.

Definition at line 190 of file kfbxpatch.h.

{return mVCappedTop;}
virtual bool ContentWriteTo ( KFbxStream pStream ) const [virtual]

Writes the content of the patch to the given stream.

Parameters:
pStream The destination stream.
Returns:
True if the content is successfully processed by the receiving stream. If it is not successful, returns false.

Reimplemented from KFbxGeometryBase.

virtual bool ContentReadFrom ( const KFbxStream pStream ) [virtual]

Reads the content of the patch from the given stream.

Parameters:
pStream The source stream.
Returns:
True if the patch completes with the data received from the stream successfully. If it is not successful, returns false.

Reimplemented from KFbxGeometryBase.

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

virtual void Destruct ( bool  pRecursive,
bool  pDependents 
) [protected, virtual]

Member Data Documentation

EPatchType mUType [protected]

Definition at line 234 of file kfbxpatch.h.

EPatchType mVType [protected]

Definition at line 234 of file kfbxpatch.h.

int mUCount [protected]

Definition at line 235 of file kfbxpatch.h.

int mVCount [protected]

Definition at line 235 of file kfbxpatch.h.

int mUStep [protected]

Definition at line 236 of file kfbxpatch.h.

int mVStep [protected]

Definition at line 236 of file kfbxpatch.h.

bool mUClosed [protected]

Definition at line 237 of file kfbxpatch.h.

bool mVClosed [protected]

Definition at line 237 of file kfbxpatch.h.

bool mUCappedBottom [protected]

Definition at line 238 of file kfbxpatch.h.

bool mUCappedTop [protected]

Definition at line 238 of file kfbxpatch.h.

bool mVCappedBottom [protected]

Definition at line 239 of file kfbxpatch.h.

bool mVCappedTop [protected]

Definition at line 239 of file kfbxpatch.h.

Definition at line 241 of file kfbxpatch.h.


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

KFbxPatch KFbxPatch KFbxPatch KFbxPatch KFbxPatch KFbxPatch KFbxPatch KFbxPatch KFbxPatch KFbxPatch
KFbxPatch KFbxPatch KFbxPatch KFbxPatch KFbxPatch KFbxPatch KFbxPatch KFbxPatch KFbxPatch KFbxPatch