[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15719] branches/soc-2007-joeedh/source/ blender/render/intern/include/dsm.h: forgot this file

Joseph Eagar joeedh at gmail.com
Wed Jul 23 20:36:23 CEST 2008


Revision: 15719
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15719
Author:   joeedh
Date:     2008-07-23 20:36:23 +0200 (Wed, 23 Jul 2008)

Log Message:
-----------
forgot this file

Added Paths:
-----------
    branches/soc-2007-joeedh/source/blender/render/intern/include/dsm.h

Added: branches/soc-2007-joeedh/source/blender/render/intern/include/dsm.h
===================================================================
--- branches/soc-2007-joeedh/source/blender/render/intern/include/dsm.h	                        (rev 0)
+++ branches/soc-2007-joeedh/source/blender/render/intern/include/dsm.h	2008-07-23 18:36:23 UTC (rev 15719)
@@ -0,0 +1,97 @@
+/*
+ * $Id: 
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Joseph Eagar (joeedh).
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+#ifndef _DSM_H
+#define _DSM_H
+
+#include "BLI_memarena.h"
+
+#include "BKE_tile.h"
+#include "BKE_dsm.h"
+#include "BKE_bucketbuffer.h"
+
+#include "render_types.h"
+#include "zbuf.h"
+#include "shadbuf.h"
+
+struct _ClrEntry;
+
+typedef struct _ClrEntry {
+	struct _ClrEntry *next, *prev;
+	ListBase *srclist;
+	int depth;
+	int p;
+	int mask;
+	int obi;
+	int type;
+	int samplenr;
+	float value;
+	int index; /* color component index */
+} _ClrEntry;
+
+
+void DSM_getSoftShadow(ShadBuf *shb, struct ShadeInput *shi, LampRen *lar, float *rco, float *dxco, float *dyco, float inp, float *shadowclr);
+float DSM_getShadow(ShadBuf *buf, float *rco, float *dxco, float *dyco, float inp, int component);
+float DSM_getBilinearShadow(ShadBuf *shb, float *rco, float *dxco, float *dyco, float inp, int component);
+float DSM_sampleMap(ShadBuf *shb, int xs, int ys, int zs, int bias, float inp, int component);
+
+/*the various functions needed to build the piecewise-linear visibility functions*/
+void DSM_MergeLayerListNew(DSMTile *tile, int x, int y, struct _ClrEntry *row, ListBase (*transfuncs)[3],
+								   int totface, void *scratchmem1, void *scratchmem2, void *scratchmem3,
+								   int scratchlen, float *weight, int samplewid, float error);
+
+void DSM_CompressFunction(MemArena *arena, DSMFunction *func, float error);
+DSMFunction *DSM_MergeLayerList(MemArena *arena, struct _ClrEntry *row, ListBase (*transfuncs)[3], 
+								int totface,char *scratchmem, int scratchlen, float *weight, 
+								int samplewid,float error, int cindex, DSMTile *tile, short *offset);
+
+void DSM_DoTile(Render *re, float projmat[4][4], ShadBuf *shb, DSMTile *tile, 
+				DSMBuffer *dbuf, RE_BucketTile *btile, int threadnr, float viewinv[4][4]);
+
+int zbuffer_dsm(Render *re, RenderPart *pa, float winmat[4][4], APixstr **lastbuf, 
+				APixstr **lastbufstrand, APixstr *APixbuf, APixstr *APixbufstrand, 
+				ListBase *apsmbase, unsigned int lay, ShadBuf *shb, 
+				RE_BucketTile *buckettile);
+
+
+/* Modified zbufclipwire from zbuf.c
+  v1 and v2 are in homogenous coordinates.  returns true if 
+  drawing should happen.  v1 and v2 are modified (clipped).*/
+int DSM_zbufclipwire(float clipsta, float clipend, int rectx, int recty, float *v1, float *v2);
+
+APixstr *dsm_addpsmainA(ListBase *lb);
+void dsm_freepsA(ListBase *lb);
+APixstr *dsm_addpsA(ZSpan *zspan);
+
+#define DSM_NONE			0
+#define DSM_FACE			1
+#define DSM_FACE_STEP		2
+#define DSM_STRAND			3
+#define DSM_STRAND_STEP		4
+#define DSM_VOLUME_SAMPLE	5
+
+#endif /* _DSM_H */





More information about the Bf-blender-cvs mailing list