VR-Forces 4.0.4 Class Documentation
include/geometry/intRecLst.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1999 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: intRecLst.h,v $ $Revision: 1.8 $ $State: Exp $
00007 *********************************************************************/
00008 #ifndef intRecLst_H_
00009 #define intRecLst_H_
00010 
00011 // \file intRecLst.h
00012 // \brief This file contains the DtChordIntersectRecordList class declaration - a wrapper for a DtList of DtChordIntersectionRecords.
00013 #include "geometry/geometryDefines.h"
00014 #include <list>
00015 #include "geometry/chrdIntRec.h"
00016 
00017 class DtChordIntersectionRecord;
00018 
00019 typedef std::list<DtChordIntersectionRecord*> DtChordRecordList;
00020 typedef DtChordRecordList::iterator DtChordRecordListIterator;
00021 typedef DtChordRecordList::const_iterator DtChordRecordListConstIterator;
00022 
00023 //
00024 // DtChordIntersectRecordList represents a list of
00025 // DtChordIntersectRecords. This is useful for following chord recording all
00026 // of its intersections with a section of the terrain.
00027 // Unlike DtList, this class "owns" all of its DtChordIntersectRecords and
00028 // will delete them when it is destroyed.
00029 class DT_DLL_geometry DtChordIntersectRecordList
00030 {
00031 public:
00032    // default constructor
00033    DtChordIntersectRecordList();
00034 
00035    //copy constructor
00036    DtChordIntersectRecordList(const DtChordIntersectRecordList& orig);
00037 
00038    // destructor
00039    virtual ~DtChordIntersectRecordList();
00040 
00041    // assignment operator
00042    DtChordIntersectRecordList& operator=(
00043       const DtChordIntersectRecordList& orig);
00044 
00045    // Insert a DtChordIntersectRecord in the appropriate spot. Assume list
00046    // is sorted in increasing distance from beginning of chord.
00047    virtual void insertAlongChord(const DtChordIntersectionRecord& record);
00048 
00049    // Merge in another DtChordIntersectRecordList; assume both lists
00050    // are sorted in increasing distance from beginning of chord.
00051    virtual void mergeAlongChord(const DtChordIntersectRecordList& otherList);
00052 
00053    // returns the size of our chord list.
00054    int count() const;
00055 
00056    // returns the first in the chord list.
00057    DtChordRecordListIterator first();
00058 
00059    // returns the last in the chord list.
00060    DtChordRecordListIterator last();
00061 
00062    virtual DtChordRecordList& chordList();
00063    virtual const DtChordRecordList& chordList() const;
00064 
00065 protected:
00066 
00067    DtChordRecordList myChordRecordList;
00068 };
00069 
00070 
00071 #endif
00072 

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)