YafaRay Core  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Macros | Functions
triclip.cc File Reference
#include <yafray_config.h>
#include <core_api/bound.h>
#include <string.h>
#include <stdio.h>
#include <algorithm>
#include <iostream>
Include dependency graph for triclip.cc:

Go to the source code of this file.


class  DVector
struct  clipDump


#define Y_VCPY(a, b)   ( (a)[0] =(b)[0], (a)[1] =(b)[1], (a)[2] =(b)[2] )


template<class T >
__BEGIN_YAFRAY void _swap (T **a, T **b)
int triBoxClip (const double b_min[3], const double b_max[3], const double triverts[3][3], bound_t &box, void *n_dat)
int triPlaneClip (double pos, int axis, bool lower, bound_t &box, void *o_dat, void *n_dat)

Macro Definition Documentation

#define Y_VCPY (   a,
)    ( (a)[0] =(b)[0], (a)[1] =(b)[1], (a)[2] =(b)[2] )

Definition at line 40 of file triclip.cc.

Function Documentation

template<class T >
__BEGIN_YAFRAY void _swap ( T **  a,
T **  b 

Definition at line 15 of file triclip.cc.

int triBoxClip ( const double  b_min[3],
const double  b_max[3],
const double  triverts[3][3],
bound_t box,
void *  n_dat 

function to clip a triangle against an axis aligned bounding box and return new bound

boxthe AABB of the clipped triangle
0: triangle was clipped successfully 1: triangle didn't overlap the bound at all => disappeared 2: fatal error occured (didn't ever happen to me :) 3: resulting polygon degenerated to less than 3 edges (never happened either)

Definition at line 50 of file triclip.cc.

int triPlaneClip ( double  pos,
int  axis,
bool  lower,
bound_t box,
void *  o_dat,
void *  n_dat 

Definition at line 236 of file triclip.cc.