|
UFO: Alien Invasion
|
#include "bspslicer.h"#include "../ports/system.h"#include "../common/common.h"#include "../shared/images.h"
Go to the source code of this file.
Macros | |
| #define | DEPTH 3 |
| #define | IMAGE_BUFFER_SET_BLACK(buffer, offset) do {int i; for (i = 0; i < DEPTH; i++) {buffer[offset + i] = 0xFF; } } while(0); |
Functions | |
| static bool | SL_CreatePNGFile (const char *filename, unsigned char *buffer, int width, int height) |
| static void | SL_Bresenham (int x0, int y0, int x1, int y1, int width, int height, bool rotated, unsigned char *outputBuffer) |
| static float | SL_DistanceToIntersection (const vec3_t origin, const vec3_t vector, const vec3_t planeOrigin, const vec3_t planeNormal) |
| static bool | SL_VectorIntersectPlane (const vec3_t origin, const vec3_t vector, const vec3_t planeOrigin, const vec3_t planeNormal, vec3_t intersectPoint) |
| static void | SL_SliceTheWorld (const TR_TILE_TYPE *tile, const vec3_t mins, const vec3_t maxs, float stepsize, int scale, bool singleFile, bool multipleContour) |
| slice the world in Z planes going from min_z to max_z by stepsize... More... | |
| void | SL_BSPSlice (const TR_TILE_TYPE *model, float thickness, int scale, bool singleFile, bool multipleContour) |
| #define DEPTH 3 |
Definition at line 11 of file bspslicer.cpp.
| #define IMAGE_BUFFER_SET_BLACK | ( | buffer, | |
| offset | |||
| ) | do {int i; for (i = 0; i < DEPTH; i++) {buffer[offset + i] = 0xFF; } } while(0); |
Definition at line 26 of file bspslicer.cpp.
|
static |
Definition at line 28 of file bspslicer.cpp.
References DEPTH, and IMAGE_BUFFER_SET_BLACK.
Referenced by SL_SliceTheWorld().
| void SL_BSPSlice | ( | const TR_TILE_TYPE * | model, |
| float | thickness, | ||
| int | scale, | ||
| bool | singleFile, | ||
| bool | multipleContour | ||
| ) |
| [in] | model | The tile-info about the bsp-file we want to slice |
| [in] | thickness | the thickness of the brushes to render to the 2d map |
| [in] | scale | The scale of the png as passed via -s param. eg. 4 means: 1/4 or 1 pixels = 4 mapunits |
| [in] | singleFile | Put everything in one file. If false, create one file per level. As given by the -c param or the config default |
| [in] | multipleContour | Also draw all contours below the current slice. As given by the -m param or the config default |
Definition at line 315 of file bspslicer.cpp.
References AddPointToBounds(), dBspModel_t::dbmBox, i, MAX_WORLD_WIDTH, AABB::maxs, AABB::mins, PATHFINDING_HEIGHT, scale, SL_SliceTheWorld(), and UNIT_HEIGHT.
Referenced by main().
|
static |
Definition at line 13 of file bspslicer.cpp.
References f, FILE_WRITE, FS_OpenFile(), and R_WritePNG().
Referenced by SL_SliceTheWorld().
|
static |
Definition at line 107 of file bspslicer.cpp.
References DotProduct.
Referenced by SL_VectorIntersectPlane().
|
static |
slice the world in Z planes going from min_z to max_z by stepsize...
Definition at line 139 of file bspslicer.cpp.
References Com_Printf(), Com_sprintf(), DEPTH, dBspSurface_t::firstedge, dBspModel_t::firstface, int(), MAX_QPATH, Mem_AllocTypeN, Mem_Free, dBspSurface_t::numedges, dBspModel_t::numfaces, Q_strncpyz(), scale, SL_Bresenham(), SL_CreatePNGFile(), SL_VectorIntersectPlane(), SURF_BLEND33, SURF_BLEND66, SURF_HINT, SURF_NODRAW, SURF_SKIP, dBspTexinfo_t::surfaceFlags, dBspSurface_t::texinfo, v, dBspEdge_t::v, VectorCopy, VectorNormalize(), and VectorSubtract.
Referenced by SL_BSPSlice().
|
static |
true or false if vector intersects a plane... Definition at line 123 of file bspslicer.cpp.
References SL_DistanceToIntersection(), VectorAdd, and VectorScale.
Referenced by SL_SliceTheWorld().