Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

Rt2dDevice
[Rt2d]


Functions

RwBool  Rt2dDeviceGetStep (RwV2d *xstep, RwV2d *ystep, RwV2d *origin)
RwBool  Rt2dDeviceSetMetric (RwReal x, RwReal y, RwReal w, RwReal h)
RwBool  Rt2dDeviceGetMetric (RwReal *x, RwReal *y, RwReal *w, RwReal *h)
RwBool  Rt2dDeviceSetFlat (RwReal r)
RwBool  Rt2dDeviceGetClippath (Rt2dPath *path)
RwBool  Rt2dVisible (RwReal x, RwReal y, RwReal w, RwReal h)
RwBool  Rt2dDeviceSetLayerDepth (RwReal depth)
RwBool  Rt2dDeviceSetCamera (RwCamera *cam)
RwCamera Rt2dDeviceGetCamera (void)

Detailed Description

Camera device functions

Function Documentation

RwCamera* Rt2dDeviceGetCamera void   
 

Rt2dDeviceGetCamera is used to get a pointer to the camera previously defined by Rt2dDeviceSetCamera

Returns:
a pointer to the used camera
See also:
Rt2dDeviceSetCamera
RwBool Rt2dDeviceGetClippath Rt2dPath   path
 

Rt2dDeviceGetClippath is used to construct a 2D path that maps directly to the camera raster's clipping boundary. The resulting path thus encloses the whole camera view at the current layer depth. The include file rt2d.h and the library file rt2d.lib are required to use this function.

Parameters:
path  Pointer to the path
Returns:
TRUE if successful or FALSE if there is an error
See also:
Rt2dDeviceSetLayerDepth
RwBool Rt2dDeviceGetMetric RwReal   x,
RwReal   y,
RwReal   w,
RwReal   h
 

Rt2dDeviceGetMetric is a helper function that is used to return the specified rectangular space in the camera display. Where (x, y) is origin at the bottom left corner and (w, h) is the width and height. The include file rt2d.h and the library file rt2d.lib are required to use this function.

Parameters:
x  A pointer to a RwReal for the x-coordinate of the display's xOrigin.
y  A pointer to a RwReal for the y-coordinate of the display's yOrigin.
w  A pointer to a RwReal for the width of the display.
h  A pointer to a RwReal for the height of the display.
Returns:
TRUE if successful or FALSE if there is an error.
See also:
Rt2dDeviceSetMetric , Rt2dDeviceGetStep
RwBool Rt2dDeviceGetStep RwV2d   xstep,
RwV2d   ystep,
RwV2d   origin
 

Rt2dDeviceGetStep is a helper function that is used to retrieve a triplet of vectors in the view modelling space that specify (a) the step to take to move exactly one pixel in the x-direction, (b) the step to take to move exactly one pixel in the y-direction, and (c) the position of the origin of the modelling space. The include file rt2d.h and the library file rt2d.lib are required to use this function.

Parameters:
xstep  Pointer to a 2D vector that will receive the x-pixel increment
ystep  Pointer to a 2D vector that will receive the y-pixel increment
origin  Pointer to a 2D vector that will receive the position of the origin
Returns:
TRUE if successful or FALSE if there is an error
See also:
Rt2dDeviceGetMetric , Rt2dDeviceSetMetric
RwBool Rt2dDeviceSetCamera RwCamera   cam
 

Rt2dDeviceSetCamera is used to define that the specified camera is to be used for the output of any further 2D rendering. The 2D toolkit caches some values of the camera and does not keep track of any changes made to the specified camera. This functions must be called if the camera's view window and raster dimensions are changed. The include file rt2d.h and the library file rt2d.lib are required to use this function.

Parameters:
cam  Pointer to the camera
Returns:
TRUE if successful or FALSE if there is an error
See also:
Rt2dOpen
RwBool Rt2dDeviceSetFlat RwReal    r
 

Rt2dDeviceSetFlat is used to define the maximum pixel error that is tolerated when the curved parts of paths are tessellated, either explicitly using Rt2dPathFlatten or during rendering. Tolerance must be greater than zero. The default tolerance value is 0.5. The include file rt2d.h and the library file rt2d.lib are required to use this function.

Parameters:
r  A RwReal value equal to the tolerance
Returns:
TRUE if successful or FALSE if there is an error
See also:
Rt2dPathFlatten
RwBool Rt2dDeviceSetLayerDepth RwReal    depth
 

Rt2dDeviceSetLayerDepth is used to define the distance to a plane parallel to the camera view-plane on which any 2D rendering will take place. This function is useful when an application wishes to mix 3D and 2D rendering in the same camera view. The depth must be greater than zero. The default layer depth is 1.0. The include file rt2d.h and the library file rt2d.lib are required to use this function.

Parameters:
depth  A RwReal value equal to the camera distance at which 2D is performed
Returns:
TRUE if successful or FALSE if there is an error
See also:
Rt2dDeviceGetClippath , Rt2dDeviceSetMetric
RwBool Rt2dDeviceSetMetric RwReal    x,
RwReal    y,
RwReal    w,
RwReal    h
 

Rt2dDeviceSetMetric is a helper function which can used to map the specified rectangular space to the camera display. After this function has been called, the lower- left corner of the camera view has coordinates (xOrigin, yOrigin) and a width and height as specified. For example, if the camera's frame buffer has dimensions 640x480, calling Rt2dDeviceSetMetric(0.0f, 0.0f, 640.0f, 480.0f) would enable an application to specified positions in terms of pixel locations on the frame buffer. The include file rt2d.h and the library file rt2d.lib are required to use this function.

Parameters:
x  A RwReal value equal to the x-coordinate of the display's xOrigin
y  A RwReal value equal to the y-coordinate of the display's yOrigin
w  A RwReal value equal to the width of the display
h  A RwReal value equal to the height of the display
Returns:
TRUE if successful or FALSE if there is an error
See also:
Rt2dDeviceGetMetric , Rt2dDeviceGetStep
RwBool Rt2dVisible RwReal    x,
RwReal    y,
RwReal    w,
RwReal    h
 

Rt2dVisible is used to determine if a box of the specified position and dimensions is visible in the current camera view. Use this function to determine whether a particular graphic can be seen and needs to be rendered. The include file rt2d.h and the library file rt2d.lib are required to use this function.

Parameters:
x  A RwReal value equal to the x-coordinate of the lower-left of the box.
y  A RwReal value equal to the y-coordinate of the lower-left of the box.
w  A RwReal value equal to the width of the box.
h  A RwReal value equal to the height of the box.
Returns:
TRUE if the box is visible or FALSE if not.
See also:
Rt2dDeviceGetClippath

Criterion Software © 1993-2003 Criterion Software Limited. All rights reserved. Built Tue Apr 22 12:46:47 2003. Send Feedback
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)