(fstalloc.c:76)
Prototype:
FastAllocType FastAllocInit(unsigned TypeSz,
unsigned BlkSz,
unsigned AllgnBits,
unsigned Verbose)
Description:
Initializes an instance of an FastAllocType.
Parameters:
TypeSz: | IN, size of allocated type (in bytes).
|
---|
BlkSz: | IN, size of blocks allocated (in bytes, >= TypeSz).
|
---|
AllgnBits: | N, alignment of each allocation is 2^AllgnBits.
|
---|
Verbose: | IN, iff TRUE, FastAllocDestroy() prints statistics.
|
---|
Returned Value:
FastAllocType: The FastAlloc instance.
|
---|
Keywords:
(fstalloc.c:114)
Prototype:
VoidPtr FastAllocNew(FastAllocType Alloc)
Description:
Allocates new area of memory of size TypeSz (see FastAllocInit()).
Parameters:
Alloc: | IN, FastAllocType instance.
|
---|
Returned Value:
VoidPtr: Void pointer to the new memory area.
|
---|
Keywords:
(nc_zbufr.c:223)
Prototype:
void INCRndrBeginObject(INCZBufferPtrType Rend, IPObjectStruct *Object)
Description:
Sets the Irit object to be scan converted.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
Object: | IN, the object to be scanned.
|
---|
Returned Value:
Keywords:
scan irit object
z-buffer
(nc_zbufr.c:198)
Prototype:
void INCRndrDestroy(INCZBufferPtrType Rend)
Description:
Dispose of a the rendering context.
Parameters:
Rend: | IN,OUT, the rendering context.
|
---|
Returned Value:
Keywords:
destroy
dispose
free
release
(nc_zbufr.c:368)
Prototype:
void INCRndrEndObject(INCZBufferPtrType Rend)
Description:
Marks the end of the object scaning.
Parameters:
Rend: | N, OUT, the rendering context.
|
---|
Returned Value:
Keywords:
scan
irit object
z-buffer
(nc_zbufr.c:597)
Prototype:
int INCRndrGetActiveCells(INCZBufferPtrType Rend,
int *MinCellX,
int *MinCellY,
int *MaxCellX,
int *MaxCellY,
IrtRType *ZPixelsRemoved)
Description:
Gets the active cells - a rectangular (XMin, YMin) :; (XMax, YMax)
indices of cells where the Z-buffer was updated in, since the last call.
This function also resets all cells to inactive state
Parameters:
Rend: | IN,OUT, the rendering context.
|
---|
MinCellX, MinCellY: | OUT, Minimum indices of active cells.
|
---|
MaxCellX, MaxCellY: | OUT, Maximum indices of active cells.
|
---|
ZPixelsRemoved: | OUT, number of pixels removed since last call.
|
---|
Returned Value:
int: TRUE if we do have active cells.
|
---|
Keywords:
(nc_zbufr.c:447)
Prototype:
void INCRndrGetLineDepth(INCZBufferPtrType Rend,
int x1,
int x2,
int y,
IrtRType *ZValues)
Description:
Retrieve z-coordinate data from the z-buffer.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
x1, x2: | N, the x-range to fetch along the line.
|
---|
y: | IN, the line number.
|
---|
ZValues: | UT, a user allocated buffer to hold the result.
|
---|
Returned Value:
Keywords:
z-buffer
line Z information
(nc_zbufr.c:419)
Prototype:
void INCRndrGetPixelDepth(INCZBufferPtrType Rend,
int x,
int y,
IrtRType *Result)
Description:
Retrieve a pixel's depth from the z-buffer.
Parameters:
Rend: | N,OUT, the rendering context.
|
---|
x: | IN, the column number.
|
---|
y: | IN, the line number.
|
---|
Result: | UT, the user allocated buffer to hold the result.
|
---|
Returned Value:
Keywords:
z-buffer
line depth
(nc_zbufr.c:507)
Prototype:
int INCRndrGetZbufferGridCell(INCZBufferPtrType Rend,
int GridCellX,
int GridCellY,
IrtRType *ZValues,
int *XMin,
int *YMin,
int *XMax,
int *YMax)
Description:
Fetches the z-buffer regions under the requested grid cell.
Returned is a linear buffer of as many pixels in the requested grid cell,
ordered by rows. See INCRndrGetZbufferGridCellMaxSize to get maximal grid
cell size.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
GridCellX, GridCellY: | IN, the grid cell to fetch its Z values.
|
---|
ZValues: | OUT, a user allocated buffer to hold the result.
|
---|
XMin, YMin: | UT, minimal dimensions of fetched grid cell.
|
---|
XMax, YMax: | UT, maximal dimensions of fetched grid cell.
|
---|
Returned Value:
int: TRUE if succesful, FALSE otherwise (out of grid range).
|
---|
Keywords:
z-buffer
(nc_zbufr.c:474)
Prototype:
void INCRndrGetZbufferGridCellMaxSize(INCZBufferPtrType Rend,
int *GridSizeX,
int *GridSizeY,
int *GridCellXSize,
int *GridCellYSize)
Description:
Gets the grid size and maximal cell size, in pixels of the z-buffer.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
GridSizeX, GridSizeY: | OUT, the grid dimensions.
|
---|
GridCellXSize, GridCellYSize: | OUT, cell sizes.
|
---|
Returned Value:
Keywords:
z-buffer
(nc_zbufr.c:82)
Prototype:
INCZBufferPtrType INCRndrInitialize(int ZBufSizeX,
int ZBufSizeY,
int GridSizeX,
int GridSizeY,
IrtPtType XYZMin,
IrtPtType XYZMax,
int BottomMaxZ)
Description:
Creates a new NC (Numerically controled) Rendering context, and returns
a handle to it.
Specified are the required sizes of the ZBuffer, the grid size to impose
over the XY ZBuffer, and the stock dimensions. The grid will be used to
efficiently fetch ZBuffer data at the granularity of grid cells instead of
the entire ZBuffer every time.
Parameters:
ZBufSizeX: | IN, the width of the z-buffer, in pixels.
|
---|
ZBufSizeY: | IN, the height of the z-buffer, in pixels.
|
---|
GridSizeX: | IN, the grid X size to divide the z-buffer into.
|
---|
GridSizeY: | IN, the grid Y size to divide the z-buffer into.
|
---|
XYZMin: | IN, the minimum corner of volume to consider.
|
---|
XYZMax: | IN, the maximum corner of volume to consider.
|
---|
BottomMaxZ: | IN, TRUE if bottom is maximal Z value, FALSE if
bottom should capture minimal Z values.
|
---|
Returned Value:
INCZBufferPtrType: A handle to the newly created NC z-buffer.
|
---|
Keywords:
create
initialize
z-buffer
(nc_zbufr.c:555)
Prototype:
int INCRndrMapPixelsToCells(INCZBufferPtrType Rend, int *X, int *Y)
Description:
Maps the given pixel coordinates to indices of the cell that contains
these pixel coordinates.
Parameters:
Rend: | IN,OUT, the rendering context.
|
---|
X, Y: | IN,OUT, pixel coordinates to map to the cell indices they are in.
|
---|
Returned Value:
int: TRUE if we found the right cell.
|
---|
Keywords:
(nc_zbufr.c:294)
Prototype:
IrtRType INCRndrPutMask(INCZBufferPtrType Rend,
int *PosXY,
IrtRType PosZ,
IrtRType *Mask,
int MaskXSize,
int MaskYSize)
Description:
Scan convert a depth Mask into the Zbuffer. The Mask is a 2D square of
depth values that is centered around Pos.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
PosXY: | IN, XY location where to place the center of the mask in the
Z buffer.
|
---|
PosZ: | IN, The depth to place the mask at.
|
---|
Mask: | IN, The 2D square array of depth values.
|
---|
MaskXSize: | N, X size of Mask.
|
---|
MaskYSize: | N, Y size of Mask.
|
---|
Returned Value:
IrtRType: Amount of material removed by this call in Pixels^2*Z
volume units.
|
---|
Keywords:
scan mask
polygon z-buffer
(nc_zbufr.c:389)
Prototype:
void INCRndrPutPixel(INCZBufferPtrType Rend, int x, int y, IrtRType z)
Description:
Manually adds a single pixel.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
x: | IN, the column number.
|
---|
y: | IN, the line number.
|
---|
z: | IN, the pixel's depth.
|
---|
Returned Value:
Keywords:
put pixel
(nc_zbufr.c:254)
Prototype:
void INCRndrPutTriangle(INCZBufferPtrType Rend,
IPPolygonStruct *Triangle)
Description:
Scan converts a triangle polygon.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
Triangle: | IN, the triangle to be scanned.
|
---|
Returned Value:
Keywords:
scan triangle
polygon z-buffer
(nc_zbufr.c:173)
Prototype:
IRndrZBufferCmpType INCRndrSetZCmp(INCZBufferPtrType Rend,
IRndrZBufferCmpType ZCmp)
Description:
Sets the NC z-buffer comparison method.
Parameters:
Rend: | IN,OUT, the rendering context.
|
---|
ZCmp: | IN, the comparison method.
|
---|
Returned Value:
IRndrZBufferCmpType: Old comparison method.
|
---|
Keywords:
comparison
z-buffer
sort
(zbufr_1d.c:99)
Prototype:
void IRndr1DClearDepth(IRndrZBuffer1DPtrType Rend, IrtRType ClearZ)
Description:
Resets the 1D z-buffer depth.
Parameters:
Rend: | IN,OUT, the rendering context.
|
---|
ClearZ: | IN, the new depth to reset the zbuffer to.
|
---|
Returned Value:
Keywords:
comparison
z-buffer
sort
(zbufr_1d.c:145)
Prototype:
void IRndr1DDestroy(IRndrZBuffer1DPtrType Rend)
Description:
Dispose of the rendering context.
Parameters:
Rend: | IN,OUT, the rendering context.
|
---|
Returned Value:
Keywords:
destroy
dispose
free
release
(zbufr_1d.c:435)
Prototype:
IPPolygonStruct *IRndr1DFilterCollinearEdges(IRndrZBuffer1DPtrType Rend,
IPPolygonStruct *Pl,
int MergeInters)
Description:
Filters the resulting polyline for collinear edges, in place.
Parameters:
Rend: | IN, the rendering context.
|
---|
Pl: | IN, the polyline to filer for collinear edges, in place.
|
---|
MergeInters: | If TRUE, adjacent linear segments as detected in the
1D Z buffer are merged whenever possible. *
|
---|
Returned Value:
IPPolygonStruct *: The filtered polyline.
|
---|
Keywords:
z-buffer
line Z information
(zbufr_1d.c:340)
Prototype:
void IRndr1DGetLineDepth(IRndrZBuffer1DPtrType Rend,
int x1,
int x2,
IrtRType *ZValues)
Description:
Retrieve z-coordinate data from the z-buffer.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
x1, x2: | N, the x-range to fetch along the line.
|
---|
ZValues: | UT, a user allocated buffer to hold the result.
|
---|
Returned Value:
Keywords:
z-buffer
line Z information
(zbufr_1d.c:315)
Prototype:
void IRndr1DGetPixelDepth(IRndrZBuffer1DPtrType Rend, int x, IrtRType *Result)
Description:
Retrieve a pixel's depth from the z-buffer.
Parameters:
Rend: | N,OUT, the rendering context.
|
---|
x: | IN, the column number.
|
---|
Result: | UT, the user allocated buffer to hold the result.
|
---|
Returned Value:
Keywords:
z-buffer
line depth
(zbufr_1d.c:52)
Prototype:
IRndrZBuffer1DPtrType IRndr1DInitialize(int ZBuf1DSize,
IrtRType XMin,
IrtRType XMax,
IrtRType ZMin,
IrtRType ZMax,
int BottomMaxZ)
Description:
Creates a new 1D Zuffer, and returns a handle to it.
Specified are the required length of the ZBuffer, and the real
dimensions.
Parameters:
ZBuf1DSize: | IN, the length of the 1D z-buffer, in pixels.
|
---|
XMin, XMax: | IN, the min/maximum real dimension to consider.
|
---|
ZMin, ZMax: | IN, the min/maximum depth to consider.
|
---|
BottomMaxZ: | IN, TRUE if bottom is maximal Z value, FALSE if
bottom should capture minimal Z values.
|
---|
Returned Value:
IRndrZBuffer1DPtrType: A handle to the newly created 1D z-buffer.
|
---|
Keywords:
create
initialize
z-buffer
(zbufr_1d.c:199)
Prototype:
void IRndr1DPutLine(IRndrZBuffer1DPtrType Rend,
IrtRType x1,
IrtRType z1,
IrtRType x2,
IrtRType z2)
Description:
Scan converts a line.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
x1, z1, x2, z2: | IN, the line to scan convert.
|
---|
Returned Value:
Keywords:
scan polyline
z-buffer
(zbufr_1d.c:278)
Prototype:
void IRndr1DPutPixel(IRndrZBuffer1DPtrType Rend, int x, IrtRType z)
Description:
Manually adds a single pixel.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
x: | IN, the column number.
|
---|
z: | IN, the pixel's depth.
|
---|
Returned Value:
Keywords:
put pixel
(zbufr_1d.c:168)
Prototype:
void IRndr1DPutPolyline(IRndrZBuffer1DPtrType Rend, IPPolygonStruct *Pl)
Description:
Scan converts a polyline.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
Pl: | IN, the polyline to scan convert.
|
---|
Returned Value:
Keywords:
scan polyline
z-buffer
(zbufr_1d.c:122)
Prototype:
IRndrZBufferCmpType IRndr1DSetZCmp(IRndrZBuffer1DPtrType Rend,
IRndrZBufferCmpType ZCmp)
Description:
Sets the NC z-buffer comparison method.
Parameters:
Rend: | IN,OUT, the rendering context.
|
---|
ZCmp: | IN, the comparison method.
|
---|
Returned Value:
IRndrZBufferCmpType: Old comparison method.
|
---|
Keywords:
comparison
z-buffer
sort
(zbufr_1d.c:366)
Prototype:
IPPolygonStruct *IRndr1DUpperEnvAsPolyline(IRndrZBuffer1DPtrType Rend,
int MergeInters)
Description:
Retrieve the z-buffer envelope as one polyline from XMin to XMax.
Parameters:
Rend: | IN, the rendering context.
|
---|
MergeInters: | If TRUE, adjacent linear segments as detected in the
1D Z buffer are merged whenever possible. *
|
---|
Returned Value:
IPPolygonStruct *: The retrieved envelope as a polyline.
|
---|
Keywords:
z-buffer
line Z information
(rndr_lib.c:200)
Prototype:
void IRndrAddLightSource(IRndrPtrType Rend,
IRndrLightType Type,
IrtPtType Where,
IRndrColorType Color)
Description:
Adds a new light source.
Parameters:
Rend: | IN, OUT the rendering context.
|
---|
Type: | IN, the light type ( POINT, VECTOR )
|
---|
Where: | IN, the light position.
|
---|
Color: | IN, the light's color.
|
---|
Returned Value:
Keywords:
add light source
list
(rndr_lib.c:587)
Prototype:
void IRndrBeginObject(IRndrPtrType Rend,
IPObjectStruct *Object,
int NoShading)
Description:
Sets the Irit object to be scan converted.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
Object: | IN, the object to be scanned.
|
---|
NoShading: | IN, if TRUE, ignore shading on this one.
|
---|
Returned Value:
Keywords:
scan irit object
z-buffer
(rndr_lib.c:697)
Prototype:
void IRndrBeginPll(IRndrPtrType Rend)
Description:
Begin drawing a line.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
Returned Value:
Keywords:
new line
start
(rndr_lib.c:176)
Prototype:
void IRndrClearColor(IRndrPtrType Rend)
Description:
Reset color information to the registered background color.
Parameters:
Rend: | IN,OUT, the rendering context.
|
---|
Returned Value:
Keywords:
clear
reset
background
color
(rndr_lib.c:140)
Prototype:
void IRndrClearDepth(IRndrPtrType Rend, IRndrZDepthType ClearZ)
Description:
Clear depth information in the rendering context.
Parameters:
Rend: | IN,OUT, the rendering context.
|
---|
ClearZ: | IN, Depth to clear the ZBuffer to.
|
---|
Returned Value:
Keywords:
clear
reset
depth
Z coordinate
(rndr_lib.c:158)
Prototype:
void IRndrClearStencil(IRndrPtrType Rend)
Description:
Clear stencil information in the rendering context.
Parameters:
Rend: | IN,OUT, the rendering context.
|
---|
Returned Value:
Keywords:
clear
reset
stencil
(rndr_lib.c:115)
Prototype:
void IRndrDestroy(IRndrPtrType Rend)
Description:
Dispose of a the rendering context.
Parameters:
Rend: | IN,OUT, the rendering context.
|
---|
Returned Value:
Keywords:
destroy
dispose
free
release
(rndr_lib.c:679)
Prototype:
void IRndrEndObject(IRndrPtrType Rend)
Description:
Marks the end of the object scaning.
Parameters:
Rend: | N, OUT, the rendering context.
|
---|
Returned Value:
Keywords:
scan
irit object
z-buffer
(rndr_lib.c:745)
Prototype:
void IRndrEndPll(IRndrPtrType Rend)
Description:
Marks the end of the line .
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
Returned Value:
Keywords:
line end
(rndr_lib.c:327)
Prototype:
void IRndrGetClippingPlanes(IRndrPtrType Rend, IrtPlnType *ClipPlanes)
Description:
Retrives the 6 clipping planes, defining the viewing frastrum.
Parameters:
Rend: | IN, the rendering context.
|
---|
ClipPlanes: | OUT, a pointer to the 6 user allocated planes.
|
---|
Returned Value:
Keywords:
clipping
viewing frastrum
(rndr_lib.c:877)
Prototype:
void IRndrGetLineColorAlpha(IRndrPtrType Rend, int y, IRndrColorType *Result)
Description:
Retrieve color (and alpha) data from the z-buffer.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
y: | IN, the line number.
|
---|
Result: | UT, the user allocated buffer to hold the result.
|
---|
Returned Value:
Keywords:
z-buffer
line color information
(rndr_lib.c:901)
Prototype:
void IRndrGetLineDepth(IRndrPtrType Rend, int y, IrtRType *Result)
Description:
Retrieve z-coordinate data from the z-buffer.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
y: | IN, the line number.
|
---|
Result: | UT, the user allocated buffer to hold the result.
|
---|
Returned Value:
Keywords:
z-buffer
line Z information
(rndr_lib.c:925)
Prototype:
void IRndrGetLineStencil(IRndrPtrType Rend, int y, int *Result)
Description:
Retrieve stencil data from the z-buffer.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
y: | IN, the line number.
|
---|
Result: | UT, the user allocated buffer to hold the result.
|
---|
Returned Value:
Keywords:
z-buffer
line stencil information
(rndr_lib.c:809)
Prototype:
void IRndrGetPixelColorAlpha(IRndrPtrType Rend,
int x,
int y,
IRndrColorType *Result)
Description:
Retrieve a pixel's color (and alpha) from the z-buffer.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
x: | IN, the column number.
|
---|
y: | IN, the line number.
|
---|
Result: | OUT, the user allocated buffer to hold the result.
|
---|
Returned Value:
Keywords:
z-buffer
line color information
(rndr_lib.c:833)
Prototype:
void IRndrGetPixelDepth(IRndrPtrType Rend,
int x,
int y,
IrtRType *Result)
Description:
Retrieve a pixel's depth from the z-buffer.
Parameters:
Rend: | N,OUT, the rendering context.
|
---|
x: | IN, the column number.
|
---|
y: | IN, the line number.
|
---|
Result: | UT, the user allocated buffer to hold the result.
|
---|
Returned Value:
Keywords:
z-buffer
line depth
(rndr_lib.c:857)
Prototype:
void IRndrGetPixelStencil(IRndrPtrType Rend,
int x,
int y,
int *Result)
Description:
Retrieve a pixel's stencil from the z-buffer.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
x: | IN, the column number.
|
---|
y: | IN, the line number.
|
---|
Result: | OUT, the user allocated buffer to hold the result.
|
---|
Returned Value:
Keywords:
z-buffer line stencil
(rndr_lib.c:1055)
Prototype:
struct IRndrSceneStruct *IRndrGetScene(IRndrPtrType Rend)
Description:
Get the scene struct.
Parameters:
Rend: | IN, the rendering context.
|
---|
Returned Value:
struct IRndrSceneStruct *: The scene struct.
|
---|
Keywords:
(rndr_lib.c:300)
Prototype:
void IRndrGetViewPrsp(IRndrPtrType Rend,
IrtHmgnMatType ViewMat,
IrtHmgnMatType PrspMat,
IrtHmgnMatType ScrnMat)
Description:
Gets the view, perspective and screen matrices.
Parameters:
Rend: | IN,OUT, the rendering context.
|
---|
ViewMat: | OUT, the view matrix. If NULL, it's ignored.
|
---|
PrspMat: | OUT, the perspective matrix. If NULL, it's ignored.
|
---|
ScrnMat: | OUT, the mapping to the screen. If NULL, it's ignored.
|
---|
Returned Value:
Keywords:
view
perspective
matrix context
(rndr_lib.c:61)
Prototype:
IRndrPtrType IRndrInitialize(int SizeX,
int SizeY,
int SuperSampSize,
int ColorQuantization,
IrtBType UseTransparency,
IrtBType BackfaceCulling,
IRndrColorType BackgrCol,
IrtRType AmbientLight,
int VisMap)
Description:
Creates a new Rendering context, and returns a handle to it.
Parameters:
SizeX: | IN, the width of the z-buffer.
|
---|
SizeY: | IN, the height of the z-buffer.
|
---|
SuperSampSize: | IN, the super-sample size.
|
---|
ColorQuantization: | IN, non zero to quantize the generated colors to
ColorQuantization levels of colors.
|
---|
UseTransparency: | IN, whether tarnsparency is on.
|
---|
BackfaceCulling: | IN, whether to use back-face culling.
|
---|
BackgrCol: | IN, the background color.
|
---|
AmbientLight: | IN, the abient light factor.
|
---|
VisMap: | IN, TRUE to create a visibility map image.
|
---|
Returned Value:
IRndrPtrType: a handle to the newly created z-buffer.
|
---|
Keywords:
create
initialize
z-buffer
(rndr_lib.c:785)
Prototype:
void IRndrPutPixel(IRndrPtrType Rend,
int x,
int y,
IrtRType z,
IrtRType Transparency,
IRndrColorType Color,
IPPolygonStruct *Triangle)
Description:
Manually adds a single pixel.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
x: | IN, the column number.
|
---|
y: | IN, the line number.
|
---|
z: | IN, the pixel's depth.
|
---|
Transparency: | N, the pixel's transparency value.
|
---|
Color: | IN, the new color of pixel at (x, y).
|
---|
Triangle: | IN, The triangle which created the added point.
|
---|
Returned Value:
Keywords:
put pixel
(rndr_lib.c:716)
Prototype:
void IRndrPutPllVertex(IRndrPtrType Rend, IPVertexStruct *Vertex)
Description:
Sets the next vertex of the line.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
Vertex: | IN, the next vertex of the line.
|
---|
Returned Value:
Keywords:
line vertex lineto
(rndr_lib.c:616)
Prototype:
void IRndrPutTriangle(IRndrPtrType Rend, IPPolygonStruct *Triangle)
Description:
Scan converts a triangle polygon.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
Triangle: | IN, the triangle to be scanned.
|
---|
Returned Value:
Keywords:
scan triangle
polygon z-buffer
(rndr_lib.c:980)
Prototype:
void IRndrSaveFile(IRndrPtrType Rend,
const char *BaseDirectory,
const char *OutFileName,
const char *Type)
Description:
Save the color info of the z-buffer into a file .
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
BaseDirectory: | IN, the directory to save the file in.
|
---|
OutFileName: | IN, the file name.
|
---|
Type: | IN, the file type.
|
---|
Returned Value:
Keywords:
z-buffer save dump
(rndr_lib.c:955)
Prototype:
void IRndrSaveFileCB(IRndrPtrType Rend,
IRndrImgGetTypeFuncType ImgSetType,
IRndrImgOpenFuncType ImgOpen,
IRndrImgWriteLineFuncType ImgWriteLine,
IRndrImgCloseFuncType ImgClose)
Description:
Sets the call back functions to invoked when saving files.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
ImgSetType: | IN, Image setting file type function
|
---|
ImgOpen: | IN, Function to open an image file.
|
---|
ImgWriteLine: | IN, Function to write one row (Vec of RGB & vec of Alpha).
|
---|
ImgClose: | IN, Function to close an image file.
|
---|
Returned Value:
Keywords:
z-buffer save dump
(rndr_lib.c:1005)
Prototype:
void IRndrSaveFileDepth(IRndrPtrType Rend,
const char *BaseDirectory,
const char *OutFileName,
const char *Type)
Description:
Save the z coordinate values of the z-buffer into a file.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
BaseDirectory: | IN, the directory to save the file in.
|
---|
OutFileName: | IN, the file name.
|
---|
Type: | IN, the file type.
|
---|
Returned Value:
Keywords:
z-buffer save dump
(rndr_lib.c:1036)
Prototype:
void IRndrSaveFileStencil(IRndrPtrType Rend,
const char *BaseDirectory,
const char *OutFileName,
const char *Type)
Description:
Save the context of the z-buffer into a file .
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
BaseDirectory: | N, the directory to save the file in.
|
---|
OutFileName: | IN, the file name.
|
---|
Type: | IN, the file type.
|
---|
Returned Value:
Keywords:
z-buffer save dump
(rndr_lib.c:1079)
Prototype:
void IRndrSaveFileVisMap(IRndrPtrType Rend,
const char *BaseDirectory,
const char *OutFileName,
const char *Type)
Description:
Save the context of the UV-map into a file .
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
BaseDirectory: | N, the directory to save the file in.
|
---|
OutFileName: | IN, the file name.
|
---|
Type: | IN, the file type.
|
---|
Returned Value:
Keywords:
z-buffer save dump
(rndr_lib.c:224)
Prototype:
void IRndrSetFilter(IRndrPtrType Rend, char *FilterName)
Description:
Changes the filter, used for antialiasing.
Parameters:
Rend: | IN,OUT, the rendering context.
|
---|
FilterName: | N, the filter's name.
|
---|
Returned Value:
Keywords:
Filter
anti-aliasing
(rndr_lib.c:376)
Prototype:
void IRndrSetPllParams(IRndrPtrType Rend,
IrtRType MinWidth,
IrtRType MaxWidth,
IrtRType ZNear,
IrtRType ZFar)
Description:
Sets the Polyline parameters, used for line drawing.
Parameters:
Rend: | IN,OUT, the rendering context.
|
---|
MinWidth: | IN, the width of the line at Z = Znear.
|
---|
MaxWidth: | IN, the width of the line at Z = Zfar.
|
---|
ZNear, ZFar: | IN, as stated above.usually the expected scene width.
|
---|
Returned Value:
Keywords:
polyline line depth cue
(rndr_lib.c:506)
Prototype:
void IRndrSetPostZCmpClbk(IRndrPtrType Rend,
IRndrPixelClbkFuncType ZPassClbk,
IRndrPixelClbkFuncType ZFailClbk)
Description:
Sets the z-buffer post comparison function callback function.
Parameters:
Rend: | IN,OUT, the rendering context.
|
---|
ZPassClbk, ZFailClbk: | IN, the callback functions called on
success/failure.
|
---|
Returned Value:
Keywords:
comparison
z-buffer
post
(rndr_lib.c:479)
Prototype:
IRndrPixelClbkFuncType IRndrSetPreZCmpClbk(IRndrPtrType Rend,
IRndrPixelClbkFuncType PixelClbk)
Description:
Sets the z-buffer pre comparison function callback function.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
PixelClbk: | N, the callback function.
|
---|
Returned Value:
IRndrPixelClbkFuncType: Old callbakc function.
|
---|
Keywords:
comparison pre callback z-buffer
(rndr_lib.c:404)
Prototype:
IrtBType IRndrSetRawMode(IRndrPtrType Rend, IrtBType UseRawMode)
Description:
Sets the z-buffer access mode (original super smapled data or filtered).
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
UseRawMode: | IN, whether the access mode is RAW (otherwise filtered).
|
---|
Returned Value:
Keywords:
antialising access mode raw
(rndr_lib.c:244)
Prototype:
IRndrShadingType IRndrSetShadeModel(IRndrPtrType Rend,
IRndrShadingType ShadeModel)
Description:
Changes the shading model.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
ShadeModel: | IN, the new shading model (FLAT,GOURAUD,PHONG,NONE).
|
---|
Returned Value:
IRndrShadingType: Old shading model.
|
---|
Keywords:
shading
light model
(rndr_lib.c:276)
Prototype:
void IRndrSetViewPrsp(IRndrPtrType Rend,
IrtHmgnMatType ViewMat,
IrtHmgnMatType PrspMat,
IrtHmgnMatType ScrnMat)
Description:
Sets the view and perspective matrices.
Parameters:
Rend: | IN,OUT, the rendering context.
|
---|
ViewMat: | IN, the view matrix.
|
---|
PrspMat: | IN, the perspective matrix, NULL if parallel projection.
|
---|
ScrnMat: | IN, the mapping to the screen or NULL if scale [-1,+1] to
image size.
|
---|
Returned Value:
Keywords:
view
perspective
matrix context
(rndr_lib.c:351)
Prototype:
void IRndrSetZBounds(IRndrPtrType Rend, IrtRType ZNear, IrtRType ZFar)
Description:
Sets the near and far XY clipping planes, defining the viewing frustum.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
ZNear: | N, the (negation of the) z-coordinate of the near clipping plane.
|
---|
ZFar: | IN, the (negation of the) z-coordinate of the far clipping plane.
|
---|
Returned Value:
Keywords:
clipping
viewing frastrum
(rndr_lib.c:454)
Prototype:
IRndrZBufferCmpType IRndrSetZCmp(IRndrPtrType Rend, IRndrZBufferCmpType ZCmp)
Description:
Sets the z-buffer comparison method.
Parameters:
Rend: | IN,OUT, the rendering context.
|
---|
ZCmp: | IN, the comparison method.
|
---|
Returned Value:
IRndrZBufferCmpType: Old comparison method.
|
---|
Keywords:
comparison
z-buffer
sort
(rndr_lib.c:430)
Prototype:
IRndrZCmpPolicyFuncType IRndrSetZCmpPolicy(IRndrPtrType Rend,
IRndrZCmpPolicyFuncType ZCmpPol)
Description:
Sets the z-buffer comparison function.
Parameters:
Rend: | IN,OUT, the rendering context.
|
---|
ZCmpPol: | N, the comparison function (linear order).
|
---|
Returned Value:
IRndrZCmpPolicyFuncType: Old comparison function.
|
---|
Keywords:
comparison
z-buffer
sort
(rndr_lib.c:531)
Prototype:
void IRndrStencilCmpFunc(IRndrPtrType Rend,
IRndrStencilCmpType SCmp,
int Ref,
unsigned Mask)
Description:
Sets the z-buffer stencil test function.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
SCmp: | IN, stencil test comparison type.
|
---|
Ref: | IN, stencil test refernce value.
|
---|
Mask: | IN, stencil test mask.
|
---|
Returned Value:
Keywords:
stencil buffer
OpenGL
glStencilFunc
(rndr_lib.c:560)
Prototype:
void IRndrStencilOp(IRndrPtrType Rend,
IRndrStencilOpType Fail,
IRndrStencilOpType ZFail,
IRndrStencilOpType ZPass)
Description:
Sets the z-buffer stencil operations.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
Fail: | IN, stencil test failure operation.
|
---|
ZFail: | IN, Z-test failure operation.
|
---|
ZPass: | IN, Z-test pass operation.
|
---|
Returned Value:
Keywords:
stencil buffer
OpenGL
glStencilOp
(vis_maps.c:259)
Prototype:
void IRndrVMClear(IRndrVMStruct *VisMap)
Description:
Clears the context of visibility map (Sets all UV information to initial
values).
Parameters:
VisMap: | IN, OUT, Pointer to visibility map.
|
---|
Returned Value:
Keywords:
clear visibility map.
(vis_maps.c:936)
Prototype:
int IRndrVMGetLine(IRndrVMStruct *VisMap,
int u0,
int u1,
int v,
IrtRType **FilterCoeff,
IrtRType *Result,
IRndrVisibleValidityType *Validity)
Description:
Retrieves visibility information of a specific line in UV space.
The line should be allocated by the caller.
Parameters:
VisMap: | IN, OUT, pointer to visibility map.
|
---|
u0: | IN, minimal U coordinate.
|
---|
u1: | IN, maximal U coordinate.
|
---|
v: | IN, line V number.
|
---|
FilterCoeff: | N, the filter to use in the super sampling. If NULL, uses
the same weight for all samples.
|
---|
Result: | OUT, the visibility values of the line. When super sampling
is disabled 0 For not visible and 1 for visible. When super
sampling is enable the values are in [0,1] and reflacts the
amount of visible cell out of the total valid cells
(invalid cells are ignored).
If empty, returns negative number.
If Validity isn't IRNDR_VISMAP_VALID_OK, Result is
undefined.
|
---|
Validity: | OUT, The validity of the pixel.
|
---|
Returned Value:
Keywords:
Visible
access
(vis_maps.c:1062)
Prototype:
int IRndrVMGetObjDomain(IPObjectStruct *PObj,
IrtRType *UMin,
IrtRType *UMax,
IrtRType *VMin,
IrtRType *VMax)
Description:
Get the domain of the given object (Object which aren't polygons are
ignored).
Parameters:
PObj: | IN - The object to get its domain. Objects which
aren't polygons are ignored.
|
---|
UMin, UMax, VMin, VMax: | UT - The domain of the object.
|
---|
Returned Value:
int: FALSE if no uv value was found.
|
---|
Keywords:
(vis_maps.c:97)
Prototype:
int IRndrVMInit(IRndrVMStruct *VisMap,
IRndrSceneStruct *Scene,
int SuperSize,
int UVBackfaceCulling)
Description:
Initialize a newly created visibility map.
Parameters:
VisMap: | IN, OUT, Pointer to visibility map object.
|
---|
Scene: | IN, Pointer to the related scene object.
|
---|
SuperSize: | IN, Super sampling size.
|
---|
UVBackfaceCulling: | N, use backface culling during the UV scan
coversion.
|
---|
Returned Value:
Keywords:
initialize
create visibility map.
(vis_maps.c:430)
Prototype:
int IRndrVMIsPointInTriangle(IPPolygonStruct *Triangle,
IrtPtType Pt,
int Perim,
IrtRType *z,
IrtRType *s,
IrtRType *t)
Description:
Check whether Pt is inside Triangle. (The calculation are done using
only the xy coordinates). z returns the z value of triangle at the xy
coordinates given by Pt (it may return the z value at the continuation
of Triangle if xy is outside Triangle). s and t are the parameters which
create Pt in the plane formula:
Triangle[0] + s*(Triangle[2]-Triangle[0]) + t*(Triangle[1]-Triangle[0])
Parameters:
Triangle: | N, The triangle.
|
---|
Pt: | IN, The point.
|
---|
Perim: | IN, If TRUE, points on the perimeter are considered as being
in the triangle. If FALSE they are not in the triangle.
|
---|
z: | OUT, The z value of Triangle at the xy values given by Pt.
Ignored if it's NULL.
|
---|
s, t: | The paramters of Pt in the plane forumla. Ignored if NULL.
|
---|
Returned Value:
int: Whether Pt is inside Triangle
|
---|
Keywords:
(vis_maps.c:1121)
Prototype:
int IRndrVMPrepareUVValuesOfGeoObj(IPObjectStruct *PObj,
int MapWidth,
int MapHeight,
IPObjectStruct *PObj2)
Description:
If there is more than one object in PObj (using PNext) arrange the UV
values domains to a one continuous non overlapping domain.
Parameters:
PObj: | The geometric object.
|
---|
MapWidth, MapHeight: | he dimensions of the visibility map.
|
---|
PObj2: | If it isn't NULL, this object is a list of objects
which contains at least as much elements as PObj.
Each element i in PObj2 will go through the same
Transformations and scaling as element i in PObj.
Objects which aren't surfaces, trimmed surfaces or
polygons are ignored.
|
---|
Returned Value:
int: FALSE if PObj doesn't contain any objects.
|
---|
Keywords:
(vis_maps.c:848)
Prototype:
void IRndrVMPutPixel(IRndrVMStruct *VisMap,
int u,
int v,
IrtPtType xyzVals,
IRndrVisibleValidityType Validity,
int BackFaced,
IPPolygonStruct *Triangle)
Description:
Manually adds a single pixel to visibility map.
Parameters:
VisMap: | IN, OUT, pointer to visibility map.
|
---|
u: | IN, the column number.
|
---|
v: | IN, the line number.
|
---|
xyzVals: | IN, the pixel's view coordinates.
|
---|
Validity: | IN, validity of pixel.
|
---|
BackFaced: | N, if back face culling is on and pixel belongs to back
facing triangle.
|
---|
Triangle: | IN, The triangle which created this UV point.
|
---|
Returned Value:
Keywords:
put pixel
(vis_maps.c:334)
Prototype:
int IRndrVMPutTriangle(IRndrVMStruct *VisMap,
IRndrTriangleStruct *RendTri,
IRndrSceneStruct *Scene,
IRndrObjectStruct *Obj,
IPPolygonStruct *Triangle)
Description:
The method gets a scanned triangle polygon and scans it into visibility
map using the regular scan conversion
Parameters:
VisMap: | IN,OUT, pointer to the visibility map.
|
---|
RendTri: | IN, renderer current rendered triangle.
|
---|
Scene: | IN, scene pointer.
|
---|
Obj: | IN, current rendered object.
|
---|
Triangle: | IN, a polygon triangle represented which was scanned into
Z-buffer, with UV values in 'uvvals' attribute, in
each vertex. This object is changed during this
function (So it can't use for other purposes after
this function).
|
---|
Returned Value:
int: Whether the method finished successfully
|
---|
Keywords:
VisMap
U
Triangle
(vis_maps.c:294)
Prototype:
void IRndrVMRelease(IRndrVMStruct *VisMap)
Description:
Release the memory taken by the visibility map.
Parameters:
VisMap: | IN,OUT, pointer to the visibility map.
|
---|
Returned Value:
Keywords:
memory free
release
(vis_maps.c:563)
Prototype:
void IRndrVMRelocatePtIntoTriangle(IPPolygonStruct *Triangle, IrtPtType Pt)
Description:
If Pt isn't inside Triangle, relcoation it to be the closest point
inside triangle (The calculation are done only with the xy coordinates).
Parameters:
Triangle: | N, The triangle.
|
---|
Pt: | IN, The point.
|
---|
Returned Value:
Keywords:
(vis_maps.c:739)
Prototype:
void IRndrVMScan(IRndrVMStruct *VisMap, IRndrZBufferStruct *Buff)
Description:
Scan over all visibility map pixels, for each uv values, contains xyz
values is compared to the triangles in the z-buffer in coordinate xy.
coordinate can be visible, hidden(mapped) or unmapped.
Parameters:
VisMap: | IN,OUT, pointer to the visibility map.
|
---|
Buff: | IN, OUT, the zbuffer.
|
---|
Returned Value:
Keywords:
Visible
U
Scan
(vis_maps.c:212)
Prototype:
void IRndrVMSetCriticAR(IRndrVMStruct *VisMap, IrtRType CriticAR)
Description:
Setting critic AR value.
Parameters:
VisMap: | IN, OUT, pointer to the visibility map.
|
---|
CriticAR: | IN, value of critic aspect ratio value, which is ratio
between the largest and smallest edge of a triangle.
use value 0 for skeeping AR check.
|
---|
Returned Value:
Keywords:
(vis_maps.c:236)
Prototype:
void IRndrVMSetDilation(IRndrVMStruct *VisMap, int Dilation)
Description:
Setting dilation iterations value, this will define how many times the
dilation algorithm will be executed, expanding one pixel at a time.
Parameters:
VisMap: | IN, OUT, pointer to the visibility map.
|
---|
Dilation: | IN, the amount of iterations to do the dilation algorithm.
|
---|
Returned Value:
Keywords:
(vis_maps.c:160)
Prototype:
void IRndrVMSetLimits(IRndrVMStruct *VisMap, IPObjectStruct* Objects)
Description:
Set scene and visibility map limits according to the XY and UV maximum
and minimum coordinates in all objects. Also, sets the scene's screen
matrix accoridng to the XY limits so the entrie scene will be in the
scene's window and centered. That means that the entire scene's x and y
coordinates will be in the range [0,scene -> sizex/y] (z coordinate isn't
changed).
Parameters:
VisMap: | IN, OUT, Pointer to visibility map object.
|
---|
Objects: | IN, Rendered object list.
|
---|
Returned Value:
Keywords:
set
limits
UV.
(vis_maps.c:2108)
Prototype:
void IRndrVMSetScanOnUV(IRndrVMStruct *VisMap, int IsScanOnUV)
Description:
Set whether to scan the following triangles on UV space or just on XYZ
space.
Parameters:
VisMap: | Pointer to the visibility map.
|
---|
IsScanOnUV: | TRUE in order to scan on XYZ and UV spaces. FALSE to scan
only on XYZ space.
|
---|
Returned Value:
Keywords:
(vis_maps.c:187)
Prototype:
void IRndrVMSetTanAngle(IRndrVMStruct *VisMap, IrtRType CosAng)
Description:
Setting critic cosines value of angle between view point to pixel and
triangle normal.
Parameters:
VisMap: | IN, OUT, pointer to the visibility map.
|
---|
CosAng: | IN, value of critic cosines value of angle between normal and
view vector.
|
---|
Returned Value:
Keywords:
(rndr_lib.c:1290)
Prototype:
void IRndrVertexTransform(IRndrPtrType Rend,
IPVertexStruct *Vertex,
IrtRType *Result)
Description:
Wrapper function for calculating the transformed vertex coordinate.
Parameters:
Rend: | The rendering context.
|
---|
Vertex: | IN, pointer to the Vertex.
|
---|
Result: | OUT, the result transformed homogenous coordinate.
|
---|
Returned Value:
Keywords:
(rndr_lib.c:1105)
Prototype:
int IRndrVisMapEnable(IRndrPtrType Rend,
IPObjectStruct *Objects,
int SuperSize,
int UVBackfaceCulling)
Description:
Enabling visibility map in z-buffer.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
Objects: | IN, Rendered object list.
|
---|
SuperSize: | IN, filter sample super size.
|
---|
UVBackfaceCulling: | N, use backface culling during the UV scan
coversion.
|
---|
Returned Value:
Keywords:
visibility map
U
(rndr_lib.c:1216)
Prototype:
int IRndrVisMapGetObjDomain(IPObjectStruct *PObj,
IrtRType *UMin,
IrtRType *UMax,
IrtRType *VMin,
IrtRType *VMax)
Description:
Wrapper function to get the domain of the given object (Object which
aren't polygons are ignored.
Parameters:
PObj: | IN - The object to get its domain. Objects which
aren't polygons are ignored.
|
---|
UMin, UMax, VMin, VMax: | UT - The domain of the object.
|
---|
Returned Value:
int: FALSE if no uv value was found.
|
---|
Keywords:
(rndr_lib.c:1247)
Prototype:
int IRndrVisMapPrepareUVValuesOfGeoObj(IPObjectStruct *PObj,
int MapWidth,
int MapHeight,
IPObjectStruct *PObj2)
Description:
Wrapper function for spreading UV values domains.
Parameters:
PObj: | The geometric object.
|
---|
MapWidth, MapHeight: | he dimensions of the visibility map.
|
---|
PObj2: | If it isn't NULL, this object is a list of objects
which contains at least as much elements as PObj.
Each element i in PObj2 will go through the same
Transformations and scaling as element i in PObj.
Objects which aren't surfaces, trimmed surfaces or
polygons are ignored.
|
---|
Returned Value:
int: FALSE if PObj doesn't contain any objects.
|
---|
See Also:
IRndrVMPrepareUVValuesOfGeoObj
Keywords:
(rndr_lib.c:1131)
Prototype:
void IRndrVisMapScan(IRndrPtrType Rend)
Description:
Wrapper function for scaning visibility map.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
Returned Value:
Keywords:
scan visibility map
(rndr_lib.c:1171)
Prototype:
void IRndrVisMapSetCriticAR(IRndrPtrType Rend, IrtRType CriticAR)
Description:
wrapper function for setting critic aspect ratio.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
CriticAR: | IN, value of critic aspect ratio value, the ratio between
largest and smallest edge of a triangle.
|
---|
Returned Value:
Keywords:
(rndr_lib.c:1191)
Prototype:
void IRndrVisMapSetDilation(IRndrPtrType Rend, int Dilation)
Description:
wrapper function for setting delation iterations number for white color
hiding in visibility maps.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
Dilation: | IN, the amount of iterations to do the dilation algorithm.
|
---|
Returned Value:
Keywords:
(rndr_lib.c:1268)
Prototype:
void IRndrVisMapSetScanOnUV(IRndrPtrType Rend, int IsScanOnUV)
Description:
Wrapper function for setting whether to scan the following triangles on
both UV space and XYZ space or only on XYZ space.
Parameters:
Rend: | The rendering context.
|
---|
IsScanOnUV: | TRUE in order to scan on XYZ and UV spaces. FALSE to scan
only on XYZ space.
|
---|
Returned Value:
Keywords:
(rndr_lib.c:1151)
Prototype:
void IRndrVisMapSetTanAngle(IRndrPtrType Rend, IrtRType CosAng)
Description:
wrapper function for setting critic tangency angle.
Parameters:
Rend: | IN, OUT, the rendering context.
|
---|
CosAng: | IN, value of critic cosinus value of angle between normal and
view vector.
|
---|
Returned Value:
Keywords:
(interpol.c:29)
Prototype:
IRndrInterpolStruct *InterpolCopy(IRndrInterpolStruct *Dst,
IRndrInterpolStruct *Src)
Description:
Performs COPY operation on object of Interpol type, which contains data
to be interpolated during polygons scan converting. Interpol objects has
some sort of linked structure, so copy is tricky.
Parameters:
Dst: | OUT, pointer to destination object.
|
---|
Src: | IN, pointer to source object.
|
---|
Returned Value:
IRndrInterpolStruct *: Pointer to destination object.
|
---|
Keywords:
Interpol structure
interpolation
(interpol.c:64)
Prototype:
IRndrInterpolStruct *InterpolDelta(IRndrInterpolStruct *Dst,
IRndrInterpolStruct *v1,
IRndrInterpolStruct *v2,
IrtRType d)
Description:
Initialize object of Interpol type to be an increment in interpolation
between first and second Interpol objects in scan conversion process.
Parameters:
Dst: | OUT, pointer to delta(increment) object to be initialized.
|
---|
v1: | IN, pointer to the first Interpol object.
|
---|
v2: | IN, pointer to the second Interpol object.
|
---|
d: | IN, scaling factor determined by dimension of the polygon on
the current scan line. *
|
---|
Returned Value:
IRndrInterpolStruct *: pointer to dst object.
|
---|
Keywords:
Interpol
interpolation
(interpol.c:117)
Prototype:
IRndrInterpolStruct *InterpolIncr(IRndrInterpolStruct *Dst,
IRndrInterpolStruct *d)
Description:
Increments destination Interpol object by delta Interpol object computed
by "InterpolDelta" call. By that way we progress interpolation process.
Parameters:
Dst: | IN OUT, pointer to object to be incremented.
|
---|
d: | IN, pointer to delta object.
|
---|
Returned Value:
IRndrInterpolStruct *: pointer to destination object.
|
---|
Keywords:
Interpol
interpolation
(color.c:64)
Prototype:
void LightIntensivity(IRndrLightStruct *l,
const IrtPtType p,
const IrtNrmlType n,
const IRndrObjectStruct *o,
IRndrSceneStruct *Scene,
IRndrIntensivityStruct *i)
Description:
Computes intensivity diffuse and specular values using specular model of
illumination (see Foily, Van Dam). Differs between point and vector
viewer, point and vector light sources, which is defined in Light object
and by calling IS_VIEWER_POINT() function.
Parameters:
l: | IN, pointer to the light source object.
|
---|
p: | IN, point for which intensivity is computing.
|
---|
n: | IN, normal to the surface in the point "p".
|
---|
o: | IN, pointer to the object with surface characteristics.
|
---|
Scene: | IN, pointer to the scene the object belongs.
|
---|
i: | OUT, pointer to resulting intensivity object.
|
---|
Returned Value:
Keywords:
specular
shading
(lights.c:45)
Prototype:
void LightListAdd(IRndrLightListStruct *Lights, IRndrLightStruct *NewSrc)
Description:
Adds a new light source to the list.
Parameters:
Lights: | OUT, pointer to LightList object which is initialized through.
|
---|
NewSrc: | IN, pointer to Light source.
|
---|
Returned Value:
Keywords:
(lights.c:25)
Prototype:
void LightListInitEmpty(IRndrLightListStruct *Lights)
Description:
Creates an empty light sources list.
Parameters:
Lights: | OUT, pointer to LightList object which is initialized through.
|
---|
Returned Value:
Keywords:
(polyline.c:253)
Prototype:
void LineSegmentEnd(IRndrLineSegmentStruct *Seg)
Description:
Ends a line. Should be called when after the last point was added.
Parameters:
Seg: | IN, OUT, pointer to the line segment.
|
---|
Returned Value:
Keywords:
line termination
(polyline.c:278)
Prototype:
IPPolygonStruct *LineSegmentGetTri(IRndrLineSegmentStruct *Seg, int NumTri)
Description:
Retrieves the triangles compromising the current segment.
Parameters:
Seg: | IN, OUT, pointer to the line segment.
|
---|
NumTri: | IN, the number of triangle, should be < TrianglesNum.
|
---|
Returned Value:
IPPolygonStruct *: The triangle.
|
---|
Keywords:
triangulation
(polyline.c:28)
Prototype:
void LineSegmentInit(IRndrLineSegmentStruct *Seg,
IRndrPolylineOptionsStruct *PolyOptions)
Description:
Initialize the segment structure, using the PolylineOptions.
Should be called when object is created.
Parameters:
Seg: | IN, OUT, pointer to the line segment.
|
---|
PolyOptions: | IN, the polyline options structure.
|
---|
Returned Value:
Keywords:
Initialize Options
(polyline.c:95)
Prototype:
void LineSegmentRelease(IRndrLineSegmentStruct *Seg)
Description:
Frees the memory allocated by the object.
Parameters:
Seg: | IN, OUT, pointer to the line segment.
|
---|
Returned Value:
Keywords:
Release free Options
(polyline.c:133)
Prototype:
void LineSegmentSet(IRndrLineSegmentStruct *Seg, IrtPtType4 Vertex)
Description:
Sets the next point for the line.
Parameters:
Seg: | IN, OUT, pointer to the line segment.
|
---|
Vertex: | IN, the new point.
|
---|
Returned Value:
Keywords:
add point line-to
(polyline.c:69)
Prototype:
void LineSegmentSetOptions(IRndrLineSegmentStruct *Seg,
IRndrPolylineOptionsStruct *PolyOptions)
Description:
Changes the PolyOptions.
Parameters:
Seg: | IN, OUT, pointer to the line segment.
|
---|
PolyOptions: | IN, the polyline options structure.
|
---|
Returned Value:
Keywords:
Initialize Options
(polyline.c:113)
Prototype:
void LineSegmentStart(IRndrLineSegmentStruct *Seg)
Description:
Begins a new line.
Parameters:
Seg: | IN, OUT, pointer to the line segment.
|
---|
Returned Value:
Keywords:
begin start
(object.c:321)
Prototype:
void ObjectInit(IRndrObjectStruct *PObject)
Description:
Creates a new blank object.
Should be called before the first time the object is used.
Parameters:
PObject: | IN, OUT, pointer to the Object structure.
|
---|
Returned Value:
Keywords:
(object.c:342)
Prototype:
void ObjectRelease(IRndrObjectStruct *PObject)
Description:
Releases memory allocated by object.
Parameters:
PObject: | IN, OUT, pointer to the Object structure.
|
---|
Returned Value:
Keywords:
(object.c:364)
Prototype:
IRndrObjectStruct *ObjectSet(IRndrObjectStruct *PObject,
IPObjectStruct *Obj,
IRndrSceneStruct *Scene)
Description:
Wraps an Irit object by Initializing different attributes from the it:
color, specularity, transparancy, texture image, volumetric texture.
Parameters:
PObject: | IN, OUT, pointer to the Object structure.
|
---|
Obj: | IN, pointer to the Irit object, containing the attributes.
|
---|
Scene: | IN, pointer to the scene.
|
---|
Returned Value:
IRndrObjectStruct *: Created object.
|
---|
Keywords:
(scene.c:123)
Prototype:
void SceneGetClippingPlane(IRndrSceneStruct *Scene,
int Axis,
int Min,
IrtPlnType Result)
Description:
Retrives one of the clipping plane defining the view frustrum.
The planes are built so that inside the view frustum the half planes
are positive (and negative outside).
Parameters:
Scene: | IN, pointer to the scene.
|
---|
Axis: | IN, the axis normal to the plane(X_AXIS, Y_AXIS, Z_AXIS).
|
---|
Min: | IN, whether the "near" or "far" clipping planes.
|
---|
Result: | OUT, the result plane.
|
---|
Returned Value:
Keywords:
clipping planes
(scene.c:235)
Prototype:
struct IRndrMatrixContextStruct *SceneGetMatrices(IRndrSceneStruct *Scene)
Description:
Get the scene matrices.
Parameters:
Scene: | IN, pointer to the scene.
|
---|
Returned Value:
struct IRndrMatrixContextStruct *: pointer to matrices struct.
|
---|
Keywords:
(scene.c:217)
Prototype:
void SceneRelease(IRndrSceneStruct *Scene)
Description:
Free the memory of the scene.
Parameters:
Scene: | IN, pointer to the scene.
|
---|
Returned Value:
Keywords:
memory free
release
(scene.c:31)
Prototype:
void SceneSetMatrices(IRndrSceneStruct *Scene,
IrtHmgnMatType ViewMat,
IrtHmgnMatType PrspMat,
IrtHmgnMatType ScrnMat)
Description:
Sets the view and perspective matrices for the scene.
Parameters:
Scene: | OUT, pointer to the scene.
|
---|
ViewMat: | IN, the view matrix.
|
---|
PrspMat: | IN, the perspective matrix, NULL if parallel projection.
|
---|
ScrnMat: | IN, the mapping to the screen or NULL if scale [-1,+1] to
image size.
|
---|
Returned Value:
Keywords:
matrix
view
perspective
(scene.c:190)
Prototype:
void SceneSetZClippingPlanes(IRndrSceneStruct *Scene,
IrtRType ZNear,
IrtRType ZFar)
Description:
Sets the near and far XY clipping planes.
Parameters:
Scene: | IN, pointer to the scene.
|
---|
ZNear, ZFar: | IN, the near and far z-coordinate of the planes.
|
---|
Returned Value:
Keywords:
clipping planes
(stencil.c:128)
Prototype:
void StencilOp(IRndrStencilCfgStruct *SCfg, int *SPtr, IRndrStencilOpType Op)
Description:
Performs stencil operation.
Parameters:
SCfg: | IN, stencil configuration to be used.
|
---|
SPtr: | IN, pointer to target stencil buffer value.
|
---|
Op: | IN stencil operation to perform.
|
---|
Returned Value:
Keywords:
stencil
stencil operation
opengl
(stencil.c:68)
Prototype:
void StencilOpFail(IRndrStencilCfgStruct *StencilCfg, int *StencilPtr)
Description:
Performs stencil operation in case of stencil test failure.
Parameters:
StencilCfg: | IN, stencil configuration to be used.
|
---|
StencilPtr: | IN, pointer to target stencil buffer value.
|
---|
Returned Value:
Keywords:
stencil
stencil operation
opengl
(stencil.c:88)
Prototype:
void StencilOpZFail(IRndrStencilCfgStruct* StencilCfg, int *StencilPtr)
Description:
Performs stencil operation in case of stencil test success and Z test
failure.
Parameters:
StencilCfg: | IN, stencil configuration to be used.
|
---|
StencilPtr: | IN, pointer to target stencil buffer value.
|
---|
Returned Value:
Keywords:
stencil
stencil operation
opengl
(stencil.c:108)
Prototype:
void StencilOpZPass(IRndrStencilCfgStruct* StencilCfg, int *StencilPtr)
Description:
Performs stencil operation in case of stencil test pass and Z test
pass.
Parameters:
StencilCfg: | IN, stencil configuration to be used.
|
---|
StencilPtr: | IN, pointer to target stencil buffer value.
|
---|
Returned Value:
Keywords:
stencil
stencil operation
opengl
(stencil.c:28)
Prototype:
IrtBType StencilTest(IRndrStencilCfgStruct *StencilCfg, int Stencil)
Description:
Performs stencil tests.
Parameters:
StencilCfg: | IN, stencil configuration to be used.
|
---|
Stencil: | IN, stecil buffer value to test.
|
---|
Returned Value:
IrtBType: comparison result.
|
---|
Keywords:
stencil
stencil test
opengl
(texture.c:814)
Prototype:
void TextureBumpChocolate(IRndrTextureStruct *Txtr,
IrtPtType Point,
IrtNrmlType Normal,
IrtRType *Uv,
IRndrColorType Color)
Description:
Evaluates pertubation on color value at given point in order to get
"orange" bump texture.
Parameters:
Txtr: | IN, pointer to the texture structure.
|
---|
Point: | IN, coordinate of the point in object space.
|
---|
Normal: | N, OUT, normal at the point.
|
---|
Uv: | IN, uv parameteric domain's coordinates, if exists.
|
---|
Color: | IN, OUT, color value at the point.
|
---|
Returned Value:
See Also:
TextureBumpOrange
Keywords:
(texture.c:766)
Prototype:
void TextureBumpOrange(IRndrTextureStruct *Txtr,
IrtPtType Point,
IrtNrmlType Normal,
IrtRType *Uv,
IRndrColorType Color)
Description:
Evaluates pertubation on color value at given point in order to get
"orange" bump texture.
Parameters:
Txtr: | IN, pointer to the texture structure.
|
---|
Point: | IN, coordinate of the point in object space.
|
---|
Normal: | N, OUT, normal at the point.
|
---|
Uv: | IN, uv parameteric domain's coordinates, if exists.
|
---|
Color: | IN, OUT, color value at the point.
|
---|
Returned Value:
See Also:
TextureBumpChocolate
Keywords:
(texture.c:706)
Prototype:
void TextureCamouf(IRndrTextureStruct *Txtr, IrtPtType Point,
IrtNrmlType Normal,
IrtRType *Uv,
IRndrColorType Color)
Description:
Evaluates pertubation on color value at given point in order to get
"camouf" texture.
Parameters:
Txtr: | IN, pointer to the texture structure.
|
---|
Point: | IN, coordinate of the point in object space.
|
---|
Normal: | N, OUT, normal at the point.
|
---|
Uv: | IN, uv parameteric domain's coordinates, if exists.
|
---|
Color: | IN, OUT, color value at the point.
|
---|
Returned Value:
Keywords:
(texture.c:651)
Prototype:
void TextureChecker(IRndrTextureStruct *Txtr,
IrtPtType Point,
IrtNrmlType Normal,
IrtRType *Uv,
IRndrColorType Color)
Description:
Evaluates pertubation on color value at given point in order to get
"chekcer" texture.
Parameters:
Txtr: | IN, pointer to the texture structure.
|
---|
Point: | IN, coordinate of the point in object space.
|
---|
Normal: | N, OUT, normal at the point.
|
---|
Uv: | IN, uv parameteric domain's coordinates, if exists.
|
---|
Color: | IN, OUT, color value at the point.
|
---|
Returned Value:
Keywords:
(texture.c:894)
Prototype:
void TextureContour(IRndrTextureStruct *Txtr,
IrtPtType Point,
IrtNrmlType Normal,
IrtRType *Uv,
IRndrColorType Color)
Description:
Evaluates pertubation on color value at given point in order to get
"contour" texture.
Parameters:
Txtr: | IN, pointer to the texture structure.
|
---|
Point: | IN, coordinate of the point in object space.
|
---|
Normal: | N, OUT, normal at the point.
|
---|
Uv: | IN, uv parameteric domain's coordinates, if exists.
|
---|
Color: | IN, OUT, color value at the point.
|
---|
Returned Value:
Keywords:
texture
image warping
(texture.c:939)
Prototype:
void TextureContourNormal(IRndrTextureStruct *Txtr,
IrtPtType Point,
IrtNrmlType Normal,
IrtRType *Uv,
IRndrColorType Color)
Description:
Evaluates pertubation on color value at given point in order to get
"ncontour" texture.
Parameters:
Txtr: | IN, pointer to the texture structure.
|
---|
Point: | IN, coordinate of the point in object space.
|
---|
Normal: | N, normal at the point.
|
---|
Uv: | IN, uv parameteric domain's coordinates, if exists.
|
---|
Color: | IN, OUT, color value at the point.
|
---|
Returned Value:
Keywords:
texture
image warping
(texture.c:993)
Prototype:
void TextureCurvature(IRndrTextureStruct *Txtr,
IrtPtType Point,
IrtNrmlType Normal,
IrtRType *Uv,
IRndrColorType Color)
Description:
Evaluates a texture color that is a function of the curvature of the
surface, getting the "curvature" texture.
Parameters:
Txtr: | IN, pointer to the texture structure.
|
---|
Point: | IN, coordinate of the point in object space.
|
---|
Normal: | N, normal at the point.
|
---|
Uv: | IN, uv parameteric domain's coordinates, if exists.
|
---|
Color: | IN, OUT, color value at the point.
|
---|
Returned Value:
Keywords:
texture
curvature
(texture.c:83)
Prototype:
IrtImgPixelStruct *TextureImageGetPixel(IRndrTextureStruct *Txtr,
IRndrImageStruct *i,
IrtPtType p,
IrtRType v,
IrtRType u,
IPPolygonStruct *Poly)
Description:
Gets image pixel by two real coordinates u and v from the Image data.
Access function.
Parameters:
Txtr: | IN, general attributes and modifiers of the texture mapping.
|
---|
i: | IN, pointer to the Image data structure.
|
---|
p: | IN, location in Euclidean space of texture color to evaluate.
|
---|
v: | IN, real coordinate of the image pixel.
|
---|
u: | IN, real coordinate of the image pixel.
|
---|
Poly: | IN, pointer to the polygon.
|
---|
Returned Value:
IrtImgPixelStruct *: value of the image pixel at (u,v) point.
|
---|
Keywords:
image
texture
(texture.c:1227)
Prototype:
void TextureInitParameters(IRndrTextureStruct *Txtr, const char *pString)
Description:
Initializes texture-specific paramters for volumetric textures.
Parameters:
Txtr: | OUT, IRndrTextureStruct that contains the paramters.
|
---|
pString: | N, paramters string, taken from the attribute.
|
---|
Returned Value:
Keywords:
(texture.c:513)
Prototype:
void TextureMarble(IRndrTextureStruct *Txtr,
IrtPtType Point,
IrtNrmlType Normal,
IrtRType *Uv,
IRndrColorType Color)
Description:
Evaluates pertubation on color value at given point in order to get
"marble" texture.
Parameters:
Txtr: | IN, pointer to the texture structure.
|
---|
Point: | IN, coordinate of the point in object space.
|
---|
Normal: | N, OUT, normal at the point.
|
---|
Uv: | IN, uv parameteric domain's coordinates, if exists.
|
---|
Color: | IN, OUT, color value at the point.
|
---|
Returned Value:
Keywords:
texture
image warping
(texture.c:1101)
Prototype:
void TexturePunky(IRndrTextureStruct *Txtr,
IrtPtType Point,
IrtNrmlType Normal,
IrtRType *Uv,
IRndrColorType Color)
Description:
Evaluates pertubation on color value at given point in order to get
"punky" style texture.
Parameters:
Txtr: | IN, pointer to the texture structure.
|
---|
Point: | IN, coordinate of the point in object space.
|
---|
Normal: | N, OUT, normal at the point.
|
---|
Uv: | IN, uv parameteric domain's coordinates, if exists.
|
---|
Color: | IN, OUT, color value at the point.
|
---|
Returned Value:
Keywords:
texture
image warping
(texture.c:562)
Prototype:
void TextureWood(IRndrTextureStruct *Txtr,
IrtPtType Point,
IrtNrmlType Normal,
IrtRType *Uv,
IRndrColorType Color)
Description:
Evaluates pertubation on color value at given point in order to get
"wood" texture.
Parameters:
Txtr: | IN, pointer to the texture structure.
|
---|
Point: | IN, coordinate of the point in object space.
|
---|
Normal: | N, OUT, normal at the point.
|
---|
Uv: | IN, uv parameteric domain's coordinates, if exists.
|
---|
Color: | IN OUT, color value at the point.
|
---|
Returned Value:
Keywords:
(color.c:166)
Prototype:
void TriangleColorEval(IPPolygonStruct *Poly,
int x,
int y,
IRndrObjectStruct *o,
IRndrSceneStruct *Scene,
IRndrInterpolStruct *Value,
IRndrColorType r)
Description:
For scan line "y" and pixel "x" in it computes color value in [0, 1]
RGB format.
Parameters:
Poly: | IN, the polygon the pixel belongs.
|
---|
x: | IN, scan line pixel position.
|
---|
y: | IN, scan line number.
|
---|
o: | IN, the object of the triangle.
|
---|
Scene: | IN, the scene context.
|
---|
Value: | IN, OUT, interpolation value.
|
---|
r: | OUT, resulting color.
|
---|
Returned Value:
Keywords:
RGB
intensivity
scan line
shading
(triangle.c:126)
Prototype:
void TriangleInit(IRndrTriangleStruct *Tri)
Description:
Creates a new Triangle object and allocates memory for it's fields.
Should be called before the first time the object is used.
Parameters:
Tri: | IN, pointer to the Triangle object.
|
---|
Returned Value:
Keywords:
(triangle.c:159)
Prototype:
void TriangleRelease(IRndrTriangleStruct *Tri)
Description:
Free the memory of a the Triangle.
Parameters:
Tri: | IN, pointer to the Triangle object.
|
---|
Returned Value:
Keywords:
(triangle.c:335)
Prototype:
int TriangleSet(IRndrTriangleStruct *Tri,
IPPolygonStruct *Poly,
IRndrObjectStruct *o,
IRndrSceneStruct *Scene)
Description:
Wraps an Irit polygon and initialize the Triangle structure
from polygon and object data.
That includes scan line and interpolation algorithm data initialization.
Parameters:
Tri: | OUT, pointer to the Triangle object.
|
---|
Poly: | IN, pointer to Irit polygon object.
|
---|
o: | IN, pointer to Object which contains a Triangle and stores
various charactarisitics common to every polygon in the object.
|
---|
Scene: | IN, pointer to the scene context.
|
---|
Returned Value:
int: 1 in successful, 0 if polygon is not OK.
|
---|
Keywords:
(triangle.c:48)
Prototype:
void VertexTransform(IPVertexStruct *Vertex,
IRndrMatrixContextStruct *Matrices,
IRndrObjectStruct *o,
IrtRType *Result)
Description:
Calulate the transformed vertex coordinate.
Parameters:
Vertex: | IN, pointer to the Vertex.
|
---|
Matrices: | IN, pointer to matrices context.
|
---|
o: | IN, pointer to Object which contains the Triangle that
contains the vertex. If o is NULL it's being ignored.
|
---|
Result: | OUT, the result transformed homogenous coordinate.
|
---|
Returned Value:
Keywords:
(vis_maps.c:1565)
Prototype:
static int VisMapCheckValidity(IRndrVMStruct *VisMap,
IPPolygonStruct *Triangle,
IRndrVisibleValidityType *Validity)
Description:
Check the validity of the triangle and set Validity accordingly.
Assumes that XY values weren't yet switched with UVZ in the triangle.
Parameters:
VisMap: | IN, pointer to the visibility map.
|
---|
Triangle: | N, triangle polygon object.
|
---|
Validity: | UT, validity of triangle.
|
---|
Returned Value:
int: TRUE if successful (All the given parameters weren't NULL, and the
triangle has UV values).
|
---|
Keywords:
error
(vis_maps.c:1960)
Prototype:
static void VisMapFindLimits(IRndrVMStruct *VisMap, IPObjectStruct *OList)
Description:
Enabling scene fitting for current rendering by setting the scene's XY
limits and VisMap's UV limits accordig to all of OList's vertices (The
scene is stored in VisMap).
This function is recursive.
Parameters:
VisMap: | IN, OUT, pointer to the visibility map.
|
---|
OList: | IN, list of all object to fit in scene.
|
---|
Returned Value:
Keywords:
scene fitting.
(vis_maps.c:1885)
Prototype:
static int VisMapIsPoorAR(IRndrVMStruct *VisMap, IrtPtType v1, IrtPtType v2)
Description:
Checks whether triangle has poor aspect ratio: the ratio between largest
and smallest edge.
Parameters:
VisMap: | IN, pointer to the visibility map.
|
---|
v1: | IN, vector of one edge of triangle.
|
---|
v2: | IN, vector of second edge of triangle.
|
---|
Returned Value:
int: TRUE if aspect ratio is poor.
|
---|
Keywords:
aspect ratio
triangle
AR.
(vis_maps.c:1930)
Prototype:
static int VisMapIsTangentZAxis(IRndrVMStruct *VisMap, IrtPtType Norm)
Description:
Checks whether triangle is close to tangent view vector.
uses VisMap -> CosTanAng, as cos of angle between triangle normal and
z axis.
Parameters:
VisMap: | IN, pointer to the visibility map.
|
---|
Norm: | IN, vector normal of triangle.
|
---|
Returned Value:
int: TRUE triangle is close to tangent view.
|
---|
Keywords:
tangent
triangle.
(vis_maps.c:2055)
Prototype:
static void VisMapMakeFittingMatrices(IRndrVMStruct *VisMap)
Description:
Setting scene fitting parameters after enabling.
Uses the scene's XY limits in order to change the screen matrix so the
entire scene will be in the scene's window and centered. That means that
the entire scene's x and y coordinates will be in the range
[0,scene -> sizex/y] (z coordinate isn't changed).
Parameters:
VisMap: | IN, OUT, pointer to the visibility map.
|
---|
Returned Value:
Keywords:
scene fitting.
(vis_maps.c:1849)
Prototype:
static void VisMapRestoreVector(IRndrVMStruct *VisMap, IrtPtType v)
Description:
Restore vector's world coordinate from view coordinate system.
Parameters:
VisMap: | IN, pointer to the visibility map.
|
---|
v: | IN, OUT: point object to be restore.
|
---|
Returned Value:
Keywords:
restore
vector
point.
(vis_maps.c:2007)
Prototype:
static void VisMapSetRefreshLimits(IRndrVMStruct *VisMap,
IPVertexStruct *Vertex)
Description:
Adding to the scene the contribution of Vertex by updating the scene's
XY limits values and VisMap's UV limits (The scene is stored in
VisMap).
Parameters:
VisMap: | IN, OUT, pointer to the visibility map.
|
---|
Vertex: | IN, vertex to update limits with.
|
---|
Returned Value:
Keywords:
(vis_maps.c:1487)
Prototype:
static int VisMapSwitchTriangleSpaces(IRndrVMStruct *VisMap,
IRndrSceneStruct *Scene,
IRndrObjectStruct *Obj,
IPPolygonStruct *Triangle,
int Reverse)
Description:
Switch Polygon coordinates so it could be scanned with the z buffer
scan convention into the visibility map. Simply set the coord field to
contain the uv values while the x and y values are backuped in attributes
VIS_MAP_X_ATTR_ID and VIS_MAP_Y_ATTR_ID\
At the same time, change the uv space to be [0..size of vismap - 1] (both
in coord and in the uv attribute).
If Reverse is TRUE, do the opposite operation. The coord values set to
the x and y values which are restored from the attributes VIS_MAP_X_ATTR_ID
and VIS_MAP_Y_ATTR_ID (the uv values which were in coord are dismissed).
If Reverse is TRUE, no change of uv space is done.
Parameters:
VisMap: | IN, Pointer to the visibility map.
|
---|
Scene: | IN, a pointer to the scene struct.
|
---|
Obj: | IN, a pointer to the current rendered object.
|
---|
Triangle: | N, OUT, triangle polygon object.
|
---|
Reverse: | IN, Whether to switch uv into xy or do the reverse operation.
|
---|
Returned Value:
Keywords:
space
switch
triangle
scan convention.
(vis_maps.c:1667)
Prototype:
static int VisMapTriangleDZ(IRndrVMStruct *VisMap,
IPPolygonStruct *Triangle,
IRndrVisibleValidityType *Validity,
IrtRType *dz)
Description:
Estimating z error value in visibility map pixel. to make up on
discretization errors.
Estimating is made by the partial differentiating of z(x,y) ,x(u,v),
and y(u,v) as follow:
Dz = (dz/dx)Dx + (dz/dy)Dy
Dy = (dy/du)Du + (dy/dv)Dv
Dx = (dx/du)Du + (dx/dv)Dv
Du = Dv = 1
Where d is partial differentiation, and D means delta value.
Parameters:
VisMap: | IN, pointer to the visibility map.
|
---|
Triangle: | N, triangle polygon object.
|
---|
Validity: | UT, validity of triangle.
|
---|
dz: | OUT, z error estimation.
|
---|
Returned Value:
Keywords:
error
estimation.
(vis_maps.c:1440)
Prototype:
static int VisMapTriangleSet(IRndrTriangleStruct *RendTri,
IPPolygonStruct *Triangle,
IRndrObjectStruct *Obj,
IRndrSceneStruct *Scene,
int UVBackfaceCulling)
Description:
Sets a uv triangle using DoVisMapCalcs field in Object struct
turned on while calling TriangleSet method.
Parameters:
RendTri: | OUT, pointer to the Triangle object.
|
---|
Triangle: | IN, pointer to Irit polygon object.
|
---|
Obj: | IN, pointer to Object which contains a Triangle and
stores various characteristics common to every
polygon in the object.
|
---|
Scene: | IN, pointer to the scene context.
|
---|
UVBackfaceCulling: | N, use backface culling during the UV scan
coversion.
|
---|
Returned Value:
int: TRUE when successful.
|
---|
Keywords:
(zbuffer.c:134)
Prototype:
void ZBufferClear(IRndrZBufferStruct *Buffer)
Description:
Clears the context of the z-buffer.
Parameters:
Buffer: | IN, OUT, Pointer to the z-buffer.
|
---|
Returned Value:
Keywords:
clear buffer
(zbuffer.c:1346)
Prototype:
void ZBufferClearColor(IRndrZBufferStruct *Buffer)
Description:
Routine to clear the color information.
Parameters:
Buffer: | Pointer to the z-buffer.
|
---|
Returned Value:
Keywords:
clear
background
color
reset
(zbuffer.c:1296)
Prototype:
void ZBufferClearDepth(IRndrZBufferStruct *Buffer, IRndrZDepthType ClearZ)
Description:
Routine to clear the z depth information
Parameters:
Buffer: | Pointer to the z-buffer.
|
---|
ClearZ: | Depth to clear the ZBuffer to.
|
---|
Returned Value:
Keywords:
Z coordinate
depth
clear
(zbuffer.c:1322)
Prototype:
void ZBufferClearStencil(IRndrZBufferStruct *Buffer)
Description:
Routine to clear the Stencil information
Parameters:
Buffer: | Pointer to the z-buffer.
|
---|
Returned Value:
Keywords:
clear
Stencil
(zbuffer.c:1061)
Prototype:
void ZBufferGetLineColorAlpha(IRndrZBufferStruct *Buffer,
int x0,
int x1,
int y,
IRndrColorType *Result)
Description:
Retrieves color information of a specific line.
The line should be allocated by the caller.
Parameters:
Buffer: | IN, OUT, pointer to the z-buffer
|
---|
x0: | IN, minimal x coordinate.
|
---|
x1: | IN, maximal x coordinate.
|
---|
y: | IN, line number.
|
---|
Result: | OUT, the color values of the line.
|
---|
Returned Value:
Keywords:
color access
(zbuffer.c:1132)
Prototype:
int ZBufferGetLineDepth(IRndrZBufferStruct *Buffer,
int x0,
int x1,
int y,
IrtRType *Result)
Description:
Retrives z information of a specific line.
The line should be allocated by the caller.
Parameters:
Buffer: | IN, OUT, pointer to the z-buffer
|
---|
x0: | IN, minimal x coordinate.
|
---|
x1: | IN, maximal x coordinate.
|
---|
y: | IN, line number.
|
---|
Result: | OUT, the z values of the line.
|
---|
Returned Value:
int: whether operation succeded.
|
---|
Keywords:
z depth access
(zbuffer.c:1190)
Prototype:
int ZBufferGetLineStencil(IRndrZBufferStruct *Buffer,
int x0,
int x1,
int y,
int *Result)
Description:
Retrives stencil information of a specific line.
The line should be allocated by the caller.
Parameters:
Buffer: | IN, OUT, pointer to the z-buffer.
|
---|
x0: | IN, minimal x coordinate.
|
---|
x1: | IN, maximal x coordinate.
|
---|
y: | IN, line number.
|
---|
Result: | OUT, the stencil values of the line.
|
---|
Returned Value:
int: whether operation succeded.
|
---|
Keywords:
stencil access
(zbuffer.c:47)
Prototype:
int ZBufferInit(IRndrZBufferStruct *Buffer,
IRndrSceneStruct *Scene,
int SuperSize,
int ColorQuantization)
Description:
Initialize a newly created z-buffer.
Parameters:
Buffer: | IN, OUT, Pointer to the z-buffer.
|
---|
Scene: | IN, Pointer to the related scene object.
|
---|
SuperSize: | IN, Super sampling size.
|
---|
ColorQuantization: | IN, non zero to quantize the generated colors to
ColorQuantization levels of colors.
|
---|
Returned Value:
Keywords:
initialize
create buffer
(zbuffer.c:185)
Prototype:
void ZBufferPutPixel(IRndrZBufferStruct *Buffer,
int x,
int y,
IrtRType z,
IrtRType Transparency,
IRndrColorType Color,
IPPolygonStruct *Triangle,
VoidPtr ClbkData)
Description:
Manually adds a single pixel.
Parameters:
Buffer: | IN, OUT, pointer to z-buffer.
|
---|
x: | IN, the column number.
|
---|
y: | IN, the line number.
|
---|
z: | IN, the pixel's depth.
|
---|
Transparency: | N, the pixel's transparency value.
|
---|
Color: | IN, the new color of pixel at (x, y).
|
---|
Triangle: | IN, The triangle which created the added point. *
|
---|
ClbkData: | IN, data to be transfered to call back functions if any.
|
---|
Returned Value:
Keywords:
put pixel
(zbuffer.c:579)
Prototype:
void ZBufferRelease(IRndrZBufferStruct *Buffer)
Description:
Release the memory taken by the z-buffer.
Parameters:
Buffer: | IN,OUT, pointer to the z-buffer.
|
---|
Returned Value:
Keywords:
memory free
release
(zbuffer.c:737)
Prototype:
void ZBufferSaveFile(IRndrZBufferStruct *Buffer,
const char *BaseDirectory,
const char *OutFileName,
const char *FileType,
IRndrZBufferDataType DataType)
Description:
Saves the context of the z-buffer into a file or to the functions
pointed by ZBufferSaveFileCB.
Parameters:
Buffer: | IN, OUT, pointer to the z-buffer.
|
---|
BaseDirectory: | N, the directory where the file is to be saved.
|
---|
OutFileName: | IN, the file name.
|
---|
FileType: | IN, the file type.
|
---|
DataType: | IN, where to save color/z-depth/stencil data.
|
---|
Returned Value:
Keywords:
save
persist
(zbuffer.c:707)
Prototype:
void ZBufferSaveFileCB(IRndrZBufferStruct *Buffer,
IRndrImgGetTypeFuncType ImgSetType,
IRndrImgOpenFuncType ImgOpen,
IRndrImgWriteLineFuncType ImgWriteLine,
IRndrImgCloseFuncType ImgClose)
Description:
Sets call back functions to set image type, open an image, save a row,
and close the image, for ZBufferSaveFile.
Parameters:
Buffer: | IN, OUT, pointer to the z-buffer.
|
---|
ImgSetType: | IN, Image setting file type function
|
---|
ImgOpen: | IN, Function to open an image file.
|
---|
ImgWriteLine: | IN, Function to write one row (Vec of RGB & vec of Alpha).
|
---|
ImgClose: | IN, Function to close an image file.
|
---|
Returned Value:
Keywords:
save
persist
(zbuffer.c:282)
Prototype:
void ZBufferScanTri(IRndrZBufferStruct *Buffer,
IRndrTriangleStruct *Tri,
VoidPtr ClbkData)
Description:
Scan converts a triangle object into the z-buffer.
Parameters:
Buffer: | IN, OUT, pointer to the z-buffer.
|
---|
Tri: | IN, pointer to the Triangle object.
|
---|
ClbkData: | IN, data to be transfered to call back functions if any.
|
---|
Returned Value:
Keywords:
scan convert
(zbuffer.c:544)
Prototype:
void ZBufferScanVMTri(IRndrZBufferStruct *Buffer,
IRndrTriangleStruct *Tri,
VoidPtr ClbkData)
Description:
Scan converts a triagle object into the z-buffer, for the visibility map.
Parameters:
Buffer: | IN, OUT, pointer to the z-buffer.
|
---|
Tri: | IN, pointer to the Triangle object.
|
---|
ClbkData: | IN, data to be transfered to call back functions if any.
|
---|
Returned Value:
See Also:
ZBufferScanTri
Keywords:
(zbuffer.c:1239)
Prototype:
void ZBufferSetFilter(IRndrZBufferStruct *Buffer, char *FilterName)
Description:
Routine to set the filter before any antialias
processing could be done.
Parameters:
Buffer: | Pointer to the z-buffer.
|
---|
FilterName: | tring representing the filter name.
|
---|
Returned Value:
Keywords:
antialias
AntialiasLine
Utah filter package
(report.c:50)
Prototype:
void _IRndrReportError(const char *Fmt, ...)
Description:
Reports an error message.
Parameters:
Fmt: | IN, message format, like the "printf" format.
|
---|
Returned Value:
Keywords:
report error
(report.c:75)
Prototype:
void _IRndrReportFatal(const char *Fmt, ...)
Description:
Reports a fatal error and halts.
Parameters:
Fmt: | IN, message format, like the "printf" format.
|
---|
Returned Value:
Keywords:
report fatal halt
(report.c:25)
Prototype:
void _IRndrReportWarning(const char *Fmt, ...)
Description:
Reports a warning message.
Parameters:
Fmt: | IN, message format, like the "printf" format.
|
---|
Returned Value:
Keywords:
report warning