# DataExchange
TKVRML
VrmlAPI

# 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.
.

`#include <VrmlAPI_Writer.hxx>`

## Public Member Functions

void * | operator new (size_t, void *anAddress)
void * | operator new (size_t size)
void | operator delete (void *anAddress)
Standard_EXPORT | VrmlAPI_Writer ()
| Creates a writer object with default parameters. .
Standard_EXPORT void | ResetToDefaults ()
| Resets all parameters (representation, deflection) to their default values.. .
Standard_EXPORT Handle_VrmlConverter_Drawer | Drawer () const
| Returns drawer object .
Standard_EXPORT void | SetDeflection (const Standard_Real 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. .
Standard_EXPORT void | SetRepresentation (const VrmlAPI_RepresentationOfShape aRep)
| Sets the representation of the 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. .
Standard_EXPORT void | SetTransparencyToMaterial (Handle(Vrml_Material)&aMaterial, const Standard_Real aTransparency)
| Set transparency to given material .
Standard_EXPORT void | SetShininessToMaterial (Handle(Vrml_Material)&aMaterial, const Standard_Real aShininess)
Standard_EXPORT void | SetAmbientColorToMaterial (Handle(Vrml_Material)&aMaterial, const Handle(Quantity_HArray1OfColor)&Color)
Standard_EXPORT void | SetDiffuseColorToMaterial (Handle(Vrml_Material)&aMaterial, const Handle(Quantity_HArray1OfColor)&Color)
Standard_EXPORT void | SetSpecularColorToMaterial (Handle(Vrml_Material)&aMaterial, const Handle(Quantity_HArray1OfColor)&Color)
Standard_EXPORT void | SetEmissiveColorToMaterial (Handle(Vrml_Material)&aMaterial, const Handle(Quantity_HArray1OfColor)&Color)
Standard_EXPORT 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. .
Standard_EXPORT Handle_Vrml_Material | GetFrontMaterial () const
Standard_EXPORT Handle_Vrml_Material | GetPointsMaterial () const
Standard_EXPORT Handle_Vrml_Material | GetUisoMaterial () const
Standard_EXPORT Handle_Vrml_Material | GetVisoMaterial () const
Standard_EXPORT Handle_Vrml_Material | GetLineMaterial () const
Standard_EXPORT Handle_Vrml_Material | GetWireMaterial () const
Standard_EXPORT Handle_Vrml_Material | GetFreeBoundsMaterial () const
Standard_EXPORT Handle_Vrml_Material | GetUnfreeBoundsMaterial () const
Standard_EXPORT void | Write (const TopoDS_Shape &aShape, const Standard_CString aFile) const
| Converts the shape aShape to VRML format and writes it to the file identified by aFile. .

## Private Attributes

VrmlAPI_RepresentationOfShape | myRepresentation
Handle_VrmlConverter_Drawer | myDrawer
Standard_Real | myDeflection
Handle_VrmlConverter_Projector | myPerespectiveCamera
Handle_VrmlConverter_Projector | myOrthographicCamera
Standard_Real | myTransparency
Standard_Real | myShininess
Handle_Vrml_Material | myFrontMaterial
Handle_Vrml_Material | myPointsMaterial
Handle_Vrml_Material | myUisoMaterial
Handle_Vrml_Material | myVisoMaterial
Handle_Vrml_Material | myLineMaterial
Handle_Vrml_Material | myWireMaterial
Handle_Vrml_Material | myFreeBoundsMaterial
Handle_Vrml_Material | myUnfreeBoundsMaterial
Quantity_Length | DX
Quantity_Length | DY
Quantity_Length | DZ
Quantity_Length | XUp
Quantity_Length | YUp
Quantity_Length | ZUp
Quantity_Length | Focus

## Constructor & Destructor Documentation

Standard_EXPORT VrmlAPI_Writer::VrmlAPI_Writer | ( |  | ) |

## Member Function Documentation

Standard_EXPORT Handle_VrmlConverter_Drawer VrmlAPI_Writer::Drawer | ( |  | ) | const

Standard_EXPORT Handle_Vrml_Material VrmlAPI_Writer::GetFreeBoundsMaterial | ( |  | ) | const

Standard_EXPORT Handle_Vrml_Material VrmlAPI_Writer::GetFrontMaterial | ( |  | ) | const

Standard_EXPORT Handle_Vrml_Material VrmlAPI_Writer::GetLineMaterial | ( |  | ) | const

Standard_EXPORT Handle_Vrml_Material VrmlAPI_Writer::GetPointsMaterial | ( |  | ) | const

Standard_EXPORT VrmlAPI_RepresentationOfShape VrmlAPI_Writer::GetRepresentation | ( |  | ) | const

Standard_EXPORT Handle_Vrml_Material VrmlAPI_Writer::GetUisoMaterial | ( |  | ) | const

Standard_EXPORT Handle_Vrml_Material VrmlAPI_Writer::GetUnfreeBoundsMaterial | ( |  | ) | const

Standard_EXPORT Handle_Vrml_Material VrmlAPI_Writer::GetVisoMaterial | ( |  | ) | const

Standard_EXPORT Handle_Vrml_Material VrmlAPI_Writer::GetWireMaterial | ( |  | ) | const

void VrmlAPI_Writer::operator delete | ( | void * | anAddress | ) | `[inline]`

void* VrmlAPI_Writer::operator new | ( | size_t | size | ) | `[inline]`

void* VrmlAPI_Writer::operator new | ( | size_t | ,
|  | void * | anAddress
| ) | `[inline]`

Standard_EXPORT void VrmlAPI_Writer::ResetToDefaults | ( |  | ) |

Standard_EXPORT void VrmlAPI_Writer::SetAmbientColorToMaterial | ( | Handle(Vrml_Material)& | aMaterial,
|  | const Handle(Quantity_HArray1OfColor)& | Color
| ) |

Standard_EXPORT void VrmlAPI_Writer::SetDeflection | ( | const Standard_Real | aDef | ) |

Standard_EXPORT void VrmlAPI_Writer::SetDiffuseColorToMaterial | ( | Handle(Vrml_Material)& | aMaterial,
|  | const Handle(Quantity_HArray1OfColor)& | Color
| ) |

Standard_EXPORT void VrmlAPI_Writer::SetEmissiveColorToMaterial | ( | Handle(Vrml_Material)& | aMaterial,
|  | const Handle(Quantity_HArray1OfColor)& | Color
| ) |

Standard_EXPORT void VrmlAPI_Writer::SetRepresentation | ( | const VrmlAPI_RepresentationOfShape | aRep | ) |

Standard_EXPORT void VrmlAPI_Writer::SetShininessToMaterial | ( | Handle(Vrml_Material)& | aMaterial,
|  | const Standard_Real | aShininess
| ) |

Standard_EXPORT void VrmlAPI_Writer::SetSpecularColorToMaterial | ( | Handle(Vrml_Material)& | aMaterial,
|  | const Handle(Quantity_HArray1OfColor)& | Color
| ) |

Standard_EXPORT void VrmlAPI_Writer::SetTransparencyToMaterial | ( | Handle(Vrml_Material)& | aMaterial,
|  | const Standard_Real | aTransparency
| ) |

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

## Field Documentation

Quantity_Length VrmlAPI_Writer::DX `[private]`

Quantity_Length VrmlAPI_Writer::DY `[private]`

Quantity_Length VrmlAPI_Writer::DZ `[private]`

Quantity_Length VrmlAPI_Writer::Focus `[private]`

Standard_Real VrmlAPI_Writer::myDeflection `[private]`

Handle_VrmlConverter_Drawer VrmlAPI_Writer::myDrawer `[private]`

Handle_Vrml_Material VrmlAPI_Writer::myFreeBoundsMaterial `[private]`

Handle_Vrml_Material VrmlAPI_Writer::myFrontMaterial `[private]`

Handle_Vrml_Material VrmlAPI_Writer::myLineMaterial `[private]`

Handle_VrmlConverter_Projector VrmlAPI_Writer::myOrthographicCamera `[private]`

Handle_VrmlConverter_Projector VrmlAPI_Writer::myPerespectiveCamera `[private]`

Handle_Vrml_Material VrmlAPI_Writer::myPointsMaterial `[private]`

VrmlAPI_RepresentationOfShape VrmlAPI_Writer::myRepresentation `[private]`

Standard_Real VrmlAPI_Writer::myShininess `[private]`

Standard_Real VrmlAPI_Writer::myTransparency `[private]`

Handle_Vrml_Material VrmlAPI_Writer::myUisoMaterial `[private]`

Handle_Vrml_Material VrmlAPI_Writer::myUnfreeBoundsMaterial `[private]`

Handle_Vrml_Material VrmlAPI_Writer::myVisoMaterial `[private]`

Handle_Vrml_Material VrmlAPI_Writer::myWireMaterial `[private]`

Quantity_Length VrmlAPI_Writer::XUp `[private]`

Quantity_Length VrmlAPI_Writer::YUp `[private]`

Quantity_Length VrmlAPI_Writer::ZUp `[private]`

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

- VrmlAPI_Writer.hxx