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.
NOTE: Objects or subclasses of this type can not be saved or restored.
CAUTION: Several entities cannot be translated perfectly. These include:
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.
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.
Z-clipping control, aspect ratio preservation, the LOCATION property, and orthographic projections are not supported.
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.
See IDLgrVRML::Init
The IDLgrVRML::Cleanup procedure method performs all cleanup on the object. IDLgrVRML is described above.
NOTE: Cleanup methods are special lifecycle methods , and as such cannot be called outside the context of object destruction. This means that in most cases, you cannot call the Cleanup method directly. There is one exception to this rule: If you write your own subclass of this class, you can call the Cleanup method from within the Cleanup method of the subclass.
The IDLgrVRML:: Draw procedure method draws the given picture to this graphics destination. IDLgrVRML is described above.
The view (an instance of an IDLgrView object) to be drawn. If the view has a LOCATION property, it is ignored.
The IDLgrVRML:: GetProperty procedure method retrieves the value of a property or group of properties for the VRML object. IDLgrVRML is described above.
Any keyword to IDLgrVRML::Init
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.
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.
The IDLgrVRML:: Init function method initializes the VRML object. IDLgrVRML is described above.
NOTE: Init methods are special lifecycle methods , and as such cannot be called outside the context of object creation. This means that in most cases, you cannot call the Init method directly. There is one exception to this rule: If you write your own subclass of this class, you can call the Init method from within the Init method of the subclass.
Properties retrievable via IDLgrVRML::GetProperty
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].
Set this keyword to the name of a file into which the vector data will be saved. The default is
idl.wrl
.
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.
Set this keyword to the number of colors (between 2 and 256) to be used if COLOR_MODEL is set to indexed.
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.
Set this keyword to an integer indicating the rendering quality at which graphics are to be drawn to the buffer. Valid values are:
Set this keyword to a two-element vector of the form [ xres , yres ] specifying the device resolution in centimeters per pixel.
Set this keyword to indicate the units of measure for the DIMENSIONS property. Valid values are:
Set this keyword to a value of any type. You can use this user value to contain any information you wish.
The IDLgrVRML:: SetProperty procedure method sets the value of a property or group of properties for the VRML world. IDLgrVRML is described above.
Any keyword to IDLgrVRML::Init