|
static void | dump (std::ostream &a_out, const std::string &a_cmt, const img_byte &a_img) |
|
static void | dump_not_null (std::ostream &a_out, const std::string &a_cmt, const img_byte &a_img) |
|
Definition at line 19 of file base_tex.
◆ intersect_type
Enumerator |
---|
intersect_down | |
intersect_move | |
intersect_up | |
Definition at line 34 of file base_tex.
◆ base_tex() [1/2]
tools::sg::base_tex::base_tex |
( |
| ) |
|
|
inline |
◆ ~base_tex()
virtual tools::sg::base_tex::~base_tex |
( |
| ) |
|
|
inlinevirtual |
◆ base_tex() [2/2]
tools::sg::base_tex::base_tex |
( |
const base_tex & |
a_from | ) |
|
|
inline |
◆ _update_sg_()
void tools::sg::base_tex::_update_sg_ |
( |
std::ostream & |
a_out | ) |
|
|
inlineprotected |
Definition at line 69 of file base_tex.
83 unsigned int bpp = _img.bpp();
84 if((bpp!=1)&&(bpp!=3)&&(bpp!=4)) {
85 a_out <<
"tools::sg::tex_rect::update_sg :"
86 <<
" bpp " << bpp <<
" not handled."
102 pixel[0] = bc.ruchar();
103 pixel[1] = bc.guchar();
104 pixel[2] = bc.buchar();
105 pixel[3] = bc.auchar();
116 if(!_img.rgb2rgba(img4,255)){
117 a_out <<
"tools::sg::tex_rect::update_sg :"
118 <<
" rgb2rgba failed."
125 a_out <<
"tools::sg::tex_rect::update_sg :"
126 <<
" problem with inlib::tex_rect::to_texture."
134 a_out <<
"tools::sg::tex_rect::update_sg :"
135 <<
" problem with inlib::tex_rect::to_texture."
148 unsigned int fac = 2;
150 unsigned int pw = tw/fac;
151 unsigned int ph = th/fac;
153 unsigned int sx = (tw-pw)/2;
154 unsigned int sy = (th-ph)/2;
◆ cast()
virtual void* tools::sg::base_tex::cast |
( |
const std::string & |
a_class | ) |
const |
|
inlinevirtual |
◆ dump()
static void tools::sg::base_tex::dump |
( |
std::ostream & |
a_out, |
|
|
const std::string & |
a_cmt, |
|
|
const img_byte & |
a_img |
|
) |
| |
|
inlinestaticprotected |
Definition at line 173 of file base_tex.
174 if(a_cmt.size()) a_out << a_cmt << std::endl;
175 a_out <<
" width " << a_img.width()
176 <<
" height " << a_img.height()
177 <<
" bpp " << a_img.bpp()
◆ dump_not_null()
static void tools::sg::base_tex::dump_not_null |
( |
std::ostream & |
a_out, |
|
|
const std::string & |
a_cmt, |
|
|
const img_byte & |
a_img |
|
) |
| |
|
inlinestaticprotected |
Definition at line 181 of file base_tex.
182 if(a_cmt.size()) a_out << a_cmt << std::endl;
183 unsigned int w = a_img.width();
184 unsigned int h = a_img.height();
185 unsigned int n = a_img.bpp();
186 a_out <<
"img_byte : width " << w <<
" height " << h <<
" bpp " << n << std::endl;
187 byte* pos = (
byte*)a_img.buffer();
190 for(
unsigned int j=0;j<h;j++) {
191 for(
unsigned int i=0;i<w;i++) {
196 a_out <<
" " << i <<
" " << j
197 <<
" : " << (
unsigned int)r <<
" " << (
unsigned int)g <<
" " << (
unsigned int)b
◆ intersect_value()
virtual bool tools::sg::base_tex::intersect_value |
( |
std::ostream & |
, |
|
|
intersect_type |
a_type, |
|
|
const line< vec3f > & |
a_line, |
|
|
std::string & |
a_s |
|
) |
| const |
|
pure virtual |
◆ operator=()
◆ set_tcs()
void tools::sg::base_tex::set_tcs |
( |
float |
a_tcs[8] | ) |
|
|
inlineprotected |
Definition at line 204 of file base_tex.
207 a_tcs[0] = 0;a_tcs[1] = 0;
208 a_tcs[2] = 1;a_tcs[3] = 0;
209 a_tcs[4] = 1;a_tcs[5] = 1;
210 a_tcs[6] = 0;a_tcs[7] = 1;
216 {
unsigned int iw = _img.
width();
217 unsigned int ih = _img.height();
221 float part = float(iw)/float(rw);
226 float part = float(ih)/float(rh);
231 {
unsigned int num = 12/3;
232 for(
unsigned int index=0;index<num;index++) {
233 a_tcs[2*index] = ax*a_tcs[2*index] +bx;
234 a_tcs[2*index+1] = ay*a_tcs[2*index+1]+by;
◆ back_color
◆ expand
sf<bool> tools::sg::base_tex::expand |
◆ img
◆ limit
sf<unsigned int> tools::sg::base_tex::limit |
◆ m_img
◆ nearest
sf<bool> tools::sg::base_tex::nearest |
The documentation for this class was generated from the following file:
- /Users/barrand/private/dev/softinex/g4tools/g4tools/tools/sg/base_tex