Changeset 297
- Timestamp:
- 07/31/14 08:34:41 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nv/interface/mesh_data.hh
r295 r297 235 235 if ( i >= m_count ) return nullptr; 236 236 return &m_nodes[i]; 237 } 238 239 const mesh_node_data* get_node( const std::string& name ) const 240 { 241 for ( uint32 i = 0; i < m_count; ++i ) 242 { 243 if ( m_nodes[ i ].name == name ) 244 return &m_nodes[ i ]; 245 } 246 return nullptr; 247 } 248 249 int get_node_index( const std::string& name ) const 250 { 251 for ( uint32 i = 0; i < m_count; ++i ) 252 { 253 if ( m_nodes[ i ].name == name ) 254 return (int)i; 255 } 256 return -1; 237 257 } 238 258 … … 281 301 return &m_meshes[ index ]; 282 302 } 303 const mesh_data* get_mesh( const std::string& name ) const 304 { 305 for ( uint32 i = 0; i < m_count; ++i ) 306 { 307 if ( m_meshes[ i ].get_name() == name ) 308 return &m_meshes[ i ]; 309 } 310 return nullptr; 311 } 283 312 uint32 get_count() const { return m_count; } 284 313 const mesh_nodes_data* get_nodes() const { return m_nodes; }
Note: See TracChangeset
for help on using the changeset viewer.