-
Notifications
You must be signed in to change notification settings - Fork 0
/
AIFOLPTH.HXX
96 lines (77 loc) · 2.22 KB
/
AIFOLPTH.HXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/* ========================================================================
Copyright (c) 1990,1996 Synergistic Software
All Rights Reserved
========================================================================
Filename: aifolpth.hxx
Author: Greg Hightower
======================================================================== */
#ifndef _AIFOLPTH_H
#define _AIFOLPTH_H
/* -----------------------------------------------------------------
additional includes
----------------------------------------------------------------- */
#include <stdio.h>
#if !defined(_TYPEDEFS_H)
#include "typedefs.h"
#endif
#if !defined(_SYSTEM_H)
#include "system.h"
#endif
#if !defined(_AIPATHPT_HXX)
#include "aipathpt.hxx"
#endif
/* -----------------------------------------------------------------
class definition
----------------------------------------------------------------- */
class FOLLOW_PATH_DATA
{
public:
// Write to Scene File
void mfWriteData(FILE * fp);
// Read from Scene File
LONG mfReadData(FILE *fp);
// init member data
void mfInitVals();
// delete the path infomation
void mfDelete ();
// get next path point from path array
BOOL mfGetNextPt(LONG &X, LONG &Y, LONG &Z, LONG &A);
// what is the current point I am looking for
void mfGetCurrentPt(LONG &X, LONG &Y, LONG &Z, LONG &A);
SHORT PathCount; // number of path points. (Each path pt is 4 LONGS)
SHORT PathIndex; // where in the current path you are.
HDL_PATH_PTS hPath; // Handle to path data.
SHORT Wave;
POINT oldP;
};
/* -----------------------------------------------------------------
inline member functions
----------------------------------------------------------------- */
inline void FOLLOW_PATH_DATA::mfInitVals()
{
PathIndex = 0;
Wave = 0;
oldP.x = 0;
oldP.y = 0;
}
inline void FOLLOW_PATH_DATA::mfDelete ()
{
if (hPath != fERROR)
{
DisposBlock(hPath);
hPath = fERROR;
PathCount = 0;
}
}
inline void FOLLOW_PATH_DATA::mfGetCurrentPt(LONG &X, LONG &Y, LONG &Z, LONG &A)
{
if (hPath != fERROR)
{
PTR_PATH_PTS pPathPts = (PTR_PATH_PTS) BLKPTR(hPath);
X = pPathPts[PathIndex].X;
Y = pPathPts[PathIndex].Y;
Z = pPathPts[PathIndex].Z;
A = pPathPts[PathIndex].A;
}
}
#endif