#include <xsi_nurbssample.h>
The NurbsSample object gives access to the NurbsSurfaceMesh sample geometry.
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());
}
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 |
| NurbsSample | ( | ) |
Default constructor.
| ~NurbsSample | ( | ) |
Default destructor.
| NurbsSample | ( | const CRef & | in_ref | ) |
Constructor.
| in_ref | constant reference object. |
| NurbsSample | ( | const NurbsSample & | in_obj | ) |
Copy constructor.
| in_obj | constant class object. |
| bool IsA | ( | siClassID | in_ClassID | ) | const [virtual] |
Returns true if a given class type is compatible with this API class.
| in_ClassID | class type. |
Reimplemented from Sample.
| siClassID GetClassID | ( | ) | const [virtual] |
| 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.
| in_obj | constant class 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.
| in_ref | constant class object. |
Reimplemented from Sample.
| CStatus GetU | ( | double & | out_dUValue | ) | const |
Returns the U position value of this Sample on the NurbsSurface.
| out_dUValue | The U position value. |
| CStatus GetV | ( | double & | out_dVValue | ) | const |
Returns the V position value of this Sample on the NurbsSurface.
| out_dVValue | The V position value. |
| CStatus GetUSamplingCoordinate | ( | LONG & | out_lUSamplingCoordinate | ) | const |
Returns the U value of the sampling coordinate local to the NurbsSurface.
| out_lUSamplingCoordinate | The U sampling coordinate. |
| CStatus GetVSamplingCoordinate | ( | LONG & | out_lVSamplingCoordinate | ) | const |
Returns the V value of the sampling coordinate local to the NurbsSurface.
| out_lVSamplingCoordinate | The V sampling coordinate. |
| CStatus GetUNormalized | ( | double & | out_dUNormalizedValue | ) | const |
Returns the U normalized value of this Sample on the NurbsSurface
| out_dUNormalizedValue | The U normalized position value. |
| CStatus GetVNormalized | ( | double & | out_dVNormalizedValue | ) | const |
Returns the V normalized value of this Sample on the NurbsSurface
| out_dVNormalizedValue | The V normalized position value. |