|
virtual const desc_fields & | node_desc_fields () const |
|
virtual void | render (render_action &a_action) |
|
virtual void | pick (pick_action &a_action) |
|
virtual void | bbox (bbox_action &a_action) |
|
virtual void | is_visible (visible_action &a_action) |
|
| vertices () |
|
virtual | ~vertices () |
|
| vertices (const vertices &a_from) |
|
vertices & | operator= (const vertices &a_from) |
|
template<class VEC > |
void | add (const VEC &a_v) |
|
void | add (float a_x, float a_y, float a_z) |
|
void | add_allocated (size_t &a_pos, float a_x, float a_y, float a_z) |
|
bool | add (const std::vector< float > &a_v) |
|
size_t | number () const |
|
void | clear () |
|
bool | add_dashed_line (float a_bx, float a_by, float a_bz, float a_ex, float a_ey, float a_ez, unsigned int a_num_dash) |
|
bool | center () |
|
virtual void * | cast (const std::string &a_class) const |
|
virtual const std::string & | s_cls () const =0 |
|
virtual node * | copy () const =0 |
|
virtual unsigned int | cls_version () const |
|
virtual void | search (search_action &a_action) |
|
virtual void | get_matrix (get_matrix_action &a_action) |
|
virtual bool | write (write_action &a_action) |
|
virtual void | event (event_action &) |
|
virtual bool | read (read_action &a_action) |
|
virtual void | protocol_one_fields (std::vector< field * > &a_fields) const |
|
virtual bool | draw_in_frame_buffer () const |
|
virtual bool | touched () |
|
virtual void | reset_touched () |
|
| node () |
|
virtual | ~node () |
|
void | touch () |
|
field & | field_from_desc (const field_desc &a_desc) const |
|
void | dump_field_descs (std::ostream &a_out) const |
|
field * | find_field_by_name (const std::string &a_name) const |
|
size_t | num_gstos () const |
|
Definition at line 22 of file vertices.
◆ vertices() [1/2]
tools::sg::vertices::vertices |
( |
| ) |
|
|
inline |
Definition at line 119 of file vertices.
123 mem::increment(s_class().c_str());
◆ ~vertices()
virtual tools::sg::vertices::~vertices |
( |
| ) |
|
|
inlinevirtual |
Definition at line 127 of file vertices.
129 mem::decrement(s_class().c_str());
◆ vertices() [2/2]
tools::sg::vertices::vertices |
( |
const vertices & |
a_from | ) |
|
|
inline |
Definition at line 133 of file vertices.
135 ,parent_gstos(a_from)
140 mem::increment(s_class().c_str());
◆ _is_visible()
bool tools::sg::vertices::_is_visible |
( |
const matrix_action & |
a_action | ) |
|
|
inlineprotected |
Definition at line 240 of file vertices.
242 const state& _state = a_action.state();
243 pick_action action(a_action.out(),_state.m_ww,_state.m_wh,0,
float(_state.m_ww),0,
float(_state.m_wh));
244 action.set_win_size(_state.m_ww,_state.m_wh);
245 action.set_area(0,
float(_state.m_ww),0,
float(_state.m_wh));
246 action.set_stop_at_first(
true);
247 action.matrix_action::operator=(a_action);
248 int old_cur = action.cur();
250 if(action.cur()!=old_cur)
return false;
251 if(!action.node())
return false;
◆ add() [1/3]
bool tools::sg::vertices::add |
( |
const std::vector< float > & |
a_v | ) |
|
|
inline |
Definition at line 172 of file vertices.
173 std::vector<float>::size_type _number = a_v.size()/3;
174 if(3*_number!=a_v.size())
return false;
175 std::vector<float>::const_iterator it;
176 for(it=a_v.begin();it!=a_v.end();it+=3) {
◆ add() [2/3]
template<class VEC >
void tools::sg::vertices::add |
( |
const VEC & |
a_v | ) |
|
|
inline |
◆ add() [3/3]
void tools::sg::vertices::add |
( |
float |
a_x, |
|
|
float |
a_y, |
|
|
float |
a_z |
|
) |
| |
|
inline |
◆ add_allocated()
void tools::sg::vertices::add_allocated |
( |
size_t & |
a_pos, |
|
|
float |
a_x, |
|
|
float |
a_y, |
|
|
float |
a_z |
|
) |
| |
|
inline |
Definition at line 165 of file vertices.
167 v[a_pos] = a_x;a_pos++;
168 v[a_pos] = a_y;a_pos++;
169 v[a_pos] = a_z;a_pos++;
◆ add_dashed_line()
bool tools::sg::vertices::add_dashed_line |
( |
float |
a_bx, |
|
|
float |
a_by, |
|
|
float |
a_bz, |
|
|
float |
a_ex, |
|
|
float |
a_ey, |
|
|
float |
a_ez, |
|
|
unsigned int |
a_num_dash |
|
) |
| |
|
inline |
Definition at line 187 of file vertices.
191 if(!a_num_dash)
return false;
194 float fac = 1.0f/float(2*a_num_dash-1);
195 float sx = (a_ex-a_bx)*fac;
196 float sy = (a_ey-a_by)*fac;
197 float sz = (a_ez-a_bz)*fac;
199 float two_sx = sx*2.0f;
200 float two_sy = sy*2.0f;
201 float two_sz = sz*2.0f;
207 for(
unsigned int idash=0;idash<a_num_dash;idash++) {
209 add(px+sx,py+sy,pz+sz);
◆ bbox()
virtual void tools::sg::vertices::bbox |
( |
bbox_action & |
a_action | ) |
|
|
inlinevirtual |
◆ center()
bool tools::sg::vertices::center |
( |
| ) |
|
|
inline |
Definition at line 216 of file vertices.
218 std::vector<float>::size_type _number = v.size()/3;
219 if(!_number)
return true;
220 if(3*_number!=v.size())
return false;
224 {
for(std::vector<float>::const_iterator it=v.begin();it!=v.end();it+=3) {
229 x_mean /= float(_number);
230 y_mean /= float(_number);
231 z_mean /= float(_number);
232 {
for(std::vector<float>::iterator it=v.begin();it!=v.end();it+=3) {
◆ clear()
void tools::sg::vertices::clear |
( |
| ) |
|
|
inline |
◆ create_gsto()
virtual unsigned int tools::sg::vertices::create_gsto |
( |
std::ostream & |
, |
|
|
sg::render_manager & |
a_mgr |
|
) |
| |
|
inlineprotectedvirtual |
◆ is_visible()
virtual void tools::sg::vertices::is_visible |
( |
visible_action & |
a_action | ) |
|
|
inlinevirtual |
◆ node_desc_fields()
virtual const desc_fields& tools::sg::vertices::node_desc_fields |
( |
| ) |
const |
|
inlinevirtual |
◆ number()
size_t tools::sg::vertices::number |
( |
| ) |
const |
|
inline |
◆ operator=()
Definition at line 144 of file vertices.
145 parent::operator=(a_from);
◆ pick()
virtual void tools::sg::vertices::pick |
( |
pick_action & |
a_action | ) |
|
|
inlinevirtual |
◆ render()
virtual void tools::sg::vertices::render |
( |
render_action & |
a_action | ) |
|
|
inlinevirtual |
_id
Reimplemented from tools::sg::node.
Reimplemented in tools::sg::atb_vertices.
Definition at line 50 of file vertices.
54 const state& state = a_action.state();
56 if(state.m_use_gsto) {
57 unsigned int _id =
get_gsto_id(a_action.out(),a_action.render_manager());
60 bool restore_blend = check_set_blend(a_action);
62 a_action.begin_gsto(_id);
67 a_action.set_lighting(
false);
68 a_action.draw_gsto_v(
mode.
value(),npt,pos);
69 a_action.set_lighting(state.m_GL_LIGHTING);
71 a_action.draw_gsto_v(
mode.
value(),npt,pos);
75 if(restore_blend) a_action.set_blend(
true);
87 bool restore_blend = check_set_blend(a_action);
93 a_action.set_lighting(
false);
95 a_action.set_lighting(state.m_GL_LIGHTING);
101 if(restore_blend) a_action.set_blend(
true);
◆ mode
◆ xyzs
mf<float> tools::sg::vertices::xyzs |
The documentation for this class was generated from the following file:
- /Users/barrand/private/dev/softinex/g4tools/g4tools/tools/sg/vertices