Interface to the Alias modeling windows.
#include <AlWindow.h>
class AlWindow : public AlObject , public AlAnimatable
enum AlViewType {
kViewInvalid,
kViewOther,
kFront,
kBack, /* unused */
kRight,
kLeft, /* unused */
kTop,
kBottom, /* unused */
kSbd,
kPerspective
};
enum AlCornerType {
kBottomLeft,
kTopLeft,
kTopRight,
kBottomRight
};
enum AlAspectType {
kNoScale,
kScaleY,
kScaleX
};
AlWindow();
virtual ~AlWindow();
virtual AlObjectType type() const;
statusCode create( AlViewType );
virtual AlObject* copyWrapper() const;
virtual statusCode deleteObject();
AlWindow* next() const;
AlWindow* prev() const;
statusCode nextD();
statusCode prevD();
statusCode windowType( AlViewType& );
statusCode isZoom( boolean& );
statusCode isVisible( boolean& );
virtual AlCamera* camera( void );
virtual statusCode setCamera( AlPerspectiveCamera* );
statusCode position( Screencoord&, Screencoord& );
statusCode setPosition( Screencoord, Screencoord );
statusCode resolution( Screencoord&, Screencoord& );
statusCode setResolution( Screencoord, Screencoord, AlCornerType = kTopLeft, AlAspectType = kNoScale );
statusCode priority( int& );
statusCode setPriority( int );
double gridSize();
statusCode setGridSize( double size );
virtual statusCode mapToWorldSpace( Screencoord, Screencoord, double&, double&, double&, double&, double&, double& );
virtual statusCode worldSpaceBounds( double&, double&, double&, double&, double&, double& );
static statusCode aliasWindowSize( int&, int& );
static statusCode aliasWindowPosition( int&, int& );
Alias modeling windows are the windows in which geometry information is actually viewed and modified. These are the Top, Front, Right and Perspective windows, as well as the SBD window. This class allows the creation, positioning and sizing of windows. You can also get the camera associated with a window. In addition, plug-ins can use the mapping functions to determine where in world space a screen event occurred.
AlUniverse contains methods for getting the first modeling window, the current modeling window, and the SBD window.
statusCode AlWindow::setResolution( Screencoord x, Screencoord y, AlCornerType c, AlAspectType t )
statusCode AlWindow::mapToWorldSpace( Screencoord x, Screencoord y,double& rx1, double& ry1, double& rz1,double& rx2, double& ry2, double& rz2 )
Maps a screen pixel (x,y) coordinate pair to world space coordinates (rx1,ry1,rz1)-(rx2,ry2,rz2). This function will always return sFailure in OpenModel.
statusCode AlWindow::worldSpaceBounds( double& xmin, double& ymin, double& zmin, double& xmax, double& ymax, double& zmax )
statusCode AlWindow::aliasWindowSize( int& sizex, int& sizey )
statusCode AlWindow::aliasWindowPosition( int& posx, int& posy )