Open CASCADE Technology 7.8.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
Prs3d_ToolTorus Class Reference

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

#include <Prs3d_ToolTorus.hxx>

Inheritance diagram for Prs3d_ToolTorus:
Inheritance graph
[legend]

Public Member Functions

 Prs3d_ToolTorus (const Standard_Real theMajorRad, const Standard_Real theMinorRad, const Standard_Integer theNbSlices, const Standard_Integer theNbStacks)
 Initializes the algorithm creating a complete torus.
 
 Prs3d_ToolTorus (const Standard_Real theMajorRad, const Standard_Real theMinorRad, const Standard_Real theAngle, const Standard_Integer theNbSlices, const Standard_Integer theNbStacks)
 Initializes the algorithm creating a torus pipe segment.
 
 Prs3d_ToolTorus (const Standard_Real theMajorRad, const Standard_Real theMinorRad, const Standard_Real theAngle1, const Standard_Real theAngle2, const Standard_Integer theNbSlices, const Standard_Integer theNbStacks)
 Initializes the algorithm creating a torus ring segment.
 
 Prs3d_ToolTorus (const Standard_Real theMajorRad, const Standard_Real theMinorRad, const Standard_Real theAngle1, const Standard_Real theAngle2, const Standard_Real theAngle, const Standard_Integer theNbSlices, const Standard_Integer theNbStacks)
 Initializes the algorithm creating a torus ring segment.
 
- Public Member Functions inherited from Prs3d_ToolQuadric
Handle< Graphic3d_ArrayOfTrianglesCreateTriangulation (const gp_Trsf &theTrsf) const
 Generate primitives for 3D quadric surface presentation.
 
Handle< Poly_TriangulationCreatePolyTriangulation (const gp_Trsf &theTrsf) const
 Generate primitives for 3D quadric surface presentation.
 
void FillArray (Handle< Graphic3d_ArrayOfTriangles > &theArray, const gp_Trsf &theTrsf) const
 Generate primitives for 3D quadric surface and fill the given array.
 
Standard_Integer TrianglesNb () const
 Return number of triangles in generated presentation.
 
Standard_Integer VerticesNb (bool theIsIndexed=true) const
 Return number of vertices in generated presentation.
 
void FillArray (Handle< Graphic3d_ArrayOfTriangles > &theArray, Handle< Poly_Triangulation > &theTriangulation, const gp_Trsf &theTrsf) const
 Generate primitives for 3D quadric surface presentation.
 

Static Public Member Functions

static Handle< Graphic3d_ArrayOfTrianglesCreate (const Standard_Real theMajorRad, const Standard_Real theMinorRad, const Standard_Integer theNbSlices, const Standard_Integer theNbStacks, const gp_Trsf &theTrsf)
 Generate primitives for 3D quadric surface (complete torus).
 
static Handle< Graphic3d_ArrayOfTrianglesCreate (const Standard_Real theMajorRad, const Standard_Real theMinorRad, const Standard_Real theAngle, const Standard_Integer theNbSlices, const Standard_Integer theNbStacks, const gp_Trsf &theTrsf)
 Generate primitives for 3D quadric surface (torus segment).
 
static Handle< Graphic3d_ArrayOfTrianglesCreate (const Standard_Real theMajorRad, const Standard_Real theMinorRad, const Standard_Real theAngle1, const Standard_Real theAngle2, const Standard_Integer theNbSlices, const Standard_Integer theNbStacks, const gp_Trsf &theTrsf)
 Generate primitives for 3D quadric surface (torus ring segment).
 
static Handle< Graphic3d_ArrayOfTrianglesCreate (const Standard_Real theMajorRad, const Standard_Real theMinorRad, const Standard_Real theAngle1, const Standard_Real theAngle2, const Standard_Real theAngle, const Standard_Integer theNbSlices, const Standard_Integer theNbStacks, const gp_Trsf &theTrsf)
 Generate primitives for 3D quadric surface (segment of the torus ring segment).
 
- 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.
 
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.
 

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.
 
virtual gp_Dir Normal (const Standard_Real theU, const Standard_Real theV) const override
 Computes normal at given parameter location of the surface.
 

Protected Attributes

Standard_Real myMajorRadius
 distance from the center of the pipe to the center of the torus
 
Standard_Real myMinorRadius
 radius of the pipe
 
Standard_Real myAngle
 angle to create a torus pipe segment
 
Standard_Real myVMin
 first angle to create a torus ring segment
 
Standard_Real myVMax
 second angle to create a torus ring segment
 
- Protected Attributes inherited from Prs3d_ToolQuadric
Standard_Integer mySlicesNb
 number of slices within U parameter
 
Standard_Integer myStacksNb
 number of stacks within V parameter
 

Detailed Description

Standard presentation algorithm that outputs graphical primitives for torus surface.

Constructor & Destructor Documentation

◆ Prs3d_ToolTorus() [1/4]

Prs3d_ToolTorus::Prs3d_ToolTorus ( const Standard_Real  theMajorRad,
const Standard_Real  theMinorRad,
const Standard_Integer  theNbSlices,
const Standard_Integer  theNbStacks 
)
inline

Initializes the algorithm creating a complete torus.

Parameters
theMajorRad[in] distance from the center of the pipe to the center of the torus
theMinorRad[in] radius of the pipe
theNbSlices[in] number of slices within U parameter
theNbStacks[in] number of stacks within V parameter

◆ Prs3d_ToolTorus() [2/4]

Prs3d_ToolTorus::Prs3d_ToolTorus ( const Standard_Real  theMajorRad,
const Standard_Real  theMinorRad,
const Standard_Real  theAngle,
const Standard_Integer  theNbSlices,
const Standard_Integer  theNbStacks 
)
inline

Initializes the algorithm creating a torus pipe segment.

Parameters
theMajorRad[in] distance from the center of the pipe to the center of the torus
theMinorRad[in] radius of the pipe
theAngle[in] angle to create a torus pipe segment
theNbSlices[in] number of slices within U parameter
theNbStacks[in] number of stacks within V parameter

◆ Prs3d_ToolTorus() [3/4]

Prs3d_ToolTorus::Prs3d_ToolTorus ( const Standard_Real  theMajorRad,
const Standard_Real  theMinorRad,
const Standard_Real  theAngle1,
const Standard_Real  theAngle2,
const Standard_Integer  theNbSlices,
const Standard_Integer  theNbStacks 
)
inline

Initializes the algorithm creating a torus ring segment.

Parameters
theMajorRad[in] distance from the center of the pipe to the center of the torus
theMinorRad[in] radius of the pipe
theAngle1[in] first angle to create a torus ring segment
theAngle2[in] second angle to create a torus ring segment
theNbSlices[in] number of slices within U parameter
theNbStacks[in] number of stacks within V parameter

◆ Prs3d_ToolTorus() [4/4]

Prs3d_ToolTorus::Prs3d_ToolTorus ( const Standard_Real  theMajorRad,
const Standard_Real  theMinorRad,
const Standard_Real  theAngle1,
const Standard_Real  theAngle2,
const Standard_Real  theAngle,
const Standard_Integer  theNbSlices,
const Standard_Integer  theNbStacks 
)
inline

Initializes the algorithm creating a torus ring segment.

Parameters
theMajorRad[in] distance from the center of the pipe to the center of the torus
theMinorRad[in] radius of the pipe
theAngle1[in] first angle to create a torus ring segment
theAngle2[in] second angle to create a torus ring segment
theAngle[in] angle to create a torus pipe segment
theNbSlices[in] number of slices within U parameter
theNbStacks[in] number of stacks within V parameter

Member Function Documentation

◆ Create() [1/4]

static Handle< Graphic3d_ArrayOfTriangles > Prs3d_ToolTorus::Create ( const Standard_Real  theMajorRad,
const Standard_Real  theMinorRad,
const Standard_Integer  theNbSlices,
const Standard_Integer  theNbStacks,
const gp_Trsf theTrsf 
)
inlinestatic

Generate primitives for 3D quadric surface (complete torus).

Parameters
theMajorRad[in] distance from the center of the pipe to the center of the torus
theMinorRad[in] radius of the pipe
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

◆ Create() [2/4]

static Handle< Graphic3d_ArrayOfTriangles > Prs3d_ToolTorus::Create ( const Standard_Real  theMajorRad,
const Standard_Real  theMinorRad,
const Standard_Real  theAngle,
const Standard_Integer  theNbSlices,
const Standard_Integer  theNbStacks,
const gp_Trsf theTrsf 
)
inlinestatic

Generate primitives for 3D quadric surface (torus segment).

Parameters
theMajorRad[in] distance from the center of the pipe to the center of the torus
theMinorRad[in] radius of the pipe
theAngle[in] angle to create a torus pipe segment
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

◆ Create() [3/4]

static Handle< Graphic3d_ArrayOfTriangles > Prs3d_ToolTorus::Create ( const Standard_Real  theMajorRad,
const Standard_Real  theMinorRad,
const Standard_Real  theAngle1,
const Standard_Real  theAngle2,
const Standard_Integer  theNbSlices,
const Standard_Integer  theNbStacks,
const gp_Trsf theTrsf 
)
inlinestatic

Generate primitives for 3D quadric surface (torus ring segment).

Parameters
theMajorRad[in] distance from the center of the pipe to the center of the torus
theMinorRad[in] radius of the pipe
theAngle1[in] first angle to create a torus ring segment
theAngle2[in] second angle to create a torus ring segment
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

◆ Create() [4/4]

static Handle< Graphic3d_ArrayOfTriangles > Prs3d_ToolTorus::Create ( const Standard_Real  theMajorRad,
const Standard_Real  theMinorRad,
const Standard_Real  theAngle1,
const Standard_Real  theAngle2,
const Standard_Real  theAngle,
const Standard_Integer  theNbSlices,
const Standard_Integer  theNbStacks,
const gp_Trsf theTrsf 
)
static

Generate primitives for 3D quadric surface (segment of the torus ring segment).

Parameters
theMajorRad[in] distance from the center of the pipe to the center of the torus
theMinorRad[in] radius of the pipe
theAngle1[in] first angle to create a torus ring segment
theAngle2[in] second angle to create a torus ring segment
theAngle[in] angle to create a torus pipe segment
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_ToolTorus::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_ToolTorus::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

◆ myAngle

Standard_Real Prs3d_ToolTorus::myAngle
protected

angle to create a torus pipe segment

◆ myMajorRadius

Standard_Real Prs3d_ToolTorus::myMajorRadius
protected

distance from the center of the pipe to the center of the torus

◆ myMinorRadius

Standard_Real Prs3d_ToolTorus::myMinorRadius
protected

radius of the pipe

◆ myVMax

Standard_Real Prs3d_ToolTorus::myVMax
protected

second angle to create a torus ring segment

◆ myVMin

Standard_Real Prs3d_ToolTorus::myVMin
protected

first angle to create a torus ring segment


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