Open CASCADE Technology  7.1.0.beta
Data Structures | Public Member Functions | Protected Member Functions
VrmlData_ShapeConvert Class Reference

#include <VrmlData_ShapeConvert.hxx>

Data Structures

struct  ShapeData
 

Public Member Functions

 VrmlData_ShapeConvert (VrmlData_Scene &theScene, const Standard_Real theScale=1.)
 
void AddShape (const TopoDS_Shape &theShape, const char *theName=0L)
 
void Convert (const Standard_Boolean theExtractFaces, const Standard_Boolean theExtractEdges, const Standard_Real theDeflection=0.01, const Standard_Real theDeflAngle=20.*M_PI/180.)
 

Protected Member Functions

Handle< VrmlData_GeometrytriToIndexedFaceSet (const Handle< Poly_Triangulation > &, const TopoDS_Face &, const Handle< VrmlData_Coordinate > &)
 
Handle< VrmlData_GeometrypolToIndexedLineSet (const Handle< Poly_Polygon3D > &)
 
Handle< VrmlData_AppearancedefaultMaterialFace () const
 
Handle< VrmlData_AppearancedefaultMaterialEdge () const
 

Detailed Description

Algorithm converting one shape or a set of shapes to VrmlData_Scene.

Constructor & Destructor Documentation

VrmlData_ShapeConvert::VrmlData_ShapeConvert ( VrmlData_Scene theScene,
const Standard_Real  theScale = 1. 
)
inline

Constructor.

Parameters
theSceneScene receiving all Vrml data.
theScaleScale factor, considering that VRML standard specifies coordinates in meters. So if your data are in mm, you should provide theScale=0.001

Member Function Documentation

void VrmlData_ShapeConvert::AddShape ( const TopoDS_Shape theShape,
const char *  theName = 0L 
)

Add one shape to the internal list, may be called several times with different shapes.

void VrmlData_ShapeConvert::Convert ( const Standard_Boolean  theExtractFaces,
const Standard_Boolean  theExtractEdges,
const Standard_Real  theDeflection = 0.01,
const Standard_Real  theDeflAngle = 20.*M_PI/180. 
)

Convert all accumulated shapes and store them in myScene. The internal data structures are cleared in the end of convertion.

Parameters
theExtractFacesIf True, converter extracst faces from the shapes.
theExtractEdgesIf True, converter extracts edges from the shapes.
theDeflectionDeflection for tessellation of geometrical lines/surfaces. Existing mesh is used if its deflection is smaller than the one given by this parameter.
theDeflAngleAngular deflection for tessellation of geometrical lines.
Handle< VrmlData_Appearance > VrmlData_ShapeConvert::defaultMaterialEdge ( ) const
protected
Handle< VrmlData_Appearance > VrmlData_ShapeConvert::defaultMaterialFace ( ) const
protected
Handle< VrmlData_Geometry > VrmlData_ShapeConvert::polToIndexedLineSet ( const Handle< Poly_Polygon3D > &  )
protected
Handle< VrmlData_Geometry > VrmlData_ShapeConvert::triToIndexedFaceSet ( const Handle< Poly_Triangulation > &  ,
const TopoDS_Face ,
const Handle< VrmlData_Coordinate > &   
)
protected

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