Open CASCADE Technology  7.5.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

Prs3d_ToolCylinder Class Reference

Standard presentation algorithm that outputs graphical primitives for cylindrical surface. More...

#include <Prs3d_ToolCylinder.hxx>

Inheritance diagram for Prs3d_ToolCylinder:
Inheritance graph
[legend]

Public Member Functions

 Prs3d_ToolCylinder (const Standard_Real theBottomRad, const Standard_Real theTopRad, const Standard_Real theHeight, const Standard_Integer theNbSlices, const Standard_Integer theNbStacks)
 Initializes the algorithm creating a cylinder. More...
 
- Public Member Functions inherited from Prs3d_ToolQuadric
Handle< Graphic3d_ArrayOfTrianglesCreateTriangulation (const gp_Trsf &theTrsf) const
 Generate primitives for 3D quadric surface presentation. More...
 
Handle< Poly_TriangulationCreatePolyTriangulation (const gp_Trsf &theTrsf) const
 Generate primitives for 3D quadric surface presentation. More...
 
void FillArray (Handle< Graphic3d_ArrayOfTriangles > &theArray, const gp_Trsf &theTrsf) const
 Generate primitives for 3D quadric surface and fill the given array. More...
 
void FillArray (Handle< Graphic3d_ArrayOfTriangles > &theArray, Handle< Poly_Triangulation > &theTriangulation, const gp_Trsf &theTrsf) const
 Generate primitives for 3D quadric surface presentation. More...
 

Static Public Member Functions

static Handle< Graphic3d_ArrayOfTrianglesCreate (const Standard_Real theBottomRad, const Standard_Real theTopRad, const Standard_Real theHeight, const Standard_Integer theNbSlices, const Standard_Integer theNbStacks, const gp_Trsf &theTrsf)
 Generate primitives for 3D quadric surface and return a filled array. More...
 
- Static Public Member Functions inherited from Prs3d_ToolQuadric
static Standard_Integer TrianglesNb (const Standard_Integer theSlicesNb, const Standard_Integer theStacksNb)
 Return number of triangles for presentation with the given params. More...
 
static Standard_Integer VerticesNb (const Standard_Integer theSlicesNb, const Standard_Integer theStacksNb, const Standard_Boolean theIsIndexed=Standard_True)
 Return number of vertices for presentation with the given params. More...
 

Protected Member Functions

virtual gp_Pnt Vertex (const Standard_Real theU, const Standard_Real theV) const override
 Computes vertex at given parameter location of the surface. More...
 
virtual gp_Dir Normal (const Standard_Real theU, const Standard_Real theV) const override
 Computes normal at given parameter location of the surface. More...
 
- Protected Member Functions inherited from Prs3d_ToolQuadric
Standard_Integer TrianglesNb () const
 Return number of triangles in generated presentation. More...
 
Standard_Integer VerticesNb (const Standard_Boolean theIsIndexed=Standard_True) const
 Return number of vertices in generated presentation. More...
 

Protected Attributes

Standard_Real myBottomRadius
 cylinder bottom radius More...
 
Standard_Real myTopRadius
 cylinder top radius More...
 
Standard_Real myHeight
 cylinder height More...
 
- Protected Attributes inherited from Prs3d_ToolQuadric
Standard_Integer mySlicesNb
 number of slices within U parameter More...
 
Standard_Integer myStacksNb
 number of stacks within V parameter More...
 

Detailed Description

Standard presentation algorithm that outputs graphical primitives for cylindrical surface.

Constructor & Destructor Documentation

◆ Prs3d_ToolCylinder()

Prs3d_ToolCylinder::Prs3d_ToolCylinder ( const Standard_Real  theBottomRad,
const Standard_Real  theTopRad,
const Standard_Real  theHeight,
const Standard_Integer  theNbSlices,
const Standard_Integer  theNbStacks 
)

Initializes the algorithm creating a cylinder.

Parameters
theBottomRad[in] cylinder bottom radius
theTopRad[in] cylinder top radius
theHeight[in] cylinder height
theNbSlices[in] number of slices within U parameter
theNbStacks[in] number of stacks within V parameter

Member Function Documentation

◆ Create()

static Handle< Graphic3d_ArrayOfTriangles > Prs3d_ToolCylinder::Create ( const Standard_Real  theBottomRad,
const Standard_Real  theTopRad,
const Standard_Real  theHeight,
const Standard_Integer  theNbSlices,
const Standard_Integer  theNbStacks,
const gp_Trsf theTrsf 
)
static

Generate primitives for 3D quadric surface and return a filled array.

Parameters
theBottomRad[in] cylinder bottom radius
theTopRad[in] cylinder top radius
theHeight[in] cylinder height
theNbSlices[in] number of slices within U parameter
theNbStacks[in] number of stacks within V parameter
theTrsf[in] optional transformation to apply
Returns
generated triangulation

◆ Normal()

virtual gp_Dir Prs3d_ToolCylinder::Normal ( const Standard_Real  theU,
const Standard_Real  theV 
) const
overrideprotectedvirtual

Computes normal at given parameter location of the surface.

Implements Prs3d_ToolQuadric.

◆ Vertex()

virtual gp_Pnt Prs3d_ToolCylinder::Vertex ( const Standard_Real  theU,
const Standard_Real  theV 
) const
overrideprotectedvirtual

Computes vertex at given parameter location of the surface.

Implements Prs3d_ToolQuadric.

Field Documentation

◆ myBottomRadius

Standard_Real Prs3d_ToolCylinder::myBottomRadius
protected

cylinder bottom radius

◆ myHeight

Standard_Real Prs3d_ToolCylinder::myHeight
protected

cylinder height

◆ myTopRadius

Standard_Real Prs3d_ToolCylinder::myTopRadius
protected

cylinder top radius


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