My Project: openb3dlib.mod/openb3d/src/brush.h Source File

My Project

brush.h
Go to the documentation of this file.
1 #ifndef BRUSH_H
2 #define BRUSH_H
3
4 /*
5 * brush.h
6 * iminib3d
7 *
8 * Created by Simon Harrison.
9 * Copyright Si Design. All rights reserved.
10 *
11 */
12
13
14 #include "texture.h"
15
16 #include <string>
17 #include <iostream>
18
19 using namespace std;
20
21 class Brush{
22
23 public:
24
25 int no_texs;
26 string name;
27 float red,green,blue,alpha;
28 float shine;
29 int blend,fx;
30 unsigned int cache_frame[8];
31 Texture* tex[8];
32
33 int glBlendFunc[2];//
34
35 Brush(){
36
37 no_texs=0;
38 name="";
39
40 red=1.0,green=1.0,blue=1.0,alpha=1.0,shine=0.0;
41 blend=0,fx=0;
42 //tex_frame=0;
43
44 for(int i=0;i<8;i++){
45 tex[i]=NULL;
46 }
47
48 };
49
50 Brush* Copy();
51 void FreeBrush();
52 static Brush* CreateBrush(float r=255.0,float g=255.0,float b=255.0);
53 static Brush* LoadBrush(string file,int flags=1,float u_scale=1.0,float v_scale=1.0);
54 void BrushColor(float r,float g,float b);
55 void BrushAlpha(float a);
56 void BrushShininess(float s);
57 void BrushTexture(Texture* texture,int frame=0,int index=0);
58 void BrushBlend(int blend_no);
59 void BrushFX(int fx_no);
60 //static Brush* GetEntityBrush(Entity* ent); // moved to entity.mm to avoid dependency isssues
61 //static Brush* GetSurfaceBrush(Surface* surf); // move to surface.mm to avoid dependency isssues
62 Texture* GetBrushTexture(int index=0);
63 static int CompareBrushes(Brush* brush1,Brush* brush2);
64
65 };
66
67 #endif
Brush::fx
int fx
Definition: brush.h:29
CreateBrush
Brush * CreateBrush(float r, float g, float b)
Definition: functions.cpp:464
Brush::Brush
Brush()
Definition: brush.h:35
Brush::no_texs
int no_texs
Definition: brush.h:25
BrushShininess
void BrushShininess(Brush *brush, float s)
Definition: functions.cpp:211
BrushFX
void BrushFX(Brush *brush, int fx)
Definition: functions.cpp:204
std
Brush::shine
float shine
Definition: brush.h:28
texture.h
Brush::name
string name
Definition: brush.h:26
LoadBrush
Brush * LoadBrush(char *file, int flags, float u_scale, float v_scale)
Definition: functions.cpp:1041
Brush::red
float red
Definition: brush.h:27
CompareBrushes
int CompareBrushes(Brush *brush1, Brush *brush2)
Definition: methods.cpp:41
Texture
Definition: texture.h:23
BrushColor
void BrushColor(Brush *brush, float r, float g, float b)
Definition: functions.cpp:197
BrushBlend
void BrushBlend(Brush *brush, int blend)
Definition: functions.cpp:190
FreeBrush
void FreeBrush(Brush *brush)
Definition: functions.cpp:871
GetBrushTexture
Texture * GetBrushTexture(Brush *brush, int index)
Definition: functions.cpp:910
Brush
Definition: brush.h:21
BrushTexture
void BrushTexture(Brush *brush, Texture *tex, int frame, int index)
Definition: functions.cpp:218
load3ds::texture
Texture * texture
Definition: 3ds.cpp:50
NULL
#define NULL
Definition: tree.cpp:4
BrushAlpha
void BrushAlpha(Brush *brush, float a)
Definition: functions.cpp:183