ON_BezierSurface Class Reference

#include <opennurbs_bezier.h>

Public Member Functions

 ON_BezierSurface ()
 
 ON_BezierSurface (int dim, bool is_rat, int order0, int order1)
 
 ON_BezierSurface (const ON_BezierSurface &)
 
 ON_BezierSurface (const ON_PolynomialSurface &)
 
 ~ON_BezierSurface ()
 
ON_BoundingBox BoundingBox () const
 
bool Create (int dim, bool is_rat, int order0, int order1)
 
double * CV (int cv_index0, int cv_index1) const
 Expert user function to get a pointer to control vertex memory. If you are not an expert user, please use ON_BezierSurface::GetCV( ON_3dPoint& ) or ON_BezierSurface::GetCV( ON_4dPoint& ). More...
 
int CVSize () const
 
ON::point_style CVStyle () const
 Returns the style of control vertices in the m_cv array. More...
 
int Degree (int) const
 
void Destroy ()
 
int Dimension () const
 
ON_Interval Domain (int) const
 
void Dump (ON_TextLog &) const
 
void EmergencyDestroy ()
 
bool Evaluate (double, double, int, int, double *) const
 
bool GetBBox (double *, double *, bool bGrowBox=false) const
 
bool GetBoundingBox (ON_BoundingBox &bbox, int bGrowBox) const
 
bool GetCV (int, int, ON::point_style, double *) const
 
bool GetCV (int, int, ON_3dPoint &) const
 
bool GetCV (int, int, ON_4dPoint &) const
 
int GetNurbForm (ON_NurbsSurface &) const
 
bool GetSurfaceSize (double *width, double *height) const
 Get an estimate of the size of the rectangle that would be created if the 3d surface where flattened into a rectangle. More...
 
ON_BezierCurveIsoCurve (int dir, double c, ON_BezierCurve *iso=nullptr) const
 returns the isocurve. More...
 
bool IsRational () const
 
bool IsSingular (int) const
 
bool IsValid () const
 
bool Loft (const ON_ClassArray< ON_BezierCurve > &curve_list)
 Loft a bezier surface through a list of bezier curves. More...
 
bool Loft (int count, const ON_BezierCurve *const *curve_list)
 Loft a bezier surface through a list of bezier curves. More...
 
bool MakeNonRational ()
 
bool MakeRational ()
 
ON_BezierSurfaceoperator= (const ON_BezierSurface &)
 
ON_BezierSurfaceoperator= (const ON_PolynomialSurface &)
 
int Order (int) const
 
ON_3dPoint PointAt (double s, double t) const
 
bool ReserveCVCapacity (int)
 Tools for managing CV and knot memory. More...
 
bool Reverse (int)
 
bool Rotate (double sin_angle, double cos_angle, const ON_3dVector &rotation_axis, const ON_3dPoint &rotation_center)
 Rotates the bezier surface about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule). More...
 
bool Rotate (double rotation_angle, const ON_3dVector &rotation_axis, const ON_3dPoint &rotation_center)
 Rotates the bezier surface about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule). More...
 
bool Scale (double scale_factor)
 Scales the bezier surface by the specified facotor. The scale is centered at the origin. More...
 
bool SetCV (int, int, ON::point_style, const double *)
 
bool SetCV (int, int, const ON_3dPoint &)
 
bool SetCV (int, int, const ON_4dPoint &)
 
bool SetWeight (int, int, double)
 
bool Split (int, double, ON_BezierSurface &, ON_BezierSurface &) const
 
bool Transform (const ON_Xform &)
 
bool Translate (const ON_3dVector &translation_vector)
 Translates the bezier surface along the specified vector. More...
 
bool Transpose ()
 
bool Trim (int dir, const ON_Interval &domain)
 
double Weight (int, int) const
 
bool ZeroCVs ()
 

Public Attributes

double * m_cv
 
int m_cv_capacity
 
int m_cv_stride [2]
 
int m_dim
 Implementation. More...
 
int m_is_rat
 
int m_order [2]
 

Constructor & Destructor Documentation

◆ ON_BezierSurface() [1/4]

ON_BezierSurface::ON_BezierSurface ( )

◆ ON_BezierSurface() [2/4]

ON_BezierSurface::ON_BezierSurface ( int  dim,
bool  is_rat,
int  order0,
int  order1 
)

◆ ~ON_BezierSurface()

ON_BezierSurface::~ON_BezierSurface ( )

◆ ON_BezierSurface() [3/4]

ON_BezierSurface::ON_BezierSurface ( const ON_BezierSurface )

◆ ON_BezierSurface() [4/4]

ON_BezierSurface::ON_BezierSurface ( const ON_PolynomialSurface )

Member Function Documentation

◆ BoundingBox()

ON_BoundingBox ON_BezierSurface::BoundingBox ( ) const

◆ Create()

bool ON_BezierSurface::Create ( int  dim,
bool  is_rat,
int  order0,
int  order1 
)

◆ CV()

double* ON_BezierSurface::CV ( int  cv_index0,
int  cv_index1 
) const

Expert user function to get a pointer to control vertex memory. If you are not an expert user, please use ON_BezierSurface::GetCV( ON_3dPoint& ) or ON_BezierSurface::GetCV( ON_4dPoint& ).

Parameters
cv_index0[in] (0 <= cv_index0 < m_order[0])
cv_index1[in] (0 <= cv_index1 < m_order[1])
Returns
Pointer to control vertex.

If the Bezier surface is rational, the format of the returned array is a homogeneos rational point with length m_dim+1. If the Bezier surface is not rational, the format of the returned array is a nonrational euclidean point with length m_dim. See Also ON_BezierSurface::CVStyle ON_BezierSurface::GetCV ON_BezierSurface::Weight

◆ CVSize()

int ON_BezierSurface::CVSize ( ) const

◆ CVStyle()

ON::point_style ON_BezierSurface::CVStyle ( ) const

Returns the style of control vertices in the m_cv array.

Returns
table ON::not_rational m_is_rat is false ON::homogeneous_rational m_is_rat is true

◆ Degree()

int ON_BezierSurface::Degree ( int  ) const

◆ Destroy()

void ON_BezierSurface::Destroy ( )

◆ Dimension()

int ON_BezierSurface::Dimension ( ) const

◆ Domain()

ON_Interval ON_BezierSurface::Domain ( int  ) const

◆ Dump()

void ON_BezierSurface::Dump ( ON_TextLog ) const

◆ EmergencyDestroy()

void ON_BezierSurface::EmergencyDestroy ( )

◆ Evaluate()

bool ON_BezierSurface::Evaluate ( double  ,
double  ,
int  ,
int  ,
double *   
) const

◆ GetBBox()

bool ON_BezierSurface::GetBBox ( double *  ,
double *  ,
bool  bGrowBox = false 
) const

◆ GetBoundingBox()

bool ON_BezierSurface::GetBoundingBox ( ON_BoundingBox bbox,
int  bGrowBox 
) const

◆ GetCV() [1/3]

bool ON_BezierSurface::GetCV ( int  ,
int  ,
ON::point_style  ,
double *   
) const

◆ GetCV() [2/3]

bool ON_BezierSurface::GetCV ( int  ,
int  ,
ON_3dPoint  
) const

◆ GetCV() [3/3]

bool ON_BezierSurface::GetCV ( int  ,
int  ,
ON_4dPoint  
) const

◆ GetNurbForm()

int ON_BezierSurface::GetNurbForm ( ON_NurbsSurface ) const
Returns
0 = failure. 1 = success.

◆ GetSurfaceSize()

bool ON_BezierSurface::GetSurfaceSize ( double *  width,
double *  height 
) const

Get an estimate of the size of the rectangle that would be created if the 3d surface where flattened into a rectangle.

Parameters
width[out] (corresponds to the first surface parameter)
height[out] (corresponds to the first surface parameter)
Returns
true if successful.

◆ IsoCurve()

ON_BezierCurve* ON_BezierSurface::IsoCurve ( int  dir,
double  c,
ON_BezierCurve iso = nullptr 
) const

returns the isocurve.

◆ IsRational()

bool ON_BezierSurface::IsRational ( ) const

◆ IsSingular()

bool ON_BezierSurface::IsSingular ( int  ) const

◆ IsValid()

bool ON_BezierSurface::IsValid ( ) const

◆ Loft() [1/2]

bool ON_BezierSurface::Loft ( const ON_ClassArray< ON_BezierCurve > &  curve_list)

Loft a bezier surface through a list of bezier curves.

Parameters
curve_list[in] list of curves that have the same degree.
Returns
True if successful.

◆ Loft() [2/2]

bool ON_BezierSurface::Loft ( int  count,
const ON_BezierCurve *const *  curve_list 
)

Loft a bezier surface through a list of bezier curves.

Parameters
curve_count[in] number of curves in curve_list
curve_list[in] array of pointers to curves that have the same degree.
Returns
True if successful.

◆ MakeNonRational()

bool ON_BezierSurface::MakeNonRational ( )

◆ MakeRational()

bool ON_BezierSurface::MakeRational ( )

◆ operator=() [1/2]

ON_BezierSurface& ON_BezierSurface::operator= ( const ON_BezierSurface )

◆ operator=() [2/2]

ON_BezierSurface& ON_BezierSurface::operator= ( const ON_PolynomialSurface )

◆ Order()

int ON_BezierSurface::Order ( int  ) const

◆ PointAt()

ON_3dPoint ON_BezierSurface::PointAt ( double  s,
double  t 
) const

◆ ReserveCVCapacity()

bool ON_BezierSurface::ReserveCVCapacity ( int  )

Tools for managing CV and knot memory.

◆ Reverse()

bool ON_BezierSurface::Reverse ( int  )

◆ Rotate() [1/2]

bool ON_BezierSurface::Rotate ( double  sin_angle,
double  cos_angle,
const ON_3dVector rotation_axis,
const ON_3dPoint rotation_center 
)

Rotates the bezier surface about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule).

Parameters
sin_angle[in] sine of rotation angle
cos_angle[in] sine of rotation angle
rotation_axis[in] direction of the axis of rotation
rotation_center[in] point on the axis of rotation
Returns
true if bezier surface successfully rotated

Uses ON_BezierSurface::Transform() function to calculate the result.

◆ Rotate() [2/2]

bool ON_BezierSurface::Rotate ( double  rotation_angle,
const ON_3dVector rotation_axis,
const ON_3dPoint rotation_center 
)

Rotates the bezier surface about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule).

Parameters
rotation_angle[in] angle of rotation in radians
rotation_axis[in] direction of the axis of rotation
rotation_center[in] point on the axis of rotation
Returns
true if bezier surface successfully rotated

Uses ON_BezierSurface::Transform() function to calculate the result.

◆ Scale()

bool ON_BezierSurface::Scale ( double  scale_factor)

Scales the bezier surface by the specified facotor. The scale is centered at the origin.

Parameters
scale_factor[in] scale factor
Returns
true if bezier surface successfully scaled

Uses ON_BezierSurface::Transform() function to calculate the result.

◆ SetCV() [1/3]

bool ON_BezierSurface::SetCV ( int  ,
int  ,
ON::point_style  ,
const double *   
)

◆ SetCV() [2/3]

bool ON_BezierSurface::SetCV ( int  ,
int  ,
const ON_3dPoint  
)

◆ SetCV() [3/3]

bool ON_BezierSurface::SetCV ( int  ,
int  ,
const ON_4dPoint  
)

◆ SetWeight()

bool ON_BezierSurface::SetWeight ( int  ,
int  ,
double   
)

◆ Split()

bool ON_BezierSurface::Split ( int  ,
double  ,
ON_BezierSurface ,
ON_BezierSurface  
) const

◆ Transform()

bool ON_BezierSurface::Transform ( const ON_Xform )

◆ Translate()

bool ON_BezierSurface::Translate ( const ON_3dVector translation_vector)

Translates the bezier surface along the specified vector.

Parameters
translation_vector[in] translation vector
Returns
true if bezier surface successfully translated

Uses ON_BezierSurface::Transform() function to calculate the result.

◆ Transpose()

bool ON_BezierSurface::Transpose ( )

◆ Trim()

bool ON_BezierSurface::Trim ( int  dir,
const ON_Interval domain 
)

◆ Weight()

double ON_BezierSurface::Weight ( int  ,
int   
) const

◆ ZeroCVs()

bool ON_BezierSurface::ZeroCVs ( )

Member Data Documentation

◆ m_cv

double* ON_BezierSurface::m_cv

◆ m_cv_capacity

int ON_BezierSurface::m_cv_capacity

◆ m_cv_stride

int ON_BezierSurface::m_cv_stride[2]

◆ m_dim

int ON_BezierSurface::m_dim

Implementation.

◆ m_is_rat

int ON_BezierSurface::m_is_rat

◆ m_order

int ON_BezierSurface::m_order[2]