For simple 3D drawing in openFrameworks, follow these steps:
ofEnableDepthTest()function call in the beginning of the
testApp::draw()function to enable z-buffering. If you omit it, all the graphics objects will be rendered without respect to their z coordinate in correspondence with the graphical primitives' rendering order.
ofLine( x1, y1, z1, x2, y2, z2 )function draws a line segment between points (
z1) and (
z2). There is an overloaded version of the function,
ofLine( p1, p2 ), where
ofPoint. Use the
ofSetLineWidth()functions to adjust its rendering properties of color and line width.
In Chapter 2, Drawing in 2D, we used the