Viewports and Graphics Windows
 
 
 

The 3ds Max viewport in 3ds Max is represented using the class ViewportExp. This class provides methods to access properties of the viewport, convert points between viewport and world coordinates, snap points and lengths, etc. Many methods associated with hit testing are also here. All the methods of this class are implemented by the system.

The display of geometric structures howeever is handled through a class called GraphicsWindow. An instance of a GraphicsWindow sets up access to underlying drivers that allow 2D and 3D primitives to be rendered and appear on-screen.

The methods in the GraphicsWindow class are designed to provide a fast, low-impedance pipeline to the underlying driver, and are optimized for mesh rendering.

If you wish to display a geometric object that is represented as a triangular mesh (consisting of a vertex list and a connectivity list), you should not use the GraphicsWindow methods directly. Rather, you should create a 3ds Max mesh, and then call the Mesh::Render() method. This assures that your mesh is rendered using the optimal path through the display subsystem.