![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
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. | |
| void | ResetToDefaults () |
| Resets all parameters (representation, deflection) to their default values.. | |
| occ::handle< VrmlConverter_Drawer > | Drawer () const |
| Returns drawer object. | |
| void | SetDeflection (const double aDef) |
| Sets the deflection aDef of 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 | SetRepresentation (const VrmlAPI_RepresentationOfShape aRep) |
| Sets the representation of the shape aRep which is written to the VRML file. The three options are : | |
| VrmlAPI_RepresentationOfShape | GetRepresentation () const |
| Returns the representation of the shape which is written to the VRML file. Types of representation are set through the VrmlAPI_RepresentationOfShape enumeration. | |
| void | SetTransparencyToMaterial (occ::handle< Vrml_Material > &aMaterial, const double aTransparency) |
| void | SetShininessToMaterial (occ::handle< Vrml_Material > &aMaterial, const double aShininess) |
| void | SetAmbientColorToMaterial (occ::handle< Vrml_Material > &aMaterial, const occ::handle< NCollection_HArray1< Quantity_Color > > &Color) |
| void | SetDiffuseColorToMaterial (occ::handle< Vrml_Material > &aMaterial, const occ::handle< NCollection_HArray1< Quantity_Color > > &Color) |
| void | SetSpecularColorToMaterial (occ::handle< Vrml_Material > &aMaterial, const occ::handle< NCollection_HArray1< Quantity_Color > > &Color) |
| void | SetEmissiveColorToMaterial (occ::handle< Vrml_Material > &aMaterial, const occ::handle< NCollection_HArray1< Quantity_Color > > &Color) |
| occ::handle< Vrml_Material > | GetFrontMaterial () const |
| occ::handle< Vrml_Material > | GetPointsMaterial () const |
| occ::handle< Vrml_Material > | GetUisoMaterial () const |
| occ::handle< Vrml_Material > | GetVisoMaterial () const |
| occ::handle< Vrml_Material > | GetLineMaterial () const |
| occ::handle< Vrml_Material > | GetWireMaterial () const |
| occ::handle< Vrml_Material > | GetFreeBoundsMaterial () const |
| occ::handle< Vrml_Material > | GetUnfreeBoundsMaterial () const |
| bool | Write (const TopoDS_Shape &aShape, const char *const aFile, const int aVersion=2) const |
| Converts the shape aShape to VRML format of the passed version and writes it to the file identified by aFile. | |
| bool | WriteDoc (const occ::handle< TDocStd_Document > &theDoc, const char *const theFile, const double theScale) const |
| Converts the document to VRML format of the passed version and writes it to the file identified by aFile. | |
| bool | Write (const TopoDS_Shape &aShape, Standard_OStream &theOStream, const int aVersion=2) const |
| Converts the shape aShape to VRML format of the passed version and writes it to the given stream. | |
| bool | WriteDoc (const occ::handle< TDocStd_Document > &theDoc, Standard_OStream &theOStream, const double theScale) const |
| Converts the document to VRML format of the passed version and writes it to the given stream. | |
Protected Member Functions | |
| bool | write_v1 (const TopoDS_Shape &aShape, Standard_OStream &theOStream) const |
| Converts the shape aShape to VRML format of version 1.0 and writes it to the given stream using default parameters. | |
| bool | write_v2 (const TopoDS_Shape &aShape, Standard_OStream &theOStream) const |
| Converts the shape aShape to VRML format of version 2.0 and writes it to the given stream using default parameters. | |
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.
| VrmlAPI_Writer::VrmlAPI_Writer | ( | ) |
Creates a writer object with default parameters.
| occ::handle< VrmlConverter_Drawer > VrmlAPI_Writer::Drawer | ( | ) | const |
Returns drawer object.
| occ::handle< Vrml_Material > VrmlAPI_Writer::GetFreeBoundsMaterial | ( | ) | const |
| occ::handle< Vrml_Material > VrmlAPI_Writer::GetFrontMaterial | ( | ) | const |
| occ::handle< Vrml_Material > VrmlAPI_Writer::GetLineMaterial | ( | ) | const |
| occ::handle< Vrml_Material > VrmlAPI_Writer::GetPointsMaterial | ( | ) | const |
| VrmlAPI_RepresentationOfShape VrmlAPI_Writer::GetRepresentation | ( | ) | const |
Returns the representation of the shape which is written to the VRML file. Types of representation are set through the VrmlAPI_RepresentationOfShape enumeration.
| occ::handle< Vrml_Material > VrmlAPI_Writer::GetUisoMaterial | ( | ) | const |
| occ::handle< Vrml_Material > VrmlAPI_Writer::GetUnfreeBoundsMaterial | ( | ) | const |
| occ::handle< Vrml_Material > VrmlAPI_Writer::GetVisoMaterial | ( | ) | const |
| occ::handle< Vrml_Material > VrmlAPI_Writer::GetWireMaterial | ( | ) | const |
| void VrmlAPI_Writer::ResetToDefaults | ( | ) |
Resets all parameters (representation, deflection) to their default values..
| void VrmlAPI_Writer::SetAmbientColorToMaterial | ( | occ::handle< Vrml_Material > & | aMaterial, |
| const occ::handle< NCollection_HArray1< Quantity_Color > > & | Color ) |
Call Vrml_Material::SetAmbientColor() directly instead.
("Call Vrml_Material::SetAmbientColor() directly instead")
Sets the deflection aDef of 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 | ( | occ::handle< Vrml_Material > & | aMaterial, |
| const occ::handle< NCollection_HArray1< Quantity_Color > > & | Color ) |
Call Vrml_Material::SetDiffuseColor() directly instead.
("Call Vrml_Material::SetDiffuseColor() directly instead")
| void VrmlAPI_Writer::SetEmissiveColorToMaterial | ( | occ::handle< Vrml_Material > & | aMaterial, |
| const occ::handle< NCollection_HArray1< Quantity_Color > > & | Color ) |
Call Vrml_Material::SetEmissiveColor() directly instead.
("Call Vrml_Material::SetEmissiveColor() directly instead")
| void VrmlAPI_Writer::SetRepresentation | ( | const VrmlAPI_RepresentationOfShape | aRep | ) |
Sets the representation of the shape aRep which is written to the VRML file. The three options are :
| void VrmlAPI_Writer::SetShininessToMaterial | ( | occ::handle< Vrml_Material > & | aMaterial, |
| const double | aShininess ) |
Call Vrml_Material::SetShininess() directly instead.
("Call Vrml_Material::SetShininess() directly instead")
| void VrmlAPI_Writer::SetSpecularColorToMaterial | ( | occ::handle< Vrml_Material > & | aMaterial, |
| const occ::handle< NCollection_HArray1< Quantity_Color > > & | Color ) |
Call Vrml_Material::SetSpecularColor() directly instead.
("Call Vrml_Material::SetSpecularColor() directly instead")
| void VrmlAPI_Writer::SetTransparencyToMaterial | ( | occ::handle< Vrml_Material > & | aMaterial, |
| const double | aTransparency ) |
Call Vrml_Material::SetTransparency() directly instead.
("Call Vrml_Material::SetTransparency() directly instead")
| bool VrmlAPI_Writer::Write | ( | const TopoDS_Shape & | aShape, |
| const char *const | aFile, | ||
| const int | aVersion = 2 ) const |
Converts the shape aShape to VRML format of the passed version and writes it to the file identified by aFile.
| bool VrmlAPI_Writer::Write | ( | const TopoDS_Shape & | aShape, |
| Standard_OStream & | theOStream, | ||
| const int | aVersion = 2 ) const |
Converts the shape aShape to VRML format of the passed version and writes it to the given stream.
|
protected |
Converts the shape aShape to VRML format of version 1.0 and writes it to the given stream using default parameters.
|
protected |
Converts the shape aShape to VRML format of version 2.0 and writes it to the given stream using default parameters.
| bool VrmlAPI_Writer::WriteDoc | ( | const occ::handle< TDocStd_Document > & | theDoc, |
| const char *const | theFile, | ||
| const double | theScale ) const |
Converts the document to VRML format of the passed version and writes it to the file identified by aFile.
| bool VrmlAPI_Writer::WriteDoc | ( | const occ::handle< TDocStd_Document > & | theDoc, |
| Standard_OStream & | theOStream, | ||
| const double | theScale ) const |
Converts the document to VRML format of the passed version and writes it to the given stream.