3Depict
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Macros | Functions
tr.cpp File Reference
#include "common/assertion.h"
#include <math.h>
#include <cstdlib>
#include <GL/gl.h>
#include <GL/glu.h>
#include "tr.h"
Include dependency graph for tr.cpp:

Classes

struct  _TRctx
 

Macros

#define DEFAULT_TILE_WIDTH   256
 
#define DEFAULT_TILE_HEIGHT   256
 
#define DEFAULT_TILE_BORDER   0
 

Functions

TRcontexttrNew (void)
 
void trDelete (TRcontext *tr)
 
void trTileSize (TRcontext *tr, GLint width, GLint height, GLint border)
 
void trTileBuffer (TRcontext *tr, GLenum format, GLenum type, GLvoid *image)
 
void trImageSize (TRcontext *tr, GLint width, GLint height)
 
void trImageBuffer (TRcontext *tr, GLenum format, GLenum type, GLvoid *image)
 
GLint trGet (TRcontext *tr, TRenum param)
 
void trRowOrder (TRcontext *tr, TRenum order)
 
void trOrtho (TRcontext *tr, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
 
void trFrustum (TRcontext *tr, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
 
void trPerspective (TRcontext *tr, GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar)
 
void trBeginTile (TRcontext *tr)
 
int trEndTile (TRcontext *tr)
 
void trRasterPos3f (TRcontext *tr, GLfloat x, GLfloat y, GLfloat z)
 

Macro Definition Documentation

◆ DEFAULT_TILE_BORDER

#define DEFAULT_TILE_BORDER   0

Referenced by trNew().

◆ DEFAULT_TILE_HEIGHT

#define DEFAULT_TILE_HEIGHT   256

Referenced by trNew().

◆ DEFAULT_TILE_WIDTH

#define DEFAULT_TILE_WIDTH   256

Referenced by trNew().

Function Documentation

◆ trBeginTile()

void trBeginTile ( TRcontext tr)

References _TRctx::CurrentTile.

Referenced by BasicGLPane::saveImage().

Here is the caller graph for this function:

◆ trDelete()

void trDelete ( TRcontext tr)

Referenced by BasicGLPane::saveImage().

Here is the caller graph for this function:

◆ trEndTile()

int trEndTile ( TRcontext tr)

◆ trFrustum()

void trFrustum ( TRcontext tr,
GLdouble  left,
GLdouble  right,
GLdouble  bottom,
GLdouble  top,
GLdouble  zNear,
GLdouble  zFar 
)

References _TRctx::Bottom, _TRctx::Far, _TRctx::Left, _TRctx::Near, _TRctx::Perspective, _TRctx::Right, and _TRctx::Top.

Referenced by trPerspective().

Here is the caller graph for this function:

◆ trGet()

GLint trGet ( TRcontext tr,
TRenum  param 
)

◆ trImageBuffer()

void trImageBuffer ( TRcontext tr,
GLenum  format,
GLenum  type,
GLvoid *  image 
)

References _TRctx::ImageBuffer, _TRctx::ImageFormat, and _TRctx::ImageType.

Referenced by BasicGLPane::updateClearColour().

Here is the caller graph for this function:

◆ trImageSize()

void trImageSize ( TRcontext tr,
GLint  width,
GLint  height 
)

References _TRctx::ImageHeight, and _TRctx::ImageWidth.

Referenced by BasicGLPane::updateClearColour().

Here is the caller graph for this function:

◆ trNew()

TRcontext* trNew ( void  )

◆ trOrtho()

void trOrtho ( TRcontext tr,
GLdouble  left,
GLdouble  right,
GLdouble  bottom,
GLdouble  top,
GLdouble  zNear,
GLdouble  zFar 
)

References _TRctx::Bottom, _TRctx::Far, _TRctx::Left, _TRctx::Near, _TRctx::Perspective, _TRctx::Right, and _TRctx::Top.

Referenced by BasicGLPane::saveImage().

Here is the caller graph for this function:

◆ trPerspective()

void trPerspective ( TRcontext tr,
GLdouble  fovy,
GLdouble  aspect,
GLdouble  zNear,
GLdouble  zFar 
)

References M_PI, and trFrustum().

Referenced by BasicGLPane::saveImage().

Here is the caller graph for this function:

◆ trRasterPos3f()

void trRasterPos3f ( TRcontext tr,
GLfloat  x,
GLfloat  y,
GLfloat  z 
)

◆ trRowOrder()

void trRowOrder ( TRcontext tr,
TRenum  order 
)

References _TRctx::RowOrder, TR_BOTTOM_TO_TOP, and TR_TOP_TO_BOTTOM.

Referenced by BasicGLPane::updateClearColour().

Here is the caller graph for this function:

◆ trTileBuffer()

void trTileBuffer ( TRcontext tr,
GLenum  format,
GLenum  type,
GLvoid *  image 
)

◆ trTileSize()

void trTileSize ( TRcontext tr,
GLint  width,
GLint  height,
GLint  border 
)

References ASSERT, _TRctx::TileBorder, _TRctx::TileHeight, _TRctx::TileHeightNB, _TRctx::TileWidth, and _TRctx::TileWidthNB.

Referenced by BasicGLPane::updateClearColour().

Here is the caller graph for this function: