summaryrefslogtreecommitdiff
path: root/app/bin/tcornu.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2024-11-14 19:35:45 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2024-11-14 19:35:45 +0100
commitdf5520aa2dae5b3ce7abf8733dcdd152898af163 (patch)
tree00d3047bfb14f682bfb5a21010c731ed649bfed7 /app/bin/tcornu.h
parentdf247efec654e512242e4f4f1b0212034f9e01fe (diff)
parentec3c0f6f6e7153fa797dc57a0e95779cbc63a23b (diff)
Merge branch 'release/debian/1_5.3.0GA-1'debian/1_5.3.0GA-1
Diffstat (limited to 'app/bin/tcornu.h')
-rw-r--r--app/bin/tcornu.h70
1 files changed, 41 insertions, 29 deletions
diff --git a/app/bin/tcornu.h b/app/bin/tcornu.h
index 5684373..cc4ddcf 100644
--- a/app/bin/tcornu.h
+++ b/app/bin/tcornu.h
@@ -16,47 +16,58 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-typedef struct {
- coOrd pos[2];
- coOrd c[2];
- ANGLE_T a[2];
- DIST_T r[2];
- DIST_T minCurveRadius;
- DIST_T maxRateofChange;
- DIST_T length;
- ANGLE_T windingAngle;
- dynArr_t arcSegs;
- coOrd descriptionOff;
- char * cornuPath;
- } cornuData_t;
+#include "common.h"
+
+typedef struct extraDataCornu_t {
+ extraDataBase_t base;
+ coOrd pos[4];
+ coOrd c[2];
+ ANGLE_T a[2];
+ DIST_T r[2];
+ DIST_T minCurveRadius;
+ DIST_T maxRateofChange;
+ DIST_T length;
+ ANGLE_T windingAngle;
+ dynArr_t arcSegs;
+ coOrd descriptionOff;
+ char * cornuPath;
+} extraDataCornu_t;
typedef struct {
- coOrd pos[2]; //All values for end if trk[end] = NULL
- DIST_T radius[2]; //0.0 if straight
- ANGLE_T angle[2]; //Set if straight
- coOrd center[2]; //Set if radius >0
- dynArr_t mids; //If there are G2 points added
- } cornuParm_t;
+ coOrd pos[2]; //All values for end if trk[end] = NULL
+ DIST_T radius[2]; //0.0 if straight
+ ANGLE_T angle[2]; //Set if straight
+ coOrd center[2]; //Set if radius >0
+ dynArr_t mids; //If there are G2 points added
+} cornuParm_t;
double CornuMaxCurve(coOrd[2],ANGLE_T[2],DIST_T[2]);
double BezierMathMinRadius(coOrd[4]);
-coOrd BezierMathFindNearestPoint(coOrd *, coOrd[4] , int );
-track_p NewCornuTrack(coOrd pos[2], coOrd center[2], ANGLE_T angle[2], DIST_T radius[2], trkSeg_t * tempsegs, int count);
-DIST_T CornuDistance( coOrd *, coOrd[2], ANGLE_T[2], DIST_T[2], trkSeg_t * ,int , double * );
-BOOL_T FixUpCornu(coOrd pos[2], track_p [2], EPINX_T ep[2], struct extraData* xx);
-BOOL_T FixUpCornu0(coOrd pos[2], coOrd center[2], ANGLE_T angle[2], DIST_T radius[2], struct extraData* xx);
+coOrd BezierMathFindNearestPoint(coOrd *, coOrd[4], int );
+track_p NewCornuTrack(coOrd pos[2], coOrd center[2], ANGLE_T angle[2],
+ DIST_T radius[2], trkSeg_p tempsegs, int count);
+DIST_T CornuDistance( coOrd *, coOrd[2], ANGLE_T[2], DIST_T[2], trkSeg_p,int,
+ double * );
+BOOL_T FixUpCornu(coOrd pos[4], track_p [2], EPINX_T ep[2],
+ struct extraDataCornu_t* xx);
+BOOL_T FixUpCornu0(coOrd pos[4], coOrd center[2], ANGLE_T angle[2],
+ DIST_T radius[2], struct extraDataCornu_t* xx);
BOOL_T GetCornuSegmentsFromTrack(track_p, trkSeg_p);
-BOOL_T SetCornuEndPt(track_p trk, EPINX_T inx, coOrd pos, coOrd center, ANGLE_T angle, DIST_T radius);
+BOOL_T SetCornuEndPt(track_p trk, EPINX_T inx, coOrd pos, coOrd center,
+ ANGLE_T angle, DIST_T radius);
BOOL_T RebuildCornu (track_p trk);
DIST_T DistanceCornu( track_p t, coOrd * p );
STATUS_T CornuDescriptionMove(track_p trk,wAction_t action,coOrd pos );
-DIST_T CornuDescriptionDistance(coOrd pos,track_p trk, coOrd *, BOOL_T show_hidden, BOOL_T * hidden );
-void GetCornuParmsNear(track_p t, int sel, coOrd * pos, coOrd * center, ANGLE_T * angle, DIST_T * radius );
-void GetCornuParmsTemp(dynArr_t *, int sel, coOrd * pos2, coOrd * center, ANGLE_T * angle2, DIST_T * radius );
+DIST_T CornuDescriptionDistance(coOrd pos,track_p trk, coOrd *,
+ BOOL_T show_hidden, BOOL_T * hidden );
+void GetCornuParmsNear(track_p t, int sel, coOrd * pos, coOrd * center,
+ ANGLE_T * angle, DIST_T * radius );
+void GetCornuParmsTemp(dynArr_t *, int sel, coOrd * pos2, coOrd * center,
+ ANGLE_T * angle2, DIST_T * radius );
BOOL_T CallCornu(coOrd[2],track_p[2],EPINX_T[2],dynArr_t *,cornuParm_t *);
BOOL_T CallCornu0(coOrd[2], coOrd[2], ANGLE_T[2], DIST_T[2], dynArr_t *,BOOL_T);
@@ -65,5 +76,6 @@ BOOL_T GetBezierSegmentsFromCornu(track_p, dynArr_t *, BOOL_T);
char * CreateSegPathList(track_p trk);
+BOOL_T GetCornuMiddle( track_p trk, coOrd * pos);