Changeset 188 for trunk/src/mesh/node.cc
- Timestamp:
- Feb 17, 2006 8:30:27 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mesh/node.cc
r187 r188 4 4 // assign value to coordinate[index] 5 5 // 6 RP_ERROR RpNode::set(int val, int index) 6 RP_ERROR 7 RpNode::set(int val, int index) 7 8 { 8 9 RP_ERROR err = RP_SUCCESS; … … 10 11 if (index < m_dim) 11 12 m_node[index] = val; 13 else { 14 RpAppendErr("RpNode::set: index out of bound"); 15 RpPrintErr(); 16 err = RP_ERR_OUTOFBOUND_INDEX; 17 } 18 19 return err; 20 } 21 22 void 23 RpNode::setNode2d(int xval, int yval, const char* id) 24 { 25 m_node.resize(2); 26 27 m_dim = 2; 28 m_node[0] = xval; 29 m_node[1] = yval; 30 m_id = id; 31 } 32 33 void 34 RpNode::setNode3d(int xval, int yval, int zval, const char* id) 35 { 36 m_node.resize(3); 37 38 m_dim = 3; 39 m_node[0] = xval; 40 m_node[1] = yval; 41 m_node[2] = zval; 42 m_id = id; 43 } 44 45 RP_ERROR 46 RpNode::get(int& val, int index) 47 { 48 RP_ERROR err = RP_SUCCESS; 49 50 if (index < m_dim) 51 val = m_node[index]; 12 52 else { 13 53 RpAppendErr("RpNode::set: index out of bound");
Note: See TracChangeset
for help on using the changeset viewer.