Rhino C++ API  8.6
Public Member Functions | Public Attributes | List of all members
ON_Cylinder Class Reference

#include <opennurbs_cylinder.h>

Public Member Functions

 ON_Cylinder ()
 zeros all fields - cylinder is invalid More...
 
 ON_Cylinder (const ON_Circle &)
 
 ON_Cylinder (const ON_Circle &, double)
 
 ~ON_Cylinder ()
 
const ON_3dVectorAxis () const
 
const ON_3dPointCenter () const
 
ON_Circle CircleAt (double) const
 
ON_3dPoint ClosestPointTo (ON_3dPoint) const
 returns point on cylinder that is closest to given point More...
 
bool ClosestPointTo (ON_3dPoint, double *, double *) const
 returns parameters of point on cylinder that is closest to given point More...
 
bool Create (const ON_Circle &)
 
bool Create (const ON_Circle &, double)
 
int GetNurbForm (ON_NurbsSurface &) const
 parameterization of NURBS surface does not match cylinder's transcendental paramaterization More...
 
double Height () const
 returns 0 for infinite cylinder More...
 
bool IsFinite () const
 
bool IsValid () const
 
ON_Line LineAt (double) const
 
ON_3dPoint NormalAt (double, double) const
 
ON_3dPoint PointAt (double, double) const
 evaluate parameters and return point More...
 
ON_RevSurfaceRevSurfaceForm (ON_RevSurface *srf=nullptr) const
 
bool Rotate (double, const ON_3dVector &)
 
bool Rotate (double, const ON_3dVector &, const ON_3dPoint &)
 
bool Rotate (double, double, const ON_3dVector &)
 For intersections see ON_Intersect();. More...
 
bool Rotate (double, double, const ON_3dVector &, const ON_3dPoint &)
 rotate cylinder about a point and axis More...
 
bool Translate (const ON_3dVector &)
 

Public Attributes

ON_Circle circle
 base circle More...
 
double height [2]
 

Detailed Description

Description: ON_Cylinder is a right circular cylinder.

Constructor & Destructor Documentation

◆ ON_Cylinder() [1/3]

ON_Cylinder::ON_Cylinder ( )

zeros all fields - cylinder is invalid

◆ ON_Cylinder() [2/3]

ON_Cylinder::ON_Cylinder ( const ON_Circle )

◆ ON_Cylinder() [3/3]

ON_Cylinder::ON_Cylinder ( const ON_Circle ,
double   
)

◆ ~ON_Cylinder()

ON_Cylinder::~ON_Cylinder ( )

Member Function Documentation

◆ Axis()

const ON_3dVector& ON_Cylinder::Axis ( ) const

◆ Center()

const ON_3dPoint& ON_Cylinder::Center ( ) const

◆ CircleAt()

ON_Circle ON_Cylinder::CircleAt ( double  ) const

◆ ClosestPointTo() [1/2]

ON_3dPoint ON_Cylinder::ClosestPointTo ( ON_3dPoint  ) const

returns point on cylinder that is closest to given point

◆ ClosestPointTo() [2/2]

bool ON_Cylinder::ClosestPointTo ( ON_3dPoint  ,
double *  ,
double *   
) const

returns parameters of point on cylinder that is closest to given point

◆ Create() [1/2]

bool ON_Cylinder::Create ( const ON_Circle )

◆ Create() [2/2]

bool ON_Cylinder::Create ( const ON_Circle ,
double   
)

◆ GetNurbForm()

int ON_Cylinder::GetNurbForm ( ON_NurbsSurface ) const

parameterization of NURBS surface does not match cylinder's transcendental paramaterization

returns 0=failure, 2=success

◆ Height()

double ON_Cylinder::Height ( ) const

returns 0 for infinite cylinder

◆ IsFinite()

bool ON_Cylinder::IsFinite ( ) const

returns true if the cylinder is finite (height[0] != height[1]) and false if the cylinder is infinite.

◆ IsValid()

bool ON_Cylinder::IsValid ( ) const

returns true if all fields contain reasonable information and equation jibes with point and Z.

◆ LineAt()

ON_Line ON_Cylinder::LineAt ( double  ) const

◆ NormalAt()

ON_3dPoint ON_Cylinder::NormalAt ( double  ,
double   
) const

◆ PointAt()

ON_3dPoint ON_Cylinder::PointAt ( double  ,
double   
) const

evaluate parameters and return point

◆ RevSurfaceForm()

ON_RevSurface* ON_Cylinder::RevSurfaceForm ( ON_RevSurface srf = nullptr) const

Description: Creates a surface of revolution definition of the cylinder. Parameters: srf - [in] if not nullptr, then this srf is used. Result: A surface of revolution or nullptr if the cylinder is not valid or is infinite.

◆ Rotate() [1/4]

bool ON_Cylinder::Rotate ( double  ,
const ON_3dVector  
)

◆ Rotate() [2/4]

bool ON_Cylinder::Rotate ( double  ,
const ON_3dVector ,
const ON_3dPoint  
)

◆ Rotate() [3/4]

bool ON_Cylinder::Rotate ( double  ,
double  ,
const ON_3dVector  
)

For intersections see ON_Intersect();.

rotate cylinder about its origin

◆ Rotate() [4/4]

bool ON_Cylinder::Rotate ( double  ,
double  ,
const ON_3dVector ,
const ON_3dPoint  
)

rotate cylinder about a point and axis

◆ Translate()

bool ON_Cylinder::Translate ( const ON_3dVector )

Member Data Documentation

◆ circle

ON_Circle ON_Cylinder::circle

base circle

< members left public

◆ height

double ON_Cylinder::height[2]

If height[0] = height[1], the cylinder is infinite, Otherwise, height[0] < height[1] and the center of the "bottom" cap is

     circle.plane.origin + height[0]*circle.plane.zaxis,

and the center of the top cap is

     circle.plane.origin + height[1]*circle.plane.zaxis.