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.
Constructs an AlWindow wrapper object.
Deletes an AlWindow wrapper object.
Returns the class identifier kWindowType.
Creates a window with the specified view type. The possible view types are kFront, kRight, kTop, kPerspective, or kSbd.
tp - the view type to create
sSuccess - the window was created
sFailure - the window could not be created
sInvalidArgument - an unknown view type was specified
Returns an exact duplicate of this AlWindow wrapper.
Deletes the window.
sSuccess - the window was deleted
sFailure - the window was not attached to a layer
sInvalidObject - the window was not valid
Returns a pointer to the next AlWindow. Otherwise, returns NULL if there is no next window.
Returns a pointer to the previous AlWindow. Otherwise, returns NULL if there is no previous window.
Destructively points this wrapper to next window. If there is no such window, the object pointer is unaltered.
sSuccess - the wrapper points to the next window
sFailure - there is no next window
sInvalidObject - the window is invalid
Destructively points this wrapper to the previous window. If there is no such window, the object pointer is unaltered.
sSuccess - the wrapper points to the previous window
sFailure - there is no previous window
sInvalidObject - the window is invalid
Returns the view type of the current window.
> tp - the variable to return the view type in
sSuccess - the view type was returned
sInvalidObject - the window is invalid
Returns TRUE if the window is zoomed.
> b - the variable to return the status
sSuccess - the status was returned
sInvalidObject - the window is invalid
Use this method to find out if this window is visible. A window may be hidden by another.
> visible - the variable to return the result
sSuccess - the status was returned
sInvalidObject - the window is invalid
Returns the effective camera of a modeling window.
This function returns either:
a) its camera if it has one.
b) if the window is a MagnifyWindow, and the parent window has a camera, then that camera.
c) NULL, if the window is null, or we couldn’t find a camera using (a) or (b).
Sets the window’s camera to the given perspective camera.
cam - the perspective camera
sSuccess - the camera was set
sInvalidObject - the window is invalid
sInvalidArgument - the camera is invalid
Retrieves the position of a window.
x,y - the variables to return the window’s positions in
sSuccess - the position was returned
sInvalidObject - the window is invalid
Sets the position of a window.
x,y - the window’s new position
sSuccess - the position was set
sFailure - the window could not be moved
sInvalidObject - the window is invalid
Retrieves the resolution of a window.
x,y - the variables to return the window’s resolution
sSuccess - the resolution was returned
sInvalidObject - the window is invalid
Sets the resolution of a window.
x,y - the window’s new resolution
c - the corner that the window is relative to
t - the scale aspect type (kNoScale, kScaleY, kScaleX)
sSuccess - the position was set
sFailure - the window could not be moved
sInvalidObject - the window is invalid
Retrieves the priority of a window as a number ranging from 1 to 9. If a window’s priority is not contained within a PRIORITYICON, it is implied to be 3.
p - the variables to return the window’s priority
sSuccess - the priority was returned
sInvalidObject - the window is invalid
Sets the priority of a window, as a number of range [1..9]. If priority is out of range, nothing is changed and sFailure is returned.
p - the window’s new priority
sSuccess - the priority was set
sFailure - the priority was out of range
sInvalidObject - the window is invalid
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.
< x,y - the screen position
> rx1,ry1,rz1 - one corner of the mapped area
> rx2,ry2,rz2 - the other corner of the mapped area
sSuccess - the priority was set
sFailure - the priority was out of range
sInvalidObject - the window is invalid
Retrieves the bounding box of the window.
> xmin, ymin, zmin - lower corner of the bounding box
> xmax, ymax, zmax - upper corner of the bounding box
sSuccess - the priority was set
sFailure - the priority was out of range
sInvalidObject - the window is invalid
Retrieves the size of the window. This function will always return sFailure in OpenModel.
> sizex, sizey - the returned size
sSuccess - the size was returned
sFailure - size could not be determined
Retrieves the position of the window. This function will always return sFailure in OpenModel.
> posx, posy - the returned position
sSuccess - the position was returned
sFailure - position could not be determined
Retrieves the size of the grid in world coordinates.
Sets the size of the grid (in world coordinates) of a window.
size - the window’s new grid size
sSuccess - the grid size was set
sInvalidObject - the window is invalid