3ds Max C++ API Reference
Loading...
Searching...
No Matches
RenderInfo Class Reference

#include <bitmap.h>

+ Inheritance diagram for RenderInfo:

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 = 0.f
 
float ky = 0.f
 
float xc = 0.f
 
float yc = 0.f
 
BOOL fieldRender = FALSE
 
BOOL fieldOdd = FALSE
 
TimeValue renderTime [2] = { 0 }
 
Matrix3 worldToCam [2]
 
Matrix3 camToWorld [2]
 
Rect region
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
 

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.

Constructor & Destructor Documentation

◆ RenderInfo()

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

◆ MapWorldToScreen()

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.
592{ return MapCamToScreen(worldToCam[field]*p);}
BMMExport Point2 MapCamToScreen(Point3 p)
Matrix3 worldToCam[2]
Definition: bitmap.h:581

◆ MapCamToScreen()

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.

◆ MapScreenToCamRay()

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

The screen point.

◆ MapScreenToWorldRay()

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

◆ projType

ProjectionType projType = {}

◆ kx

float kx = 0.f

◆ ky

float ky = 0.f

◆ xc

float xc = 0.f

◆ yc

float yc = 0.f

◆ fieldRender

BOOL fieldRender = FALSE

◆ fieldOdd

BOOL fieldOdd = FALSE

◆ renderTime

TimeValue renderTime[2] = { 0 }

◆ worldToCam

Matrix3 worldToCam[2]

◆ camToWorld

Matrix3 camToWorld[2]

◆ region

Rect region