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

KFbxNurbsSurface Class Reference

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


Search for all occurrences

Detailed Description

A NURBS surface is a type of parametric geometry.

A NURBS surface is defined by the degree, form, knot vector and control points in the U and V directions.

For more information on the meaning of the form, knot vector and control points, see the documentation for the KFbxNurbsCurve. The same concepts for NURBS curves apply to NURBS surfaces. NURBS surfaces simply have two dimensions (U and V).

Definition at line 60 of file kfbxnurbssurface.h.

#include <kfbxnurbssurface.h>

Inheritance diagram for KFbxNurbsSurface:
Inheritance graph
[legend]

List of all members.

Public Types

enum   EError {
  eNurbTypeUnknown, eWrongNumberOfControlPoint, eWeightTooSmall, eUKnotVectorError,
  eVKnotVectorError, eErrorCount
}
 

Error identifiers.

More...

Public Member Functions

virtual EAttributeType  GetAttributeType () const
  Returns the EAttributeType::eNURBS_SURFACE node attribute type.
void  Reset ()
  Resets the NURBS surface its default values.
bool  IsRational () const
  Checks if the surface has all rational control points.
virtual KFbxObject Copy (const KFbxObject &pObject)
  Copy an object content into this object.
void  SetFlipNormals (bool pFlipNormals)
bool  GetFlipNormals () const
bool  IsValidKnots () const

Protected Member Functions

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

Protected Attributes

kUInt  mUOrder
kUInt  mVOrder
int  mUCount
int  mVCount
int  mUStep
int  mVStep
ENurbType  mUType
ENurbType  mVType
double *  mUKnotVector
double *  mVKnotVector
ESurfaceMode  mSurfaceMode
bool  mApplyFlipUV
bool  mApplyFlipLinks
bool  mFlipNormals

Friends

class  KFbxGeometryConverter

NURBS surface Properties

enum   ENurbType { ePERIODIC, eCLOSED, eOPEN }
 

NURBS types.

More...
void  SetSurfaceMode (KFbxGeometry::ESurfaceMode pMode)
  Sets the surface mode.
ESurfaceMode  GetSurfaceMode () const
  Returns the surface mode.
void  InitControlPoints (int pUCount, ENurbType pUType, int pVCount, ENurbType pVType)
  Allocates memory space for an array of control points as well as knot and multiplicity vectors.
int  GetUCount () const
  Returns the number of U-dimension control points.
int  GetVCount () const
  Returns the number of V-dimension control points.
ENurbType  GetNurbUType () const
  Returns the U-dimension NURBS type.
ENurbType  GetNurbVType () const
  Returns the V-dimension NURBS type.
int  GetUKnotCount () const
  Returns the number of elements in the U-dimension knot vector.
double *  GetUKnotVector () const
  Returns the U-dimension knot vector.
int  GetVKnotCount () const
  Returns the number of elements in the V-dimension knot vector.
double *  GetVKnotVector () const
  Returns the V-dimension knot vector.
void  SetOrder (kUInt pUOrder, kUInt pVOrder)
  Sets the order of the NURBS surface.
int  GetUOrder () const
  Returns the NURBS order in U dimension.
int  GetVOrder () const
  Returns the NURBS order in V dimension.
void  SetStep (int pUStep, int pVStep)
  Sets the NURBS step.
int  GetUStep () const
  Returns the number of divisions between adjacent control points in U dimension.
int  GetVStep () const
  Returns the number of divisions between adjacent control points in V dimension.
int  GetUSpanCount () const
  Calculates the number of surface spans in the U dimension.
int  GetVSpanCount () const
  Calculates the number of surface spans in the V dimension.

NURBS surface Export Flags

void  SetApplyFlipUV (bool pFlag)
  Sets the flag that induces UV flipping at export.
bool  GetApplyFlipUV () const
  Returns the flag that induces UV flipping at export.
void  SetApplyFlipLinks (bool pFlag)
  Sets the flag that induces link flipping at export.
bool  GetApplyFlipLinks () const
  Returns the flag that induces link flipping at export.
bool  GetApplyFlip () const
  Returns flip flags state.
void  AddCurveOnSurface (KFbxNode *pCurve)
  Adds a curve to the NURBS surface.
KFbxNode GetCurveOnSurface (int pIndex)
  Retrieves a curve from this surface.
KFbxNode const *  GetCurveOnSurface (int pIndex) const
  Retrieves a curve from this surface.
int  GetCurveOnSurfaceCount () const
  Returns the number of curves on this surface.
bool  RemoveCurveOnSurface (KFbxNode *pCurve)
  Removes a curve from this surface.

Member Enumeration Documentation

enum ENurbType

NURBS types.

  • ePERIODIC
  • eCLOSED
  • eOPEN
Enumerator:
ePERIODIC 
eCLOSED 
eOPEN 

Definition at line 90 of file kfbxnurbssurface.h.

enum EError

Error identifiers.

Enumerator:
eNurbTypeUnknown 
eWrongNumberOfControlPoint 
eWeightTooSmall 
eUKnotVectorError 
eVKnotVectorError 
eErrorCount 

Reimplemented from KFbxGeometry.

Definition at line 304 of file kfbxnurbssurface.h.

    {
        eNurbTypeUnknown,
        eWrongNumberOfControlPoint,
        eWeightTooSmall,
        //eUMultiplicityVectorError,
        //eVMultiplicityVectorError,
        eUKnotVectorError,
        eVKnotVectorError,
        eErrorCount
    } EError;

Constructor & Destructor Documentation

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

Member Function Documentation

virtual EAttributeType GetAttributeType ( ) const [virtual]

Returns the EAttributeType::eNURBS_SURFACE node attribute type.

Reimplemented from KFbxGeometry.

void Reset ( )

Resets the NURBS surface its default values.

void SetSurfaceMode ( KFbxGeometry::ESurfaceMode  pMode )

Sets the surface mode.

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

Returns the surface mode.

Returns:
The surface mode identifier that is currently set.

Definition at line 83 of file kfbxnurbssurface.h.

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

Allocates memory space for an array of control points as well as knot and multiplicity vectors.

Parameters:
pUCount Number of U-dimension control points.
pUType U-dimension NURBS type.
pVCount Number of V-dimension control points.
pVType V-dimension NURBS type.
Remarks:
Always call this function after KFbxNurb::SetOrder().
int GetUCount ( ) const [inline]

Returns the number of U-dimension control points.

Returns:
Number of U-dimension control points.

Definition at line 110 of file kfbxnurbssurface.h.

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

Returns the number of V-dimension control points.

Returns:
Number of V-dimension control points.

Definition at line 115 of file kfbxnurbssurface.h.

{return mVCount;}
ENurbType GetNurbUType ( ) const [inline]

Returns the U-dimension NURBS type.

Returns:
NURBS type identifier.

Definition at line 120 of file kfbxnurbssurface.h.

{return mUType;}
ENurbType GetNurbVType ( ) const [inline]

Returns the V-dimension NURBS type.

Returns:
NURBS type identifier.

Definition at line 125 of file kfbxnurbssurface.h.

{return mVType;}
int GetUKnotCount ( ) const

Returns the number of elements in the U-dimension knot vector.

See KFbxNurbsCurve for more information.

Returns:
The number of elements in the U-dimension knot vector.
double* GetUKnotVector ( ) const

Returns the U-dimension knot vector.

Returns:
Pointer to the U-dimension knot vector.
int GetVKnotCount ( ) const

Returns the number of elements in the V-dimension knot vector.

See KFbxNurbsCurve for more information.

Returns:
The number of elements in the V-dimension knot vector.
double* GetVKnotVector ( ) const

Returns the V-dimension knot vector.

Returns:
Pointer to the V-dimension knot vector.
void SetOrder ( kUInt  pUOrder,
kUInt  pVOrder 
)

Sets the order of the NURBS surface.

Parameters:
pUOrder NURBS order in U dimension.
pVOrder NURBS order in V dimension.
int GetUOrder ( ) const [inline]

Returns the NURBS order in U dimension.

Returns:
NURBS order in U dimension.

Definition at line 156 of file kfbxnurbssurface.h.

{return mUOrder;}
int GetVOrder ( ) const [inline]

Returns the NURBS order in V dimension.

Returns:
NURBS order in V dimension.

Definition at line 161 of file kfbxnurbssurface.h.

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

Sets the NURBS step.

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

Parameters:
pUStep Steps in U dimension.
pVStep Steps in V dimension.
int GetUStep ( ) const [inline]

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

Returns:
Steps in U dimension.

Definition at line 173 of file kfbxnurbssurface.h.

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

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

Returns:
Steps in V dimension.

Definition at line 178 of file kfbxnurbssurface.h.

{return mVStep;}
int GetUSpanCount ( ) const

Calculates the number of surface spans in the U dimension.

See KFbxNurbsCurve::GetSpanCount() for more information.

Returns:
The number of spans in the U dimension if the surface has been initialized. If the spans have not been initialized, returns -1.
int GetVSpanCount ( ) const

Calculates the number of surface spans in the V dimension.

See KFbxNurbsCurve::GetSpanCount() for more information.

Returns:
The number of spans in the V dimension if the surface has been initialized. If the spans have not been initialized, returns -1.
void SetApplyFlipUV ( bool  pFlag )

Sets the flag that induces UV flipping at export.

Parameters:
pFlag If true, UV flipping occurs.
bool GetApplyFlipUV ( ) const

Returns the flag that induces UV flipping at export.

Returns:
The current state of the UV flip flag.
void SetApplyFlipLinks ( bool  pFlag )

Sets the flag that induces link flipping at export.

Parameters:
pFlag If true, the links control points indices are flipped.
bool GetApplyFlipLinks ( ) const

Returns the flag that induces link flipping at export.

Returns:
The current state of the link flip flag.
bool GetApplyFlip ( ) const [inline]

Returns flip flags state.

Returns:
True if we need to flip either the UV or the links.

Definition at line 224 of file kfbxnurbssurface.h.

{ return GetApplyFlipUV() || GetApplyFlipLinks(); }
void AddCurveOnSurface ( KFbxNode pCurve )

Adds a curve to the NURBS surface.

Adds a 2D, parametric space curve to this surface

Parameters:
pCurve The curve to be added to the surface.
KFbxNode* GetCurveOnSurface ( int  pIndex )

Retrieves a curve from this surface.

Parameters:
pIndex Index of the curve to retrieve (Valid range is 0 to GetCurveOnSurfaceCount() - 1).
Returns:
The curve at the specified index, or returns NULL if pIndex is out of range.
KFbxNode const* GetCurveOnSurface ( int  pIndex ) const

Retrieves a curve from this surface.

Parameters:
pIndex Index of the curve to retrieve (Valid range is 0 to GetCurveOnSurfaceCount() - 1).
Returns:
The curve at the specified index, or returns NULL if pIndex is out of range.
int GetCurveOnSurfaceCount ( ) const

Returns the number of curves on this surface.

Returns:
The number of curves on this surface.
bool RemoveCurveOnSurface ( KFbxNode pCurve )

Removes a curve from this surface.

Parameters:
pCurve The curve to be removed.
Returns:
True if the curve is removed successfully, if unsuccessful, returns false.
bool IsRational ( ) const

Checks if the surface has all rational control points.

Returns:
True if rational, false otherwise
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.

void SetFlipNormals ( bool  pFlipNormals )
bool GetFlipNormals ( ) const
bool IsValidKnots ( ) const
virtual void Destruct ( bool  pRecursive,
bool  pDependents 
) [protected, virtual]

Friends And Related Function Documentation

friend class KFbxGeometryConverter [friend]

Reimplemented from KFbxGeometryBase.

Definition at line 317 of file kfbxnurbssurface.h.


Member Data Documentation

kUInt mUOrder [protected]

Definition at line 283 of file kfbxnurbssurface.h.

kUInt mVOrder [protected]

Definition at line 283 of file kfbxnurbssurface.h.

int mUCount [protected]

Definition at line 284 of file kfbxnurbssurface.h.

int mVCount [protected]

Definition at line 284 of file kfbxnurbssurface.h.

int mUStep [protected]

Definition at line 285 of file kfbxnurbssurface.h.

int mVStep [protected]

Definition at line 285 of file kfbxnurbssurface.h.

ENurbType mUType [protected]

Definition at line 286 of file kfbxnurbssurface.h.

ENurbType mVType [protected]

Definition at line 286 of file kfbxnurbssurface.h.

double* mUKnotVector [protected]

Definition at line 288 of file kfbxnurbssurface.h.

double* mVKnotVector [protected]

Definition at line 289 of file kfbxnurbssurface.h.

Definition at line 294 of file kfbxnurbssurface.h.

bool mApplyFlipUV [protected]

Definition at line 297 of file kfbxnurbssurface.h.

bool mApplyFlipLinks [protected]

Definition at line 298 of file kfbxnurbssurface.h.

bool mFlipNormals [protected]

Definition at line 300 of file kfbxnurbssurface.h.


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

KFbxNurbsSurface KFbxNurbsSurface KFbxNurbsSurface KFbxNurbsSurface KFbxNurbsSurface KFbxNurbsSurface KFbxNurbsSurface KFbxNurbsSurface KFbxNurbsSurface KFbxNurbsSurface
KFbxNurbsSurface KFbxNurbsSurface KFbxNurbsSurface KFbxNurbsSurface KFbxNurbsSurface KFbxNurbsSurface KFbxNurbsSurface KFbxNurbsSurface KFbxNurbsSurface KFbxNurbsSurface