From d7d3f53442cb3e413f81cb5a60d8e52ef4dad78c Mon Sep 17 00:00:00 2001 From: Ralf Gerlich Date: Thu, 8 Nov 2007 22:31:29 +0100 Subject: [PATCH] Optimised access to point lists for triangle segments and triangle nodes. --- src/Lib/Geometry/trinodes.hxx | 5 +++-- src/Lib/Geometry/trisegs.hxx | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Lib/Geometry/trinodes.hxx b/src/Lib/Geometry/trinodes.hxx index 26b3385b..75927eb4 100644 --- a/src/Lib/Geometry/trinodes.hxx +++ b/src/Lib/Geometry/trinodes.hxx @@ -18,7 +18,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// $Id: trinodes.hxx,v 1.7 2004-11-19 22:25:50 curt Exp $ +// $Id: trinodes.hxx,v 1.7 2004/11/19 22:25:50 curt Exp $ #ifndef _TRINODES_HXX @@ -88,7 +88,8 @@ public: int find( const Point3D& p ) const; // return the master node list - inline point_list get_node_list() const { return node_list; } + inline point_list& get_node_list() { return node_list; } + inline const point_list& get_node_list() const { return node_list; } inline void set_node_list( point_list pl ) { node_list = pl; } // return the ith point diff --git a/src/Lib/Geometry/trisegs.hxx b/src/Lib/Geometry/trisegs.hxx index 6569e9d2..6110832d 100644 --- a/src/Lib/Geometry/trisegs.hxx +++ b/src/Lib/Geometry/trisegs.hxx @@ -18,7 +18,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// $Id: trisegs.hxx,v 1.4 2004-11-19 22:25:50 curt Exp $ +// $Id: trisegs.hxx,v 1.4 2004/11/19 22:25:50 curt Exp $ #ifndef _TRISEGS_HXX @@ -111,10 +111,12 @@ public: const TGTriSeg& s ); // return the master segment list - inline triseg_list get_seg_list() const { return seg_list; } + inline triseg_list& get_seg_list() { return seg_list; } + inline const triseg_list& get_seg_list() const { return seg_list; } // return the ith segment - inline TGTriSeg get_seg( int i ) const { return seg_list[i]; } + inline TGTriSeg& get_seg( int i ) { return seg_list[i]; } + inline const TGTriSeg& get_seg( int i ) const { return seg_list[i]; } };