ControlPoint Class Reference
 
 
 
ControlPoint Class Reference

#include <xsi_controlpoint.h>


Class Description

The ControlPoint of a NurbsSurface or a NurbsCurve.

See also:
NurbsCurve""GetControlPoints, NurbsSurface::GetControlPoints, CControlPointRefArray
Example:
Shows how to set create a NurbsCurve without knots.
                using namespace XSI;
                using namespace MATH;
                Application app;
                Model root = app.GetActiveSceneRoot();

                X3DObject arc;
                root.AddGeometry(L"Arc",L"NurbsCurve",L"",arc);

                NurbsCurveList curveList = arc.GetActivePrimitive().GetGeometry();

                NurbsCurve curve = curveList.GetCurves().GetItem(0);

                CControlPointRefArray cpArray = curve.GetControlPoints();

                CNurbsCurveData curveData;
                curveData.m_aControlPoints.Resize(cpArray.GetCount());

                for(LONG i = 0;i < cpArray.GetCount();++i)
                {
                        ControlPoint cp = cpArray.GetItem(i);
                        curveData.m_aControlPoints[i].Set(      cp.GetX(),
                                                                                                cp.GetY(),
                                                                                                cp.GetZ(),
                                                                                                cp.GetW());
                }

                X3DObject arcCopyWithoutKnots;
                root.AddNurbsCurve(curveData,siSINurbs,L"",arcCopyWithoutKnots);
Inheritance diagram for ControlPoint:
Point SIObject CBase

List of all members.

Public Member Functions

  ControlPoint ()
  ~ControlPoint ()
  ControlPoint (const CRef &in_ref)
  ControlPoint (const ControlPoint &in_obj)
bool  IsA (siClassID in_ClassID) const
siClassID  GetClassID () const
ControlPoint operator= (const ControlPoint &in_obj)
ControlPoint operator= (const CRef &in_ref)
double  GetX () const
CStatus  PutX (double in_dX)
double  GetY () const
CStatus  PutY (double in_dY)
double  GetZ () const
CStatus  PutZ (double in_dZ)
double  GetW () const
CStatus  PutW (double in_dW)
bool  GetIsBoundary () const

Constructor & Destructor Documentation

Default constructor.

Default destructor.

ControlPoint ( const CRef in_ref )

Constructor.

Parameters:
in_ref constant reference object.
ControlPoint ( const ControlPoint 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 Point.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

Returns:
The class type.

Reimplemented from Point.

ControlPoint& operator= ( const ControlPoint 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 PolygonFace object.
ControlPoint& 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 PolygonFace object.

Reimplemented from Point.

double GetX ( ) const

Returns the X value of this ControlPoint.

Returns:
The X value or DBL_MAX if it fails.
CStatus PutX ( double  in_dX )

Sets the X value of this ControlPoint. The value can only be set from within a compiled operator or if there's no operator connected to this geometry.

Parameters:
in_dX The new X value.
Returns:
CStatus::OK success
CStatus::AccessDenied function used outside of a plug-in operator context.
double GetY ( ) const

Returns the Y value of this ControlPoint.

Returns:
The Y value or DBL_MAX if it fails.
CStatus PutY ( double  in_dY )

Sets the Y value of this ControlPoint. The value can only be set from within a compiled operator or if there's no operator connected to this geometry.

Parameters:
in_dY The new Y value.
Returns:
CStatus::OK success
CStatus::AccessDenied function used outside of a plug-in operator context.
double GetZ ( ) const

Returns the Z value of this ControlPoint.

Returns:
The Z value or DBL_MAX if it fails.
CStatus PutZ ( double  in_dZ )

Sets the Z value of this ControlPoint. The value can only be set from within a compiled operator or if there's no operator connected to this geometry.

Parameters:
in_dZ The new Z value.
Returns:
CStatus::OK success
CStatus::AccessDenied function used outside of a plug-in operator context.
double GetW ( ) const

Returns the W value of this ControlPoint.

Returns:
The W value or DBL_MAX if it fails.
CStatus PutW ( double  in_dW )

Sets the W value of this ControlPoint. The value can only be set from within a compiled operator or if there's no operator connected to this geometry.

Parameters:
in_dW The new W value.
Returns:
CStatus::OK success
CStatus::AccessDenied function used outside of a plug-in operator context.
bool GetIsBoundary ( ) const

Returns whether the control point is a boundary or not.

Returns:
True if the control point is a boundary, false if not.
Since:
4.2

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