home *** CD-ROM | disk | FTP | other *** search
/ Windows News 2005 November / WNnov2005.iso / Windows / Equipement / Blender / blender-2.37a-windows.exe / $_5_ / plugins / include / plugin.h < prev    next >
C/C++ Source or Header  |  2005-06-14  |  3KB  |  97 lines

  1. /* Copyright (c) 1999, Not a Number / NeoGeo b.v. 
  2.  * $Id: plugin.h,v 1.6 2004/11/12 17:50:11 sirdude Exp $
  3.  * 
  4.  * All rights reserved.
  5.  * 
  6.  * Contact:      info@blender.org   
  7.  * Information:  http://www.blender.org
  8.  *
  9.  * Redistribution and use in source and binary forms, with or without
  10.  * modification, are permitted provided that the following conditions
  11.  * are met:
  12.  * 1. Redistributions of source code must retain the above copyright
  13.  *    notice, this list of conditions and the following disclaimer.
  14.  * 2. Redistributions in binary form must reproduce the above copyright
  15.  *    notice, this list of conditions and the following disclaimer in the
  16.  *    documentation and/or other materials provided with the distribution.
  17.  *
  18.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  19.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  20.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  21.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  22.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  23.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  24.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  25.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  26.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  27.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  28.  * SUCH DAMAGE.
  29.  */
  30.  
  31. #ifndef PLUGIN_H
  32. #define PLUGIN_H
  33.  
  34. #include "iff.h"
  35. #include "util.h"
  36. #include "floatpatch.h"
  37.  
  38. #define B_PLUGIN_VERSION    3
  39.  
  40. typedef    int (*TexDoit)(int, void*, float*, float*, float*);
  41. typedef void (*SeqDoit)(void*, float, float, int, int, ImBuf*, ImBuf*, ImBuf*, ImBuf*);
  42.  
  43. typedef struct VarStruct {
  44.     int type;
  45.     char name[16];
  46.     float def, min, max;
  47.     char tip[80];
  48. } VarStruct;
  49.  
  50. typedef struct _PluginInfo {
  51.     char *name;
  52.     char *snames;
  53.  
  54.     int stypes;
  55.     int nvars;
  56.     VarStruct *varstr;
  57.     float *result;
  58.     float *cfra;
  59.  
  60.     void (*init)(void);
  61.     void (*callback)(int);
  62.     TexDoit tex_doit;
  63.     SeqDoit seq_doit;
  64. } PluginInfo;
  65.  
  66. int plugin_tex_getversion(void);
  67. int plugin_seq_getversion(void);
  68. void plugin_getinfo(PluginInfo *);
  69.  
  70. /* *************** defines for button types ************** */
  71.  
  72. #define CHA    32
  73. #define INT    96
  74. #define FLO    128
  75.  
  76. #define TOG    (3<<9)
  77. #define    NUM    (5<<9)
  78. #define LABEL    (10<<9)
  79. #define NUMSLI    (14<<9)
  80. #define COL    (15<<9)
  81.  
  82.  
  83. /* *************** API functions ******************** */
  84.  
  85.     /* derived from the famous Perlin noise */
  86. extern float hnoise(float noisesize, float x, float y, float z);
  87.     /* the original Perlin noise */
  88. extern float hnoisep(float noisesize, float x, float y, float z);
  89.  
  90.     /* soft turbulence */
  91. extern float turbulence(float noisesize, float x, float y, float z, int depth);
  92.     /* hard turbulence */
  93. extern float turbulence1(float noisesize, float x, float y, float z, int depth);
  94.  
  95. #endif /* PLUGIN_H */
  96.  
  97.