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  -  SOOFFSCREENRENDERER (3)

NAME

SoOffscreenRenderer — renders to an off-screen buffer for printing or generating textures

CONTENTS

Inherits From
Synopsis
Description
Methods

INHERITS FROM

SoOffscreenRenderer

SYNOPSIS

#include <Inventor/SoOffscreenRenderer.h>

enum Components {     SoOffscreenRenderer::LUMINANCE    
                           SoOffscreenRenderer::LUMINANCE

    SoOffscreenRenderer::LUMINANCE_TRANSPARENCY    
                           SoOffscreenRenderer::LUMINANCE_TRANSPARENCY

    SoOffscreenRenderer::RGB    
                           SoOffscreenRenderer::RGB  

    SoOffscreenRenderer::RGB_TRANSPARENCY    
                           SoOffscreenRenderer::RGB_TRANSPARENCY

}

Methods from class SoOffscreenRenderer:

       
                          
                           SoOffscreenRenderer(const SbViewportRegion &viewportRegion)    
   
                          
                           SoOffscreenRenderer(SoGLRenderAction *ra)    
   
                          
                           ~SoOffscreenRenderer()    
static float    
                          
static float               getScreenPixelsPerInch()    
static SbVec2s    
                          
static SbVec2s             getMaximumResolution()    
void    
                          
void                       setComponents(Components components)    
Components    
                          
Components                 getComponents() const    
void    
                          
void                       setViewportRegion(const SbViewportRegion ®ion)    
const SbViewportRegion &    
                          
const SbViewportRegion &   getViewportRegion() const    
void    
                          
void                       setBackgroundColor(const SbColor &c)    
const SbColor &    
                          
const SbColor &            getBackgroundColor() const    
void    
                          
void                       setGLRenderAction(const SoGLRenderAction *ra)    
SoGLRenderAction *    
                          
SoGLRenderAction *         getGLRenderAction() const    
SbBool    
                          
SbBool                     render(SoNode *scene)    
SbBool    
                          
SbBool                     render(SoPath *scene)    
unsigned char *    
                          
unsigned char *            getBuffer() const    
SbBool    
                          
SbBool                     writeToRGB(FILE *fp) const    
SbBool    
                          
SbBool                     writeToPostScript(FILE *fp) const    
SbBool    
                          
SbBool                     writeToPostScript(FILE *fp, const SbVec2f &printSize) const

DESCRIPTION

This class is used to render into an off-screen buffer to create a printable image or to generate a texture image. It uses X Pixmaps for rendering. Methods are provided to write the buffer to a file, either as an RGB image or an encapsulated PostScript description.

METHODS

       
                          
                           SoOffscreenRenderer(const SbViewportRegion &viewportRegion)    
   
                          
                           SoOffscreenRenderer(SoGLRenderAction *ra)    
   
                          
                           ~SoOffscreenRenderer()
Constructors and destructor. If a render action is passed to the contructor, that action will be used in all subsequent offscreen renderings. Otherwise, an internal instance of an SoGLRenderAction will be maintained with a viewport region set to the on passed in by the constructor.

    static float    
                          
static float               getScreenPixelsPerInch()
Returns the number of pixels per inch (in the horizontal direction) of the current X device screen.

    static SbVec2s    
                          
static SbVec2s             getMaximumResolution()
Get the maximum supported resolution of the viewport.

    void    
                          
void                       setComponents(Components components)    
Components    
                          
Components                 getComponents() const
Sets or returns the components to be rendered.

    void    
                          
void                       setViewportRegion(const SbViewportRegion ®ion)    
const SbViewportRegion &    
                          
const SbViewportRegion &   getViewportRegion() const
Sets or returns the viewport region used for rendering. This will NOT be applied to the viewport region of any render action passed in.

    void    
                          
void                       setBackgroundColor(const SbColor &c)    
const SbColor &    
                          
const SbColor &            getBackgroundColor() const
Sets or returns the background color for rendering.

    void    
                          
void                       setGLRenderAction(const SoGLRenderAction *ra)    
SoGLRenderAction *    
                          
SoGLRenderAction *         getGLRenderAction() const
Set and get the render action to use for rendering. This will return any render action passed in by the caller.

    SbBool    
                          
SbBool                     render(SoNode *scene)    
SbBool    
                          
SbBool                     render(SoPath *scene)
Renders the given scene, specified as a node or a path, into an off-screen buffer.

    unsigned char *    
                          
unsigned char *            getBuffer() const
Returns the buffer containing the rendered image. The buffer is an array of unsigned characters. Each pixel is stored sequentially by scanline, starting with the lower left corner. The data stored for each pixel is determined by the Components set before rendering. Pixels are stored in RGBA order and are packed without any padding between pixels or scanlines. The buffer is allocated by the offscreen renderer class and the space is deleted when the instance is destructed.

    SbBool    
                          
SbBool                     writeToRGB(FILE *fp) const
Writes the buffer as a .rgb file to the given file pointer.

    SbBool    
                          
SbBool                     writeToPostScript(FILE *fp) const    
SbBool    
                          
SbBool                     writeToPostScript(FILE *fp, const SbVec2f &printSize) const
Writes the buffer as encapsulated PostScript. If a print size is not given, the size of the image in the buffer is adjusted so it is the same as the apparent size of the viewport region on the current device.

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


SOOFFSCREENRENDERER(3IV) (-->)

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