src/yafraycore/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.

Classes

class  DVector
struct  clipDump

Defines

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

Functions

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)

Define Documentation

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

Definition at line 52 of file triclip.cc.


Function Documentation

template<class T >
__BEGIN_YAFRAY void _swap ( T **  a,
T **  b 
) [inline]

Definition at line 25 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

Parameters:
box the AABB of the clipped triangle
Returns:
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 62 of file triclip.cc.

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

Definition at line 245 of file triclip.cc.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 18 Dec 2009 for YafaRay by  doxygen 1.6.1