IDLgrVRML

The IDLgrVRML object allows you to save the contents of an Object Graphics hierarchy into a VRML 2.0 format file. The graphics tree can only contain a single view due to limitations in the VRML specification. The resulting VRML file is interactive and allows you to explore the geometry interactively using a VRML browser.

IDLgrImage objects

Rotation and Z buffer behavior are not completely supported. Image objects will be converted into texture mapped polygons. BLEND_FUNCTION is not completely supported (only binary srcAlpha,1-srcAlpha) This function is applied automatically if an Alpha channel is present. It is also very browser dependent. Channel masks are not supported.

IDLgrPolygon and IDLgrSurface objects

Hidden line/hidden point display, color and vertex color blending with texture colors, and bottom color are not supported. Shading may be browser dependent. Front face culling is not supported and back face culling is only supported at the browser's discretion.

IDLgrLight objects

Lighting scope and intensity may be browser dependent.

IDLgrText objects

Text using the ONGLASS property is only supported for the initial view.

IDLgrViewgroup, IDLgrScene, IDLgrVolume objects

These objects are not supported.

IDLgrPalette objects

Palette objects are simulated using an RGB color model.

IDLgrPattern objects

Only solid or clear patterns are supported.

IDLgrFont, IDLgrSymbol objects

The THICK property is not supported.

IDLgrPolyline, IDLgrSymbol, IDLgrSurface, IDLgrPolygon and IDLgrPlot objects

Line attributes (thickness, linestyle) are not supported.

IDLgrView objects

Z-clipping control, aspect ratio preservation, the LOCATION property, and orthographic projections are not supported.

Destination objects

The COLOR_MODEL property is not fully supported in Indexed Color mode, when using a SHADER_RANGE (an RGB model will be substituted instead). The QUALITY property is not supported.

Aspect ratios are also difficult to duplicate as they can be browser dependent. The object is limited to the primitives supported by VRML. Texture maps (and images) will be inlined into the output file. While this will generate large VRML files, the files are fully self-contained.

Superclasses

This class has no superclasses.

Subclasses

This class has no subclasses.

Creation

See IDLgrVRML::Init

Methods

Intrinsic Methods

This class has the following methods:

 


IDLgrVRML::Cleanup

The IDLgrVRML::Cleanup procedure method performs all cleanup on the object. IDLgrVRML is described above.

Calling Sequence

OBJ_DESTROY, Obj

or

Obj -> [IDLgrVRML::] Cleanup                               ( In a subclass' Cleanup method only .)

Arguments

There are no arguments for this method.

Keywords

There are no keywords for this method.


IDLgrVRML::Draw

The IDLgrVRML:: Draw procedure method draws the given picture to this graphics destination. IDLgrVRML is described above.

Calling Sequence

Obj -> [IDLgrVRML::] Draw, Picture

Arguments

Picture

The view (an instance of an IDLgrView object) to be drawn. If the view has a LOCATION property, it is ignored.

Keywords

There are no keywords for this method.


IDLgrVRML::GetProperty

The IDLgrVRML:: GetProperty procedure method retrieves the value of a property or group of properties for the VRML object. IDLgrVRML is described above.

Calling Sequence

Obj -> [IDLgrVRML::] GetProperty

Arguments

There are no arguments for this method.

Keywords

Any keyword to IDLgrVRML::Init

ALL

Set this keyword to a named variable that will contain an anonymous structure containing the values of all of the retrievable properties associated with this object.


IDLgrVRML::GetTextDimensions

The IDLgrVRML:: GetTextDimensions function method retrieves the dimensions of a text object that will be rendered in the clipboard buffer. The result is a 3-element floating-point vector [ xDim , yDim , zDim ] representing the dimensions of the text object, measured in data units. IDLgrVRML is described above.

Calling Sequence

Result = Obj -> [IDLgrVRML::] GetTextDimensions( TextObj )

Arguments

TextObj

The object reference to a text or axis object for which the text dimensions are requested.

Keywords

DESCENT

Set this keyword equal to a named variable that will contain an array of floating-point values (one for each string in the IDLgrText object). The values represent the distance to travel (parallel to the UPDIR vector) from the text baseline to reach the bottom of the lowest descender in the string. All values will be negative numbers, or zero. This keyword is valid only if TextObj is an IDLgrText object.


IDLgrVRML::Init

The IDLgrVRML:: Init function method initializes the VRML object. IDLgrVRML is described above.

Calling Sequence

Obj = OBJ_NEW('IDLgrVRML')

or

Result = Obj -> [IDLgrVRML::] Init()         ( In a subclass' Init method only .)

Arguments

There are no arguments for this method.

Keywords

Properties retrievable via IDLgrVRML::GetProperty

COLOR_MODEL (Get)

Set this keyword to the color model to be used for the buffer:

DIMENSIONS (Get, Set)

Set this keyword to a two-element vector of the form [ width , height ] to specify the dimensions of the window in units specified by the UNITS property. The default is [640,480].

FILENAME (Get, Set)

Set this keyword to the name of a file into which the vector data will be saved. The default is idl.wrl .

GRAPHICS_TREE (Get, Set)

Set this keyword to an object reference of type IDLgrView. If this property is set to a valid object reference, calling the Draw method on the destination object with no arguments will cause the object reference associated with this property to be drawn. If this object is valid and the destination object is destroyed, this object reference will be destroyed as well. By default the GRAPHICS_TREE property is set equal to the null-object.

N_COLORS (Get)

Set this keyword to the number of colors (between 2 and 256) to be used if COLOR_MODEL is set to indexed.

PALETTE (Get, Set)

Set this keyword to the object reference of a palette object (an instance of the IDLgrPalette object class) to specify the red, green, and blue values that are to be loaded into the buffer's color lookup table.

QUALITY (Get, Set)

Set this keyword to an integer indicating the rendering quality at which graphics are to be drawn to the buffer. Valid values are:

RESOLUTION (Get, Set)

Set this keyword to a two-element vector of the form [ xres , yres ] specifying the device resolution in centimeters per pixel.

UNITS (Get, Set)

Set this keyword to indicate the units of measure for the DIMENSIONS property. Valid values are:

UVALUE (Get, Set)

Set this keyword to a value of any type. You can use this user value to contain any information you wish.

WORLDINFO

Set this keyword to a list of strings for the info field of the VRML WorldInfo node. The default is the null string, ''.

WOLRDTITLE

Set this keyword to a string containing the title for the VRML WorldInfo node, TITLE field. The default is ' IDL VRML file' .


IDLgrVRML::SetProperty

The IDLgrVRML:: SetProperty procedure method sets the value of a property or group of properties for the VRML world. IDLgrVRML is described above.

Calling Sequence

Obj -> [IDLgrVRML::] SetProperty

Arguments

There are no arguments for this method.

Keywords

Any keyword to IDLgrVRML::Init