ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

clip.cpp File Reference

#include "graphics/tinygl/zgl.h"
Include dependency graph for clip.cpp:

Go to the source code of this file.

Namespaces

namespace  TinyGL

Defines

#define CLIP_XMIN   (1 << 0)
#define CLIP_XMAX   (1 << 1)
#define CLIP_YMIN   (1 << 2)
#define CLIP_YMAX   (1 << 3)
#define CLIP_ZMIN   (1 << 4)
#define CLIP_ZMAX   (1 << 5)
#define clip_func(name, sign, dir, dir1, dir2)

Functions

void TinyGL::gl_transform_to_viewport (GLContext *c, GLVertex *v)
static void TinyGL::gl_add_select1 (GLContext *c, int z1, int z2, int z3)
void TinyGL::gl_draw_point (GLContext *c, GLVertex *p0)
static void TinyGL::interpolate_color (GLContext *c, GLVertex *q, GLVertex *p0, GLVertex *p1, float t)
static void TinyGL::interpolate (GLContext *c, GLVertex *q, GLVertex *p0, GLVertex *p1, float t)
static int TinyGL::ClipLine1 (float denom, float num, float *tmin, float *tmax)
void TinyGL::gl_draw_line (GLContext *c, GLVertex *p1, GLVertex *p2)
 TinyGL::clip_func (clip_xmin,-, X, Y, Z) clip_func(clip_xmax
TinyGL::clip_func (clip_ymin,-, Y, X, Z) clip_func(clip_ymax
Z Z TinyGL::clip_func (clip_zmin,-, Z, X, Y) clip_func(clip_zmax
static void TinyGL::updateTmp (GLContext *c, GLVertex *q, GLVertex *p0, GLVertex *p1, float t)
static void TinyGL::gl_draw_triangle_clip (GLContext *c, GLVertex *p0, GLVertex *p1, GLVertex *p2, int clip_bit)
void TinyGL::gl_draw_triangle (GLContext *c, GLVertex *p0, GLVertex *p1, GLVertex *p2)
void TinyGL::gl_draw_triangle_select (GLContext *c, GLVertex *p0, GLVertex *p1, GLVertex *p2)
void TinyGL::gl_draw_triangle_fill (GLContext *c, GLVertex *p0, GLVertex *p1, GLVertex *p2)
void TinyGL::gl_draw_triangle_line (GLContext *c, GLVertex *p0, GLVertex *p1, GLVertex *p2)
void TinyGL::gl_draw_triangle_point (GLContext *c, GLVertex *p0, GLVertex *p1, GLVertex *p2)

Variables

 TinyGL::X
 TinyGL::Y
Z Z TinyGL::Z
Z Z Y float(* TinyGL::clip_proc [6])(Vector4 *, Vector4 *, Vector4 *)

Define Documentation

#define clip_func (   name,
  sign,
  dir,
  dir1,
  dir2 
)
Value:
static float name(Vector4 *c, Vector4 *a, Vector4 *b) { \
    float t, dX, dY, dZ, dW, den;\
    dX = (b->X - a->X); \
    dY = (b->Y - a->Y); \
    dZ = (b->Z - a->Z); \
    dW = (b->W - a->W); \
    den = -(sign d ## dir) + dW; \
    if (den == 0) \
        t = 0; \
    else \
        t = (sign a->dir - a->W) / den; \
    c-> dir1 = (a->dir1 + t * d ## dir1); \
    c-> dir2 = (a->dir2 + t * d ## dir2); \
    c->W = (a->W + t * dW); \
    c-> dir = (sign c->W); \
    return t; \
}

Definition at line 190 of file clip.cpp.

#define CLIP_XMAX   (1 << 1)

Definition at line 37 of file clip.cpp.

#define CLIP_XMIN   (1 << 0)

Definition at line 36 of file clip.cpp.

#define CLIP_YMAX   (1 << 3)

Definition at line 39 of file clip.cpp.

#define CLIP_YMIN   (1 << 2)

Definition at line 38 of file clip.cpp.

#define CLIP_ZMAX   (1 << 5)

Definition at line 41 of file clip.cpp.

#define CLIP_ZMIN   (1 << 4)

Definition at line 40 of file clip.cpp.



Generated on Sat Dec 7 2019 05:01:35 for ResidualVM by doxygen 1.7.1
curved edge   curved edge