SegmentConnectionHandle.h

Go to the documentation of this file.
00001 
00005 /* Copyright © 2009 James Legg.
00006     This program is free software: you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation, either version 3 of the License, or
00009     (at your option) any later version.
00010 */
00011 
00012 #ifndef LIBTRACK_EDIT_BASE_SEGMENT_CONNECTION_HANDLE_H
00013 #define LIBTRACK_EDIT_BASE_SEGMENT_CONNECTION_HANDLE_H
00014 
00015 #include "ControlPoint.h"
00016 #include "../SegmentConnection.h"
00017 
00018 namespace Track
00019 {
00020 
00021 namespace EditAssist
00022 {
00023 
00024 class SegmentConnectionHandle
00025     :   public ControlPoint
00026 {
00027 public:
00028     /* Create for a specific connection.
00029      * @param track The track this applies to.
00030      * @param vertex_name The name of the vertex the handle is attached to.
00031      * @param  connection_index The index of the Track::SegmentConnection in
00032      * its Track::Segment.
00033      * @param segment_connection A pointer to the segment connection used.
00034      */
00035     SegmentConnectionHandle(const Track & track,
00036                             std::size_t vertex_name,
00037                             std::size_t connection_index,
00038                             const SegmentConnection * segment_connection);
00039     virtual ~SegmentConnectionHandle();
00040     virtual void draw() const ;
00041     virtual void snap(btVector3 & position, btVector3 normal) const;
00042     virtual boost::shared_ptr<Document::DocumentDelta> make_delta(btVector3 position) const;
00043 protected:
00045     const Track & track;
00047     const std::size_t vertex_name;
00049     const std::size_t connection_index;
00051     const SegmentConnection * segment_connection;
00052 };
00053 
00054 } // namespace EditAssist
00055 
00056 } // namespace Track
00057 
00058 #endif // LIBTRACK_EDIT_BASE_SEGMENT_CONNECTION_HANDLE_H

Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

Generated at Mon Sep 6 00:41:11 2010 by Doxygen version 1.4.7 for Racer version svn335.