Public Member Functions | Public Attributes

RenderInfo Class Reference

Search for all occurrences

Detailed Description

See also:
Class Ray, Class Point2, Class Point3.

Description:
This class provides information about the rendering environment. All methods of this class are implemented by the system.
Data Members:
ProjectionType projType;

The projection type: One of the following values:

ProjPerspective

ProjParallel

float kx,ky;

3D to 2D projection scale factor.

float xc,yc;

The screen origin.

BOOL fieldRender;

Indicates if the image is field rendered.

BOOL fieldOdd;

If TRUE, the first field is Odd lines.

TimeValue renderTime[2];

Render time for the 2 fields, if field rendering. If not, use renderTime[0].

Matrix3 worldToCam[2];

The world to camera transformation matrix; worldToCam[0] is for field 0, worldToCam[1] is for field 1. Use worldToCam[0] if not field rendering.

Matrix3 camToWorld[2];

The camera to world transformation matrix; camToWorld[0] is for field 0, camToWorld[1] is for field 1. Use camToWorld[0] if not field rendering.

Rect region;

This data member is available in release 4.0 and later only.

This rectangle holds the sub-region in the image that was rendered if the last render was a region render. If it was not a region render then the rectangle is empty.

#include <bitmap.h>

Inheritance diagram for RenderInfo:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  RenderInfo ()
BMMExport Point2  MapWorldToScreen (Point3 p, int field=0)
BMMExport Point2  MapCamToScreen (Point3 p)
BMMExport Ray  MapScreenToCamRay (Point2 p)
BMMExport Ray  MapScreenToWorldRay (Point2 p, int field=0)

Public Attributes

ProjectionType  projType
float  kx
float  ky
float  xc
float  yc
BOOL  fieldRender
BOOL  fieldOdd
TimeValue  renderTime [2]
Matrix3  worldToCam [2]
Matrix3  camToWorld [2]
Rect  region

Constructor & Destructor Documentation

Remarks:
Constructor. The data members are initialized as follows:

renderTime[0] = renderTime[1] = 0;

worldToCam[0].IdentityMatrix();

worldToCam[1].IdentityMatrix();

camToWorld[0].IdentityMatrix();

camToWorld[1].IdentityMatrix();

fieldRender = fieldOdd = FALSE;

projType = ProjPerspective;

kx = ky = 1.0f;

xc = yc = 400.0f;

Member Function Documentation

BMMExport Point2 MapWorldToScreen ( Point3  p,
int  field = 0 
) [inline]
Remarks:
Maps the specified world point to a screen point.
Parameters:
Point3 p

The world point.

int field=0

The field order. This specifies which camToWorld matrix is used in the conversion.
Returns:
The 2D screen point.
{ return MapCamToScreen(worldToCam[field]*p);}
BMMExport Point2 MapCamToScreen ( Point3  p )
Remarks:
Maps the specified point in camera space to screen space and returns it.
Parameters:
Point3 p

The point to convert.
BMMExport Ray MapScreenToCamRay ( Point2  p )
Remarks:
Returns the viewing ray through the screen point, in camera space.
Parameters:
Point2 p

The screen point.
BMMExport Ray MapScreenToWorldRay ( Point2  p,
int  field = 0 
)
Remarks:
Returns the viewing ray through the specified screen point, in world space.
Parameters:
Point2 p

The screen space point.

int field=0

The field order - specifies which camToWorld matrix is used in the conversion.

Member Data Documentation

ProjectionType projType
float kx
float ky
float xc
float yc
BOOL fieldOdd
TimeValue renderTime[2]

RenderInfo RenderInfo RenderInfo RenderInfo RenderInfo RenderInfo RenderInfo RenderInfo RenderInfo RenderInfo
RenderInfo RenderInfo RenderInfo RenderInfo RenderInfo RenderInfo RenderInfo RenderInfo RenderInfo RenderInfo