GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SBVIEWPORTREGION (3)

NAME

SbViewportRegion — class for representing a viewport

CONTENTS

Inherits From
Synopsis
Description
Methods
File Format/defaults
See Also

INHERITS FROM

SbViewportRegion

SYNOPSIS

#include <Inventor/SbViewportRegion.h>

Methods from class SbViewportRegion:

       
                    
                     SbViewportRegion()    
   
                    
                     SbViewportRegion(short width, short height)    
   
                    
                     SbViewportRegion(SbVec2s winSize)    
   
                    
                     SbViewportRegion(const SbViewportRegion &vpReg)    
void    
                    
void                 setWindowSize(short width, short height)    
void    
                    
void                 setWindowSize(SbVec2s winSize)    
void    
                    
void                 setViewport(float left, float bottom, float width, float height)    
void    
                    
void                 setViewport(SbVec2f origin, SbVec2f size)    
void    
                    
void                 setViewportPixels(short left, short bottom, short width, short height)    
void    
                    
void                 setViewportPixels(SbVec2s origin, SbVec2s size)    
const SbVec2s &    
                    
const SbVec2s &      getWindowSize() const    
const SbVec2f &    
                    
const SbVec2f &      getViewportOrigin() const    
const SbVec2s &    
                    
const SbVec2s &      getViewportOriginPixels() const    
const SbVec2f &    
                    
const SbVec2f &      getViewportSize() const    
const SbVec2s &    
                    
const SbVec2s &      getViewportSizePixels() const    
float    
                    
float                getViewportAspectRatio() const    
void    
                    
void                 scaleWidth(float ratio)    
void    
                    
void                 scaleHeight(float ratio)    
void    
                    
void                 setPixelsPerInch(float ppi)    
float    
                    
float                getPixelsPerInch() const    
float    
                    
float                getPixelsPerPoint() const    
friend int    
                    
friend int           operator ==(const SbViewportRegion ®1, const SbViewportRegion ®2)

DESCRIPTION

This class represents the active viewport region in a display window. It contains the screen-space size of the window as well as the origin and size of the viewport within the window. By default, the viewport is the same as the full window. Methods allow the viewport to be set either in terms of screen-space pixels or as normalized coordinates, where (0,0) is the lower-left corner of the window and (1,1) is the upper-right corner.

METHODS

       
                    
                     SbViewportRegion()    
   
                    
                     SbViewportRegion(short width, short height)    
   
                    
                     SbViewportRegion(SbVec2s winSize)    
   
                    
                     SbViewportRegion(const SbViewportRegion &vpReg)
Constructors of various kinds.

    void    
                    
void                 setWindowSize(short width, short height)
Changes window size to given width and height in pixels.

    void    
                    
void                 setWindowSize(SbVec2s winSize)
Changes window size to given width and height in pixels, given as SbVec2s.

    void    
                    
void                 setViewport(float left, float bottom, float width, float height)
Sets viewport to given region, specified as normalized window coordinates: (0,0) is the lower-left corner, (1,1) is the upper-right.

    void    
                    
void                 setViewport(SbVec2f origin, SbVec2f size)
Sets viewport to region with given origin (lower-left corner) and size, given as normalized coordinate vectors.

    void    
                    
void                 setViewportPixels(short left, short bottom, short width, short height)
Sets viewport to given region, specified as pixel coordinates in window: (0,0) is the lower-left corner.

    void    
                    
void                 setViewportPixels(SbVec2s origin, SbVec2s size)
Sets viewport to region with given origin (lower-left corner) and size, given as pixel coordinates.

    const SbVec2s &    
                    
const SbVec2s &      getWindowSize() const
Returns window size in pixels.

    const SbVec2f &    
                    
const SbVec2f &      getViewportOrigin() const
Returns viewport origin in normalized coordinates.

    const SbVec2s &    
                    
const SbVec2s &      getViewportOriginPixels() const
Returns viewport origin in pixels.

    const SbVec2f &    
                    
const SbVec2f &      getViewportSize() const
Returns viewport size in normalized coordinates.

    const SbVec2s &    
                    
const SbVec2s &      getViewportSizePixels() const
Returns viewport size in pixels.

    float    
                    
float                getViewportAspectRatio() const
Returns aspect ratio (width/height) of viewport.

    void    
                    
void                 scaleWidth(float ratio)    
void    
                    
void                 scaleHeight(float ratio)
Scales viewport within window to be the given ratio of its current width or height, leaving the resulting viewport centered about the same point as the current one.

    void    
                    
void                 setPixelsPerInch(float ppi)    
float    
                    
float                getPixelsPerInch() const
Sets/returns the pixel-per-inch ratio for the display device the viewport is part of. The default value is 72 (1 pixel per printer’s point).

    float    
                    
float                getPixelsPerPoint() const
Convenience function that returns number of pixels per printer’s point.

    friend int    
                    
friend int           operator ==(const SbViewportRegion ®1, const SbViewportRegion ®2)
Equality comparison operator.

FILE FORMAT/DEFAULTS

SEE ALSO

SbVec2f, SbVec2s

Search for    or go to Top of page |  Section 3 |  Main Index


SBVIEWPORTREGION(3IV) (-->)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.