NurbsSample Class Reference



Your Ad Here

Related Scripting Object: NurbsSample

The NurbsSample object gives access to the NurbsSurfaceMesh sample geometry. More...

#include <xsi_nurbssample.h>

Inheritance diagram for NurbsSample:

Sample SIObject CBase List of all members.

Public Member Functions

  NurbsSample ()
  ~NurbsSample ()
  NurbsSample (const CRef &in_ref)
  NurbsSample (const NurbsSample &in_obj)
bool  IsA (siClassID in_ClassID) const
siClassID  GetClassID () const
NurbsSample operator= (const NurbsSample &in_obj)
NurbsSample operator= (const CRef &in_ref)
CStatus  GetU (double &out_dUValue) const
CStatus  GetV (double &out_dVValue) const
CStatus  GetUSamplingCoordinate (LONG &out_lUSamplingCoordinate) const
CStatus  GetVSamplingCoordinate (LONG &out_lVSamplingCoordinate) const
CStatus  GetUNormalized (double &out_dUNormalizedValue) const
CStatus  GetVNormalized (double &out_dVNormalizedValue) const

Detailed Description

The NurbsSample object gives access to the NurbsSurfaceMesh sample geometry.

See also:
NurbsSurface::GetNurbsSamples, Sample, CNurbsSampleRefArray
Example:
        using namespace XSI;

        Application app;
        Model root = app.GetActiveSceneRoot();

        X3DObject mySphere;
        root.AddGeometry( L"Sphere", L"NurbsSurface", L"", mySphere );

        NurbsSurfaceMesh mySurfaceMesh(mySphere.GetActivePrimitive().GetGeometry());

        CNurbsSurfaceRefArray surfaces = mySurfaceMesh.GetSurfaces();

        NurbsSurface mySurface = surfaces.GetItem(0);

        CNurbsSampleRefArray mySamples = mySurface.GetNurbsSamples();

        double dU,dV;
        for(LONG i = 0;i < mySamples.GetCount(); ++i)
        {
            NurbsSample sample(mySamples[i]);
            sample.GetU(dU);
            sample.GetV(dV);

            app.LogMessage(L"The U and V value for this sample are " +
                        CValue(dU).GetAsText() + L" " + CValue(dV).GetAsText());
        }


Constructor & Destructor Documentation

NurbsSample (  ) 

Default constructor.

~NurbsSample (  ) 

Default destructor.

NurbsSample ( const CRef in_ref  ) 

Constructor.

Parameters:
in_ref  constant reference object.

NurbsSample ( const NurbsSample in_obj  ) 

Copy constructor.

Parameters:
in_obj  constant class object.


Member Function Documentation

bool IsA ( siClassID  in_ClassID  )  const [virtual]

Returns true if a given class type is compatible with this API class.

Parameters:
in_ClassID  class type.
Returns:
true if the class is compatible, false otherwise.

Reimplemented from Sample.

siClassID GetClassID (  )  const [virtual]

Returns the type of the API class.

Returns:
The class type.

Reimplemented from Sample.

NurbsSample& operator= ( const NurbsSample in_obj  ) 

Creates an object from another object. The newly created object is set to empty if the input object is not compatible.

Parameters:
in_obj  constant class object.
Returns:
The new NurbsSample object.

NurbsSample& operator= ( const CRef in_ref  ) 

Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.

Parameters:
in_ref  constant class object.
Returns:
The new NurbsSample object.

Reimplemented from Sample.

CStatus GetU ( double &  out_dUValue  )  const

Returns the U position value of this Sample on the NurbsSurface.

Return values:
out_dUValue  The U position value.
Returns:
CStatus::OK success

CStatus::Fail other failure

CStatus GetV ( double &  out_dVValue  )  const

Returns the V position value of this Sample on the NurbsSurface.

Return values:
out_dVValue  The V position value.
Returns:
CStatus::OK success

CStatus::Fail other failure

CStatus GetUSamplingCoordinate ( LONG &  out_lUSamplingCoordinate  )  const

Returns the U value of the sampling coordinate local to the NurbsSurface.

Return values:
out_lUSamplingCoordinate  The U sampling coordinate.
Returns:
CStatus::OK success

CStatus::Fail other failure

CStatus GetVSamplingCoordinate ( LONG &  out_lVSamplingCoordinate  )  const

Returns the V value of the sampling coordinate local to the NurbsSurface.

Return values:
out_lVSamplingCoordinate  The V sampling coordinate.
Returns:
CStatus::OK success

CStatus::Fail other failure

CStatus GetUNormalized ( double &  out_dUNormalizedValue  )  const

Returns the U normalized value of this Sample on the NurbsSurface

Return values:
out_dUNormalizedValue  The U normalized position value.
Returns:
CStatus::OK success

CStatus::Fail other failure

CStatus GetVNormalized ( double &  out_dVNormalizedValue  )  const

Returns the V normalized value of this Sample on the NurbsSurface

Return values:
out_dVNormalizedValue  The V normalized position value.
Returns:
CStatus::OK success

CStatus::Fail other failure


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

Return to Softimage XSI Index


Your Ad Here