vrshoot
diff libs/assimp/BlenderScene.h @ 0:b2f14e535253
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 01 Feb 2014 19:58:19 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/libs/assimp/BlenderScene.h Sat Feb 01 19:58:19 2014 +0200 1.3 @@ -0,0 +1,725 @@ 1.4 +/* 1.5 +Open Asset Import Library (assimp) 1.6 +---------------------------------------------------------------------- 1.7 + 1.8 +Copyright (c) 2006-2012, assimp team 1.9 +All rights reserved. 1.10 + 1.11 +Redistribution and use of this software in source and binary forms, 1.12 +with or without modification, are permitted provided that the 1.13 +following conditions are met: 1.14 + 1.15 +* Redistributions of source code must retain the above 1.16 + copyright notice, this list of conditions and the 1.17 + following disclaimer. 1.18 + 1.19 +* Redistributions in binary form must reproduce the above 1.20 + copyright notice, this list of conditions and the 1.21 + following disclaimer in the documentation and/or other 1.22 + materials provided with the distribution. 1.23 + 1.24 +* Neither the name of the assimp team, nor the names of its 1.25 + contributors may be used to endorse or promote products 1.26 + derived from this software without specific prior 1.27 + written permission of the assimp team. 1.28 + 1.29 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1.30 +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1.31 +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1.32 +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1.33 +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1.34 +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1.35 +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1.36 +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1.37 +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1.38 +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1.39 +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1.40 + 1.41 +---------------------------------------------------------------------- 1.42 +*/ 1.43 + 1.44 +/** @file BlenderScene.h 1.45 + * @brief Intermediate representation of a BLEND scene. 1.46 + */ 1.47 +#ifndef INCLUDED_AI_BLEND_SCENE_H 1.48 +#define INCLUDED_AI_BLEND_SCENE_H 1.49 + 1.50 +namespace Assimp { 1.51 + namespace Blender { 1.52 + 1.53 +// Minor parts of this file are extracts from blender data structures, 1.54 +// declared in the ./source/blender/makesdna directory. 1.55 +// Stuff that is not used by Assimp is commented. 1.56 + 1.57 + 1.58 +// NOTE 1.59 +// this file serves as input data to the `./scripts/genblenddna.py` 1.60 +// script. This script generates the actual binding code to read a 1.61 +// blender file with a possibly different DNA into our structures. 1.62 +// Only `struct` declarations are considered and the following 1.63 +// rules must be obeyed in order for the script to work properly: 1.64 +// 1.65 +// * C++ style comments only 1.66 +// 1.67 +// * Structures may include the primitive types char, int, short, 1.68 +// float, double. Signedness specifiers are not allowed on 1.69 +// integers. Enum types are allowed, but they must have been 1.70 +// defined in this header. 1.71 +// 1.72 +// * Structures may aggregate other structures, unless not defined 1.73 +// in this header. 1.74 +// 1.75 +// * Pointers to other structures or primitive types are allowed. 1.76 +// No references or double pointers or arrays of pointers. 1.77 +// A pointer to a T is normally written as boost::shared_ptr, while a 1.78 +// pointer to an array of elements is written as boost:: 1.79 +// shared_array. To avoid cyclic pointers, use raw pointers in 1.80 +// one direction. 1.81 +// 1.82 +// * Arrays can have maximally two-dimensions. Any non-pointer 1.83 +// type can form them. 1.84 +// 1.85 +// * Multiple fields can be declare in a single line (i.e `int a,b;`) 1.86 +// provided they are neither pointers nor arrays. 1.87 +// 1.88 +// * One of WARN, FAIL can be appended to the declaration ( 1.89 +// prior to the semiolon to specifiy the error handling policy if 1.90 +// this field is missing in the input DNA). If none of those 1.91 +// is specified the default policy is to subtitute a default 1.92 +// value for the field. 1.93 +// 1.94 + 1.95 +#define WARN // warn if field is missing, substitute default value 1.96 +#define FAIL // fail the import if the field does not exist 1.97 + 1.98 +struct Object; 1.99 +struct MTex; 1.100 +struct Image; 1.101 + 1.102 +#define AI_BLEND_MESH_MAX_VERTS 2000000000L 1.103 + 1.104 +// ------------------------------------------------------------------------------- 1.105 +struct ID : ElemBase { 1.106 + 1.107 + char name[24] WARN; 1.108 + short flag; 1.109 +}; 1.110 + 1.111 +// ------------------------------------------------------------------------------- 1.112 +struct ListBase : ElemBase { 1.113 + 1.114 + boost::shared_ptr<ElemBase> first; 1.115 + boost::shared_ptr<ElemBase> last; 1.116 +}; 1.117 + 1.118 + 1.119 +// ------------------------------------------------------------------------------- 1.120 +struct PackedFile : ElemBase { 1.121 + int size WARN; 1.122 + int seek WARN; 1.123 + boost::shared_ptr< FileOffset > data WARN; 1.124 +}; 1.125 + 1.126 +// ------------------------------------------------------------------------------- 1.127 +struct GroupObject : ElemBase { 1.128 + 1.129 + boost::shared_ptr<GroupObject> prev,next FAIL; 1.130 + boost::shared_ptr<Object> ob; 1.131 +}; 1.132 + 1.133 +// ------------------------------------------------------------------------------- 1.134 +struct Group : ElemBase { 1.135 + ID id FAIL; 1.136 + int layer; 1.137 + 1.138 + boost::shared_ptr<GroupObject> gobject; 1.139 +}; 1.140 + 1.141 +// ------------------------------------------------------------------------------- 1.142 +struct World : ElemBase { 1.143 + ID id FAIL; 1.144 + 1.145 +}; 1.146 + 1.147 +// ------------------------------------------------------------------------------- 1.148 +struct MVert : ElemBase { 1.149 + float co[3] FAIL; 1.150 + float no[3] FAIL; 1.151 + char flag; 1.152 + int mat_nr WARN; 1.153 + int bweight; 1.154 +}; 1.155 + 1.156 +// ------------------------------------------------------------------------------- 1.157 +struct MEdge : ElemBase { 1.158 + int v1, v2 FAIL; 1.159 + char crease, bweight; 1.160 + short flag; 1.161 +}; 1.162 + 1.163 +// ------------------------------------------------------------------------------- 1.164 +struct MLoop : ElemBase { 1.165 + int v, e; 1.166 +}; 1.167 + 1.168 +// ------------------------------------------------------------------------------- 1.169 +struct MLoopUV : ElemBase { 1.170 + float uv[2]; 1.171 + int flag; 1.172 +}; 1.173 + 1.174 +// ------------------------------------------------------------------------------- 1.175 +// Note that red and blue are not swapped, as with MCol 1.176 +struct MLoopCol : ElemBase { 1.177 + char r, g, b, a; 1.178 +}; 1.179 + 1.180 +// ------------------------------------------------------------------------------- 1.181 +struct MPoly : ElemBase { 1.182 + int loopstart; 1.183 + int totloop; 1.184 + short mat_nr; 1.185 + char flag; 1.186 +}; 1.187 + 1.188 +// ------------------------------------------------------------------------------- 1.189 +struct MTexPoly : ElemBase { 1.190 + Image* tpage; 1.191 + char flag, transp; 1.192 + short mode, tile, pad; 1.193 +}; 1.194 + 1.195 +// ------------------------------------------------------------------------------- 1.196 +struct MCol : ElemBase { 1.197 + char r,g,b,a FAIL; 1.198 +}; 1.199 + 1.200 +// ------------------------------------------------------------------------------- 1.201 +struct MFace : ElemBase { 1.202 + int v1,v2,v3,v4 FAIL; 1.203 + int mat_nr FAIL; 1.204 + char flag; 1.205 +}; 1.206 + 1.207 +// ------------------------------------------------------------------------------- 1.208 +struct TFace : ElemBase { 1.209 + float uv[4][2] FAIL; 1.210 + int col[4] FAIL; 1.211 + char flag; 1.212 + short mode; 1.213 + short tile; 1.214 + short unwrap; 1.215 +}; 1.216 + 1.217 +// ------------------------------------------------------------------------------- 1.218 +struct MTFace : ElemBase { 1.219 + 1.220 + float uv[4][2] FAIL; 1.221 + char flag; 1.222 + short mode; 1.223 + short tile; 1.224 + short unwrap; 1.225 + 1.226 + // boost::shared_ptr<Image> tpage; 1.227 +}; 1.228 + 1.229 +// ------------------------------------------------------------------------------- 1.230 +struct MDeformWeight : ElemBase { 1.231 + int def_nr FAIL; 1.232 + float weight FAIL; 1.233 +}; 1.234 + 1.235 +// ------------------------------------------------------------------------------- 1.236 +struct MDeformVert : ElemBase { 1.237 + 1.238 + vector<MDeformWeight> dw WARN; 1.239 + int totweight; 1.240 +}; 1.241 + 1.242 +// ------------------------------------------------------------------------------- 1.243 +struct Material : ElemBase { 1.244 + ID id FAIL; 1.245 + 1.246 + float r,g,b WARN; 1.247 + float specr,specg,specb WARN; 1.248 + short har; 1.249 + float ambr,ambg,ambb WARN; 1.250 + float mirr,mirg,mirb; 1.251 + float emit WARN; 1.252 + float alpha WARN; 1.253 + float ref; 1.254 + float translucency; 1.255 + float roughness; 1.256 + float darkness; 1.257 + float refrac; 1.258 + 1.259 + boost::shared_ptr<Group> group; 1.260 + 1.261 + short diff_shader WARN; 1.262 + short spec_shader WARN; 1.263 + 1.264 + boost::shared_ptr<MTex> mtex[18]; 1.265 +}; 1.266 + 1.267 +// ------------------------------------------------------------------------------- 1.268 +struct Mesh : ElemBase { 1.269 + ID id FAIL; 1.270 + 1.271 + int totface FAIL; 1.272 + int totedge FAIL; 1.273 + int totvert FAIL; 1.274 + int totloop; 1.275 + int totpoly; 1.276 + 1.277 + short subdiv; 1.278 + short subdivr; 1.279 + short subsurftype; 1.280 + short smoothresh; 1.281 + 1.282 + vector<MFace> mface FAIL; 1.283 + vector<MTFace> mtface; 1.284 + vector<TFace> tface; 1.285 + vector<MVert> mvert FAIL; 1.286 + vector<MEdge> medge WARN; 1.287 + vector<MLoop> mloop; 1.288 + vector<MLoopUV> mloopuv; 1.289 + vector<MLoopCol> mloopcol; 1.290 + vector<MPoly> mpoly; 1.291 + vector<MTexPoly> mtpoly; 1.292 + vector<MDeformVert> dvert; 1.293 + vector<MCol> mcol; 1.294 + 1.295 + vector< boost::shared_ptr<Material> > mat FAIL; 1.296 +}; 1.297 + 1.298 +// ------------------------------------------------------------------------------- 1.299 +struct Library : ElemBase { 1.300 + ID id FAIL; 1.301 + 1.302 + char name[240] WARN; 1.303 + char filename[240] FAIL; 1.304 + boost::shared_ptr<Library> parent WARN; 1.305 +}; 1.306 + 1.307 +// ------------------------------------------------------------------------------- 1.308 +struct Camera : ElemBase { 1.309 + enum Type { 1.310 + Type_PERSP = 0 1.311 + ,Type_ORTHO = 1 1.312 + }; 1.313 + 1.314 + ID id FAIL; 1.315 + 1.316 + // struct AnimData *adt; 1.317 + 1.318 + Type type,flag WARN; 1.319 + float angle WARN; 1.320 + //float passepartalpha, angle; 1.321 + //float clipsta, clipend; 1.322 + //float lens, ortho_scale, drawsize; 1.323 + //float shiftx, shifty; 1.324 + 1.325 + //float YF_dofdist, YF_aperture; 1.326 + //short YF_bkhtype, YF_bkhbias; 1.327 + //float YF_bkhrot; 1.328 +}; 1.329 + 1.330 + 1.331 +// ------------------------------------------------------------------------------- 1.332 +struct Lamp : ElemBase { 1.333 + 1.334 + enum FalloffType { 1.335 + FalloffType_Constant = 0x0 1.336 + ,FalloffType_InvLinear = 0x1 1.337 + ,FalloffType_InvSquare = 0x2 1.338 + //,FalloffType_Curve = 0x3 1.339 + //,FalloffType_Sliders = 0x4 1.340 + }; 1.341 + 1.342 + enum Type { 1.343 + Type_Local = 0x0 1.344 + ,Type_Sun = 0x1 1.345 + ,Type_Spot = 0x2 1.346 + ,Type_Hemi = 0x3 1.347 + ,Type_Area = 0x4 1.348 + //,Type_YFPhoton = 0x5 1.349 + }; 1.350 + 1.351 + ID id FAIL; 1.352 + //AnimData *adt; 1.353 + 1.354 + Type type FAIL; 1.355 + short flags; 1.356 + 1.357 + //int mode; 1.358 + 1.359 + short colormodel, totex; 1.360 + float r,g,b,k WARN; 1.361 + //float shdwr, shdwg, shdwb; 1.362 + 1.363 + float energy, dist, spotsize, spotblend; 1.364 + //float haint; 1.365 + 1.366 + float att1, att2; 1.367 + //struct CurveMapping *curfalloff; 1.368 + FalloffType falloff_type; 1.369 + 1.370 + //float clipsta, clipend, shadspotsize; 1.371 + //float bias, soft, compressthresh; 1.372 + //short bufsize, samp, buffers, filtertype; 1.373 + //char bufflag, buftype; 1.374 + 1.375 + //short ray_samp, ray_sampy, ray_sampz; 1.376 + //short ray_samp_type; 1.377 + //short area_shape; 1.378 + //float area_size, area_sizey, area_sizez; 1.379 + //float adapt_thresh; 1.380 + //short ray_samp_method; 1.381 + 1.382 + //short texact, shadhalostep; 1.383 + 1.384 + //short sun_effect_type; 1.385 + //short skyblendtype; 1.386 + //float horizon_brightness; 1.387 + //float spread; 1.388 + float sun_brightness; 1.389 + //float sun_size; 1.390 + //float backscattered_light; 1.391 + //float sun_intensity; 1.392 + //float atm_turbidity; 1.393 + //float atm_inscattering_factor; 1.394 + //float atm_extinction_factor; 1.395 + //float atm_distance_factor; 1.396 + //float skyblendfac; 1.397 + //float sky_exposure; 1.398 + //short sky_colorspace; 1.399 + 1.400 + // int YF_numphotons, YF_numsearch; 1.401 + // short YF_phdepth, YF_useqmc, YF_bufsize, YF_pad; 1.402 + // float YF_causticblur, YF_ltradius; 1.403 + 1.404 + // float YF_glowint, YF_glowofs; 1.405 + // short YF_glowtype, YF_pad2; 1.406 + 1.407 + //struct Ipo *ipo; 1.408 + //struct MTex *mtex[18]; 1.409 + // short pr_texture; 1.410 + 1.411 + //struct PreviewImage *preview; 1.412 +}; 1.413 + 1.414 +// ------------------------------------------------------------------------------- 1.415 +struct ModifierData : ElemBase { 1.416 + enum ModifierType { 1.417 + eModifierType_None = 0, 1.418 + eModifierType_Subsurf, 1.419 + eModifierType_Lattice, 1.420 + eModifierType_Curve, 1.421 + eModifierType_Build, 1.422 + eModifierType_Mirror, 1.423 + eModifierType_Decimate, 1.424 + eModifierType_Wave, 1.425 + eModifierType_Armature, 1.426 + eModifierType_Hook, 1.427 + eModifierType_Softbody, 1.428 + eModifierType_Boolean, 1.429 + eModifierType_Array, 1.430 + eModifierType_EdgeSplit, 1.431 + eModifierType_Displace, 1.432 + eModifierType_UVProject, 1.433 + eModifierType_Smooth, 1.434 + eModifierType_Cast, 1.435 + eModifierType_MeshDeform, 1.436 + eModifierType_ParticleSystem, 1.437 + eModifierType_ParticleInstance, 1.438 + eModifierType_Explode, 1.439 + eModifierType_Cloth, 1.440 + eModifierType_Collision, 1.441 + eModifierType_Bevel, 1.442 + eModifierType_Shrinkwrap, 1.443 + eModifierType_Fluidsim, 1.444 + eModifierType_Mask, 1.445 + eModifierType_SimpleDeform, 1.446 + eModifierType_Multires, 1.447 + eModifierType_Surface, 1.448 + eModifierType_Smoke, 1.449 + eModifierType_ShapeKey 1.450 + }; 1.451 + 1.452 + boost::shared_ptr<ElemBase> next WARN; 1.453 + boost::shared_ptr<ElemBase> prev WARN; 1.454 + 1.455 + int type, mode; 1.456 + char name[32]; 1.457 +}; 1.458 + 1.459 +// ------------------------------------------------------------------------------- 1.460 +struct SubsurfModifierData : ElemBase { 1.461 + 1.462 + enum Type { 1.463 + 1.464 + TYPE_CatmullClarke = 0x0, 1.465 + TYPE_Simple = 0x1 1.466 + }; 1.467 + 1.468 + enum Flags { 1.469 + // some omitted 1.470 + FLAGS_SubsurfUV =1<<3 1.471 + }; 1.472 + 1.473 + ModifierData modifier FAIL; 1.474 + short subdivType WARN; 1.475 + short levels FAIL; 1.476 + short renderLevels ; 1.477 + short flags; 1.478 +}; 1.479 + 1.480 +// ------------------------------------------------------------------------------- 1.481 +struct MirrorModifierData : ElemBase { 1.482 + 1.483 + enum Flags { 1.484 + Flags_CLIPPING =1<<0, 1.485 + Flags_MIRROR_U =1<<1, 1.486 + Flags_MIRROR_V =1<<2, 1.487 + Flags_AXIS_X =1<<3, 1.488 + Flags_AXIS_Y =1<<4, 1.489 + Flags_AXIS_Z =1<<5, 1.490 + Flags_VGROUP =1<<6 1.491 + }; 1.492 + 1.493 + ModifierData modifier FAIL; 1.494 + 1.495 + short axis, flag; 1.496 + float tolerance; 1.497 + boost::shared_ptr<Object> mirror_ob; 1.498 +}; 1.499 + 1.500 +// ------------------------------------------------------------------------------- 1.501 +struct Object : ElemBase { 1.502 + ID id FAIL; 1.503 + 1.504 + enum Type { 1.505 + Type_EMPTY = 0 1.506 + ,Type_MESH = 1 1.507 + ,Type_CURVE = 2 1.508 + ,Type_SURF = 3 1.509 + ,Type_FONT = 4 1.510 + ,Type_MBALL = 5 1.511 + 1.512 + ,Type_LAMP = 10 1.513 + ,Type_CAMERA = 11 1.514 + 1.515 + ,Type_WAVE = 21 1.516 + ,Type_LATTICE = 22 1.517 + }; 1.518 + 1.519 + Type type FAIL; 1.520 + float obmat[4][4] WARN; 1.521 + float parentinv[4][4] WARN; 1.522 + char parsubstr[32] WARN; 1.523 + 1.524 + Object* parent WARN; 1.525 + boost::shared_ptr<Object> track WARN; 1.526 + 1.527 + boost::shared_ptr<Object> proxy,proxy_from,proxy_group WARN; 1.528 + boost::shared_ptr<Group> dup_group WARN; 1.529 + boost::shared_ptr<ElemBase> data FAIL; 1.530 + 1.531 + ListBase modifiers; 1.532 +}; 1.533 + 1.534 + 1.535 +// ------------------------------------------------------------------------------- 1.536 +struct Base : ElemBase { 1.537 + Base* prev WARN; 1.538 + boost::shared_ptr<Base> next WARN; 1.539 + boost::shared_ptr<Object> object WARN; 1.540 +}; 1.541 + 1.542 +// ------------------------------------------------------------------------------- 1.543 +struct Scene : ElemBase { 1.544 + ID id FAIL; 1.545 + 1.546 + boost::shared_ptr<Object> camera WARN; 1.547 + boost::shared_ptr<World> world WARN; 1.548 + boost::shared_ptr<Base> basact WARN; 1.549 + 1.550 + ListBase base; 1.551 +}; 1.552 + 1.553 + 1.554 +// ------------------------------------------------------------------------------- 1.555 +struct Image : ElemBase { 1.556 + ID id FAIL; 1.557 + 1.558 + char name[240] WARN; 1.559 + 1.560 + //struct anim *anim; 1.561 + 1.562 + short ok, flag; 1.563 + short source, type, pad, pad1; 1.564 + int lastframe; 1.565 + 1.566 + short tpageflag, totbind; 1.567 + short xrep, yrep; 1.568 + short twsta, twend; 1.569 + //unsigned int bindcode; 1.570 + //unsigned int *repbind; 1.571 + 1.572 + boost::shared_ptr<PackedFile> packedfile; 1.573 + //struct PreviewImage * preview; 1.574 + 1.575 + float lastupdate; 1.576 + int lastused; 1.577 + short animspeed; 1.578 + 1.579 + short gen_x, gen_y, gen_type; 1.580 +}; 1.581 + 1.582 +// ------------------------------------------------------------------------------- 1.583 +struct Tex : ElemBase { 1.584 + 1.585 + // actually, the only texture type we support is Type_IMAGE 1.586 + enum Type { 1.587 + Type_CLOUDS = 1 1.588 + ,Type_WOOD = 2 1.589 + ,Type_MARBLE = 3 1.590 + ,Type_MAGIC = 4 1.591 + ,Type_BLEND = 5 1.592 + ,Type_STUCCI = 6 1.593 + ,Type_NOISE = 7 1.594 + ,Type_IMAGE = 8 1.595 + ,Type_PLUGIN = 9 1.596 + ,Type_ENVMAP = 10 1.597 + ,Type_MUSGRAVE = 11 1.598 + ,Type_VORONOI = 12 1.599 + ,Type_DISTNOISE = 13 1.600 + ,Type_POINTDENSITY = 14 1.601 + ,Type_VOXELDATA = 15 1.602 + }; 1.603 + 1.604 + ID id FAIL; 1.605 + // AnimData *adt; 1.606 + 1.607 + //float noisesize, turbul; 1.608 + //float bright, contrast, rfac, gfac, bfac; 1.609 + //float filtersize; 1.610 + 1.611 + //float mg_H, mg_lacunarity, mg_octaves, mg_offset, mg_gain; 1.612 + //float dist_amount, ns_outscale; 1.613 + 1.614 + //float vn_w1; 1.615 + //float vn_w2; 1.616 + //float vn_w3; 1.617 + //float vn_w4; 1.618 + //float vn_mexp; 1.619 + //short vn_distm, vn_coltype; 1.620 + 1.621 + //short noisedepth, noisetype; 1.622 + //short noisebasis, noisebasis2; 1.623 + 1.624 + //short imaflag, flag; 1.625 + Type type FAIL; 1.626 + //short stype; 1.627 + 1.628 + //float cropxmin, cropymin, cropxmax, cropymax; 1.629 + //int texfilter; 1.630 + //int afmax; 1.631 + //short xrepeat, yrepeat; 1.632 + //short extend; 1.633 + 1.634 + //short fie_ima; 1.635 + //int len; 1.636 + //int frames, offset, sfra; 1.637 + 1.638 + //float checkerdist, nabla; 1.639 + //float norfac; 1.640 + 1.641 + //ImageUser iuser; 1.642 + 1.643 + //bNodeTree *nodetree; 1.644 + //Ipo *ipo; 1.645 + boost::shared_ptr<Image> ima WARN; 1.646 + //PluginTex *plugin; 1.647 + //ColorBand *coba; 1.648 + //EnvMap *env; 1.649 + //PreviewImage * preview; 1.650 + //PointDensity *pd; 1.651 + //VoxelData *vd; 1.652 + 1.653 + //char use_nodes; 1.654 +}; 1.655 + 1.656 +// ------------------------------------------------------------------------------- 1.657 +struct MTex : ElemBase { 1.658 + 1.659 + enum Projection { 1.660 + Proj_N = 0 1.661 + ,Proj_X = 1 1.662 + ,Proj_Y = 2 1.663 + ,Proj_Z = 3 1.664 + }; 1.665 + 1.666 + enum Flag { 1.667 + Flag_RGBTOINT = 0x1 1.668 + ,Flag_STENCIL = 0x2 1.669 + ,Flag_NEGATIVE = 0x4 1.670 + ,Flag_ALPHAMIX = 0x8 1.671 + ,Flag_VIEWSPACE = 0x10 1.672 + }; 1.673 + 1.674 + enum BlendType { 1.675 + BlendType_BLEND = 0 1.676 + ,BlendType_MUL = 1 1.677 + ,BlendType_ADD = 2 1.678 + ,BlendType_SUB = 3 1.679 + ,BlendType_DIV = 4 1.680 + ,BlendType_DARK = 5 1.681 + ,BlendType_DIFF = 6 1.682 + ,BlendType_LIGHT = 7 1.683 + ,BlendType_SCREEN = 8 1.684 + ,BlendType_OVERLAY = 9 1.685 + ,BlendType_BLEND_HUE = 10 1.686 + ,BlendType_BLEND_SAT = 11 1.687 + ,BlendType_BLEND_VAL = 12 1.688 + ,BlendType_BLEND_COLOR = 13 1.689 + }; 1.690 + 1.691 + // short texco, mapto, maptoneg; 1.692 + 1.693 + BlendType blendtype; 1.694 + boost::shared_ptr<Object> object; 1.695 + boost::shared_ptr<Tex> tex; 1.696 + char uvname[32]; 1.697 + 1.698 + Projection projx,projy,projz; 1.699 + char mapping; 1.700 + float ofs[3], size[3], rot; 1.701 + 1.702 + int texflag; 1.703 + short colormodel, pmapto, pmaptoneg; 1.704 + //short normapspace, which_output; 1.705 + //char brush_map_mode; 1.706 + float r,g,b,k WARN; 1.707 + //float def_var, rt; 1.708 + 1.709 + //float colfac, varfac; 1.710 + 1.711 + //float norfac, dispfac, warpfac; 1.712 + float colspecfac, mirrfac, alphafac; 1.713 + float difffac, specfac, emitfac, hardfac; 1.714 + //float raymirrfac, translfac, ambfac; 1.715 + //float colemitfac, colreflfac, coltransfac; 1.716 + //float densfac, scatterfac, reflfac; 1.717 + 1.718 + //float timefac, lengthfac, clumpfac; 1.719 + //float kinkfac, roughfac, padensfac; 1.720 + //float lifefac, sizefac, ivelfac, pvelfac; 1.721 + //float shadowfac; 1.722 + //float zenupfac, zendownfac, blendfac; 1.723 +}; 1.724 + 1.725 + 1.726 + } 1.727 +} 1.728 +#endif