X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fmaterial.h;h=a1244d4bd46f844bc0d8434a83af804f4936925e;hb=2f5ee2007d258d947f2efab3bf3460479fe34813;hp=979bbd953dc802e7d06076cc6e02fcdea8d2b5c6;hpb=8137121400748ee8afb1608253aae15323c5e3a2;p=laserbrain_demo diff --git a/src/material.h b/src/material.h index 979bbd9..a1244d4 100644 --- a/src/material.h +++ b/src/material.h @@ -16,6 +16,17 @@ enum { MTL_TEX_UNKNOWN }; +enum { + MTL_MIRROR_NONE, + MTL_MIRROR_AUTO, // determine mirror plane automatically + MTL_MIRROR_AABB_PX, // plane = AABB +X side + MTL_MIRROR_AABB_NX, // plane = AABB -X side + MTL_MIRROR_AABB_PY, // plane = AABB +Y side + MTL_MIRROR_AABB_NY, // plane = AABB -Y side + MTL_MIRROR_AABB_PZ, // plane = AABB +Z side + MTL_MIRROR_AABB_NZ // plane = AABB -Z side +}; + #define NUM_MTL_TEXTURES MTL_TEX_UNKNOWN class Material { @@ -25,6 +36,9 @@ public: float shininess; float alpha; + float reflect; + int flat_mirror; // see MTL_MIRROR_* enumerations above + Texture *stdtex[NUM_MTL_TEXTURES]; std::vector textures; @@ -32,6 +46,12 @@ public: void setup() const; void add_texture(Texture *tex, int type = MTL_TEX_UNKNOWN); + void remove_texture(Texture *tex); }; +// returns MTL_TEX_whatever by name +int mtl_parse_type(const char *str); +// returns the name of a material type +const char *mtl_type_string(int type); + #endif // MATERIAL_H_