Chapter 1: Documentation to Come Soon of Liberty BASIC Wire Frame Functions

Tom Nally


Return to Introducing the Liberty BASIC Wire Frame Library


Contents


Set Up the Viewing Environment


Function FF.LBWF.Camera(CamX, CamY, CamZ, VCtrX, VCtrY, VCtrZ, ZoomFac)

Function FF.LBWF.Camera(CamX, CamY, CamZ, VCtrX, VCtrY, VCtrZ, ZoomFac)


Creating Boxes and Cylinders


Function FF.LBWF.CreateBox(BoxName$, xdim, zdim, boxheight, BoxColor$)

Function FF.LBWF.CreateCylinder(CylName$, radius, numSides, cylheight, CylColor$)


Moving an Object


Function FF.LBWF.TranslateObject(ObjectName$, transX, transY, transZ)





Function ()



Set Up the Viewing Environment



Function FF.LBWF.Camera(CamX, CamY, CamZ, VCtrX, VCtrY, VCtrZ, ZoomFac)

In order to create a wire model view, the programmer must establish the point in space where the camera resides, and then identify the point in space where the camera points.





Function FF.LBWF.ScreenCenter(ScrCenterX, ScrCenterY)

This function establishes the "screen center". Essentially, the screen center is the point in your Liberty BASIC graphicbox that corresponds to the point defined by (VCtrX, VCtrY, VCtrZ).



Occasionally, the programmer does not want to plot the 3D image at the center of the graphicbox. In that case, move ScrCenterX and ScrCenterY accordingly.


Creating Boxes and Cylinders


Version 0.5 of the LBWF Library provides functions for the creation of six different objects. Below, I will provide the documentation for creating boxes and cylinders. In subsequent chapters, I will provide documentation for additional objects.


Function FF.LBWF.CreateBox(BoxName$, xdim, zdim, boxheight, BoxColor$)

As the reader could guess, this function creates a box . Understand, however, that the data for the box is merely created in memory. The box will not be plotted in the graphicbox until a function is called which draws the object.






So, where are boxes -- and other objects -- plotted? The default location of a box is centered on the y-axis, with the bottom of the box resting on the X-Z plane. All objects are originally positioned similarly. Elsewhere, I will identify the function that allows the programmer to move any objects she creates.


Function FF.LBWF.CreateCylinder(CylName$, radius, numSides, cylheight, CylColor$)







Moving an Object



Function FF.LBWF.TranslateObject(ObjectName$, transX, transY, transZ)

To translate an object means to move the object without rotating it. LBWF provides a single translation function to move an object in any or all of the x-, y-, or z- axes.



Note that this function will always move the object relative to the object's current position. Note also that the object will not appear to move until a subsequent draw command is issued.