Open CASCADE Technology  6.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions
VrmlAPI_Writer Class Reference

Creates and writes VRML files from Open
CASCADE shapes. A VRML file can be written to
an existing VRML file or to a new one.
More...

#include <VrmlAPI_Writer.hxx>

Public Member Functions

 VrmlAPI_Writer ()
 Creates a writer object with default parameters.
More...
 
void ResetToDefaults ()
 
 Resets all parameters (representation, deflection) <br>

to their default values..
More...

 
Handle_VrmlConverter_Drawer Drawer () const
 Returns drawer object
More...
 
void SetDeflection (const Standard_Real aDef)
 
 Sets the deflection aDef of <br>

the mesh algorithm which is used to compute the shaded
representation of the translated shape. The default
value is -1. When the deflection value is less than
0, the deflection is calculated from the relative
size of the shaped.
More...

 
void SetRepresentation (const VrmlAPI_RepresentationOfShape aRep)
 
 Sets the representation of the <br>

shape aRep which is written to the VRML file. The three options are :
More...

 
void SetTransparencyToMaterial (Handle< Vrml_Material > &aMaterial, const Standard_Real aTransparency)
 Set transparency to given material
More...
 
void SetShininessToMaterial (Handle< Vrml_Material > &aMaterial, const Standard_Real aShininess)
 
void SetAmbientColorToMaterial (Handle< Vrml_Material > &aMaterial, const Handle< Quantity_HArray1OfColor > &Color)
 
void SetDiffuseColorToMaterial (Handle< Vrml_Material > &aMaterial, const Handle< Quantity_HArray1OfColor > &Color)
 
void SetSpecularColorToMaterial (Handle< Vrml_Material > &aMaterial, const Handle< Quantity_HArray1OfColor > &Color)
 
void SetEmissiveColorToMaterial (Handle< Vrml_Material > &aMaterial, const Handle< Quantity_HArray1OfColor > &Color)
 
VrmlAPI_RepresentationOfShape GetRepresentation () const
 
 Returns the representation of the shape which is <br>

written to the VRML file. Types of representation are set through the
VrmlAPI_RepresentationOfShape enumeration.
More...

 
Handle_Vrml_Material GetFrontMaterial () const
 
Handle_Vrml_Material GetPointsMaterial () const
 
Handle_Vrml_Material GetUisoMaterial () const
 
Handle_Vrml_Material GetVisoMaterial () const
 
Handle_Vrml_Material GetLineMaterial () const
 
Handle_Vrml_Material GetWireMaterial () const
 
Handle_Vrml_Material GetFreeBoundsMaterial () const
 
Handle_Vrml_Material GetUnfreeBoundsMaterial () const
 
void Write (const TopoDS_Shape &aShape, const Standard_CString aFile) const
 
 Converts the shape aShape to <br>

VRML format and writes it to the file identified by aFile.
More...

 

Detailed Description

Creates and writes VRML files from Open
CASCADE shapes. A VRML file can be written to
an existing VRML file or to a new one.

Constructor & Destructor Documentation

VrmlAPI_Writer::VrmlAPI_Writer ( )

Creates a writer object with default parameters.

Member Function Documentation

Handle_VrmlConverter_Drawer VrmlAPI_Writer::Drawer ( ) const

Returns drawer object

Handle_Vrml_Material VrmlAPI_Writer::GetFreeBoundsMaterial ( ) const
Handle_Vrml_Material VrmlAPI_Writer::GetFrontMaterial ( ) const
Handle_Vrml_Material VrmlAPI_Writer::GetLineMaterial ( ) const
Handle_Vrml_Material VrmlAPI_Writer::GetPointsMaterial ( ) const
VrmlAPI_RepresentationOfShape VrmlAPI_Writer::GetRepresentation ( ) const

 Returns the representation of the shape which is <br>

written to the VRML file. Types of representation are set through the
VrmlAPI_RepresentationOfShape enumeration.

Handle_Vrml_Material VrmlAPI_Writer::GetUisoMaterial ( ) const
Handle_Vrml_Material VrmlAPI_Writer::GetUnfreeBoundsMaterial ( ) const
Handle_Vrml_Material VrmlAPI_Writer::GetVisoMaterial ( ) const
Handle_Vrml_Material VrmlAPI_Writer::GetWireMaterial ( ) const
void VrmlAPI_Writer::ResetToDefaults ( )

 Resets all parameters (representation, deflection) <br>

to their default values..

void VrmlAPI_Writer::SetAmbientColorToMaterial ( Handle< Vrml_Material > &  aMaterial,
const Handle< Quantity_HArray1OfColor > &  Color 
)
void VrmlAPI_Writer::SetDeflection ( const Standard_Real  aDef)

 Sets the deflection aDef of <br>

the mesh algorithm which is used to compute the shaded
representation of the translated shape. The default
value is -1. When the deflection value is less than
0, the deflection is calculated from the relative
size of the shaped.

void VrmlAPI_Writer::SetDiffuseColorToMaterial ( Handle< Vrml_Material > &  aMaterial,
const Handle< Quantity_HArray1OfColor > &  Color 
)
void VrmlAPI_Writer::SetEmissiveColorToMaterial ( Handle< Vrml_Material > &  aMaterial,
const Handle< Quantity_HArray1OfColor > &  Color 
)
void VrmlAPI_Writer::SetRepresentation ( const VrmlAPI_RepresentationOfShape  aRep)

 Sets the representation of the <br>

shape aRep which is written to the VRML file. The three options are :

  • shaded
  • wireframe
  • both shaded and wireframe (default)
    defined through the VrmlAPI_RepresentationOfShape enumeration.
void VrmlAPI_Writer::SetShininessToMaterial ( Handle< Vrml_Material > &  aMaterial,
const Standard_Real  aShininess 
)
void VrmlAPI_Writer::SetSpecularColorToMaterial ( Handle< Vrml_Material > &  aMaterial,
const Handle< Quantity_HArray1OfColor > &  Color 
)
void VrmlAPI_Writer::SetTransparencyToMaterial ( Handle< Vrml_Material > &  aMaterial,
const Standard_Real  aTransparency 
)

Set transparency to given material

void VrmlAPI_Writer::Write ( const TopoDS_Shape aShape,
const Standard_CString  aFile 
) const

 Converts the shape aShape to <br>

VRML format and writes it to the file identified by aFile.


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