|
virtual void | visit (gstos_add &a_visitor, draw_type a_style) |
|
void | _faces (float front[], float back[], float right[], float left[], float top[], float bottom[]) |
|
void | _tris (float tris[], float nms[]) |
|
void | _lines (float lines[]) |
|
void | _points (float points[]) |
|
template<class T > |
void | visit (T &a_visitor, draw_type a_style) |
|
| node (const node &) |
|
node & | operator= (const node &) |
|
void | add_field (field *a_field) |
|
bool | write_fields (write_action &a_action) |
|
bool | read_fields (read_action &a_action) |
|
field_desc::offset_t | field_offset (const field *a_field) const |
|
field * | find_field (const field_desc &a_rdesc) const |
|
void | check_fields (std::ostream &a_out) const |
|
virtual unsigned int | create_gsto (std::ostream &, sg::render_manager &a_mgr) |
|
| gstos () |
|
virtual | ~gstos () |
|
| gstos (const gstos &) |
|
gstos & | operator= (const gstos &a_from) |
|
unsigned int | get_tex_id (std::ostream &a_out, render_manager &a_mgr, const img_byte &a_img, bool a_NEAREST) |
|
unsigned int | get_gsto_id (std::ostream &a_out, render_manager &a_mgr) |
|
void | clean_gstos () |
|
void | clean_gstos (render_manager *a_mgr) |
|
unsigned int | _find (render_manager *a_mgr) |
|
Definition at line 17 of file cube.
◆ cube() [1/2]
tools::sg::cube::cube |
( |
| ) |
|
|
inline |
Definition at line 85 of file cube.
◆ ~cube()
virtual tools::sg::cube::~cube |
( |
| ) |
|
|
inlinevirtual |
Definition at line 94 of file cube.
◆ cube() [2/2]
tools::sg::cube::cube |
( |
const cube & |
a_from | ) |
|
|
inline |
Definition at line 96 of file cube.
◆ _faces()
void tools::sg::cube::_faces |
( |
float |
front[], |
|
|
float |
back[], |
|
|
float |
right[], |
|
|
float |
left[], |
|
|
float |
top[], |
|
|
float |
bottom[] |
|
) |
| |
|
inlineprotected |
Definition at line 116 of file cube.
124 front[0] = wh;front[ 1] = -hh;front[ 2] = dh;
125 front[3] = wh;front[ 4] = hh;front[ 5] = dh;
126 front[6] = -wh;front[ 7] = hh;front[ 8] = dh;
127 front[9] = -wh;front[10] = -hh;front[11] = dh;
129 back[0] = wh;back[ 1] = -hh;back[ 2] = -dh;
130 back[3] = -wh;back[ 4] = -hh;back[ 5] = -dh;
131 back[6] = -wh;back[ 7] = hh;back[ 8] = -dh;
132 back[9] = wh;back[10] = hh;back[11] = -dh;
◆ _lines()
void tools::sg::cube::_lines |
( |
float |
lines[] | ) |
|
|
inlineprotected |
Definition at line 468 of file cube.
493 lines[10] = front[7];
494 lines[11] = front[8];
496 lines[12] = front[6];
497 lines[13] = front[7];
498 lines[14] = front[8];
499 lines[15] = front[9];
500 lines[16] = front[10];
501 lines[17] = front[11];
503 lines[18] = front[9];
504 lines[19] = front[10];
505 lines[20] = front[11];
506 lines[21] = front[0];
507 lines[22] = front[1];
508 lines[23] = front[2];
528 lines[40] = back[10];
529 lines[41] = back[11];
532 lines[43] = back[10];
533 lines[44] = back[11];
◆ _points()
void tools::sg::cube::_points |
( |
float |
points[] | ) |
|
|
inlineprotected |
Definition at line 651 of file cube.
◆ _tris()
void tools::sg::cube::_tris |
( |
float |
tris[], |
|
|
float |
nms[] |
|
) |
| |
|
inlineprotected |
Definition at line 155 of file cube.
183 tris[13] = front[10];
184 tris[14] = front[11];
233 tris[49] =
right[10];
234 tris[50] =
right[11];
◆ bbox()
virtual void tools::sg::cube::bbox |
( |
bbox_action & |
a_action | ) |
|
|
inlinevirtual |
Reimplemented from tools::sg::node.
Definition at line 80 of file cube.
81 const state& state = a_action.state();
82 visit(a_action,state.m_draw_type);
◆ node_desc_fields()
virtual const desc_fields& tools::sg::cube::node_desc_fields |
( |
| ) |
const |
|
inlinevirtual |
Reimplemented from tools::sg::node.
Definition at line 24 of file cube.
26 static const desc_fields s_v(parent::node_desc_fields(),3,
◆ operator=()
cube& tools::sg::cube::operator= |
( |
const cube & |
a_from | ) |
|
|
inline |
Definition at line 105 of file cube.
109 width = a_from.width;
111 depth = a_from.depth;
◆ pick()
virtual void tools::sg::cube::pick |
( |
pick_action & |
a_action | ) |
|
|
inlinevirtual |
Reimplemented from tools::sg::node.
Definition at line 64 of file cube.
65 const state& state = a_action.state();
66 if(a_action.stop_at_first()){
67 visit(a_action,state.m_draw_type);
68 if(a_action.done()) a_action.set_node(
this);
70 a_action.set_done(
false);
71 a_action.zs().clear();
72 a_action.ws().clear();
73 visit(a_action,state.m_draw_type);
75 a_action.add_pick(*
this,a_action.zs(),a_action.ws(),a_action.state());
76 a_action.set_done(
false);
◆ render()
Reimplemented from tools::sg::node.
Definition at line 44 of file cube.
47 const state& state = a_action.state();
48 bool draw_edges =
false;
49 if(state.m_draw_type==
draw_filled) draw_edges = state.m_GL_LIGHTING?
false:
true;
52 a_action.color4f(0,0,0,1);
53 a_action.line_width(1);
55 a_action.set_polygon_offset(
true);
56 a_action.color4f(state.m_color);
57 a_action.line_width(state.m_line_width);
60 visit(a_action,state.m_draw_type);
61 if(draw_edges) a_action.set_polygon_offset(state.m_GL_POLYGON_OFFSET_FILL);
◆ visit() [1/2]
◆ visit() [2/2]
template<class T >
void tools::sg::cube::visit |
( |
T & |
a_visitor, |
|
|
draw_type |
a_style |
|
) |
| |
|
inlineprotected |
Definition at line 668 of file cube.
672 a_visitor.add_points(24,
points);
677 a_visitor.add_lines(144,
lines);
680 float tris[108];
float nms[108];
682 a_visitor.add_triangles_normal(108,tris,nms);
◆ depth
sf<float> tools::sg::cube::depth |
Definition at line 22 of file cube.
◆ height
sf<float> tools::sg::cube::height |
Definition at line 21 of file cube.
◆ width
sf<float> tools::sg::cube::width |
Definition at line 20 of file cube.
The documentation for this class was generated from the following file:
- /Users/barrand/private/dev/softinex/g4tools/g4tools/tools/sg/cube