Contains the function pointers for the MAT300 API. More...
#include <MAT300API.h>
Public Attributes | |
| unsigned(* | GetInputPointCount )() |
| Retrieves the number of points that the user has entered. | |
| IntPoint *(* | GetInputPoints )() |
| Retrieves the current list if points. | |
| bool(* | IsPointMoving )() |
| Query the MAT300 framework to determine if the user is moving a point. | |
| int(* | GetMovingPointIndex )() |
| Query the MAT300 framework to determine the index of a moving point. | |
| void(* | SetMaxPoints )(unsigned Max) |
| Sets a limit on the number of points which may be entered by the user. | |
| unsigned(* | GetMaxPoints )() |
| Retrieves the currently set maximum number of points the MAT300 framework will accept. | |
| unsigned(* | GetNumberCalcPoints )() |
| Retrieves current value of Calculated Points slider. | |
| unsigned(* | GetNumDisplayedShell )() |
| Retrieves the current value of the Displayed Shell slider. | |
| unsigned(* | GetNumNestingLevels )() |
| Retrieves the current value of the Nesting Levels slider. | |
| unsigned(* | GetNumDegree )() |
| Retrieves the current value of the Degree slider. | |
| bool(* | GetDisplayShells )() |
| Retrieves the current value of the Display Shells checkbox. | |
| bool(* | GetUseEndpointContinuity )() |
| Retrieves the current value of the Endpoint Continuity checkbox. | |
| int(* | GetKnotSequenceCount )() |
| Retrieves the number of values in the knot sequence text box. | |
| int *(* | GetKnotSequence )() |
| Retrieves the knot sequence corresponding to the current values for the BSpline algorithm. | |
| void(* | SetMaxCalcPoints )(int Max) |
| Sets the maximum value on the Calculated Points slider. | |
| void(* | SetCurNestingLevels )(int Current) |
| Sets the recursion level slider current value. | |
| void(* | SetLineColor )(unsigned char Red, unsigned char Green, unsigned char Blue) |
| Sets the line (border) color for subsequently drawn objects. | |
| void(* | SetFillColor )(unsigned char Red, unsigned char Green, unsigned char Blue) |
| Sets the fill (interior) color for subsequently drawn objects. | |
| void(* | SetBackgroundColor )(unsigned char Red, unsigned char Green, unsigned char Blue) |
| Sets the background color for the canvas where drawing occurs. | |
| void(* | GetBackgroundColor )(unsigned char *Red, unsigned char *Green, unsigned char *Blue) |
| Retrieves the currently specified background color for the canvas. | |
| void(* | DrawPoint )(int X, int Y) |
| Draws a point at the specified coordinates. | |
| void(* | DrawLine )(int X1, int Y1, int X2, int Y2) |
| Draws a line between 2 points. | |
| void(* | DrawLines )(IntPoint *Points, unsigned Count) |
| Draws a polyline. | |
| void(* | SetWindowTitle )(const char *Title) |
| Sets the window title for the main form. | |
| void(* | SetUserPointDrawRadius )(unsigned radius) |
| Sets the radius of any points subsequently drawn by the user. | |
| void(* | SetInputPointDrawRadius )(unsigned radius) |
| Sets the radius of any subsequently drawn input points. | |
| void(* | SetInputPointPickRadius )(unsigned radius) |
| Sets the pick radius of input points. | |
| void(* | SetInputPointFillColor )(unsigned char Red, unsigned char Green, unsigned char Blue) |
| Sets the color which will be used to fill input points. | |
| void(* | SetInputPointOutlineColor )(unsigned char Red, unsigned char Green, unsigned char Blue) |
| Sets the color which will be used to outline input points. | |
| void(* | SetInputLineColor )(unsigned char Red, unsigned char Green, unsigned char Blue) |
| Sets the color which will be used to draw the input poly line (if displayed). | |
| void(* | DrawText )(char *Text, int XPos, int YPos) |
| Draws text at a specified position. | |
| void(* | DebugMessage )(char *format,...) |
| Sends a formatted string to the Debug window. | |
Contains the function pointers for the MAT300 API.
This structure is passed to the user dll upon initialization and should be copied so that the dll can access the MAT300 API. These functions make up the MAT300 API and will allow a student to access the framework supporting the MAT300 project assignments. They provide functions to set/get various GUI elements, retrieve user input, and draw on the framework managed canvas. Note that the canvas uses the standard Windows coordinate system with the origin at the top-left and the y-axis extending down.
| void(* MAT300API::DebugMessage)(char *format,...) |
Sends a formatted string to the Debug window.
This function accepts a variable argument list, using the same structure as a printf, i.e., DebugMessage("Some integer value is: %i", MyInt)
| void(* MAT300API::DrawLine)(int X1, int Y1, int X2, int Y2) |
Draws a line between 2 points.
| X1 | The x coordinate of the starting point | |
| Y1 | The y coordinate of the starting point | |
| X2 | The x coordinate of the ending point | |
| Y2 | The y coordinate of the ending point |
| void(* MAT300API::DrawLines)(IntPoint *Points, unsigned Count) |
Draws a polyline.
Draws a series of connected lines. The first line starts at the first point specified, and continues to the 2nd point specified. The second line starts at the 2nd point and continues to the 3rd point, etc.
| Points | A pointer to an array of IntPoint structures | |
| Count | The number of points in the array |
| void(* MAT300API::DrawPoint)(int X, int Y) |
Draws a point at the specified coordinates.
| X | The x coordinate of the point | |
| Y | The y coordinate of the point (origin is top left) |
| void(* MAT300API::DrawText)(char *Text, int XPos, int YPos) |
Draws text at a specified position.
The text will not be wrapped.
| Text | A c-string containing the text to be drawn | |
| XPos | The x coordinate where the text should start drawing | |
| YPos | the y coordinate where the tex should start drawing |
| void(* MAT300API::GetBackgroundColor)(unsigned char *Red, unsigned char *Green, unsigned char *Blue) |
Retrieves the currently specified background color for the canvas.
| Red | A pointer to the byte where the quantity of red will be returned | |
| Green | A pointer to the byte where the quantity of green will be returned | |
| Blue | A pointer to the byte where the quantity of blue will be returned |
| bool(* MAT300API::GetDisplayShells)() |
Retrieves the current value of the Display Shells checkbox.
| unsigned(* MAT300API::GetInputPointCount)() |
Retrieves the number of points that the user has entered.
Retrieves the current list if points.
| int*(* MAT300API::GetKnotSequence)() |
Retrieves the knot sequence corresponding to the current values for the BSpline algorithm.
Note that the MAT300 framework will calculate a valid knot sequence based on all the other inputs. Use the GetKnotSequenceCount() function to determine the number of elements in the array.
| int(* MAT300API::GetKnotSequenceCount)() |
Retrieves the number of values in the knot sequence text box.
| unsigned(* MAT300API::GetMaxPoints)() |
Retrieves the currently set maximum number of points the MAT300 framework will accept.
| int(* MAT300API::GetMovingPointIndex)() |
Query the MAT300 framework to determine the index of a moving point.
| unsigned(* MAT300API::GetNumberCalcPoints)() |
Retrieves current value of Calculated Points slider.
This value is a raw number set by a GUI control. You must determine how best to use it; it could indicate the total number of points calculated by the algorithm, the number of points calculated between input points, or simply provide one input to a weighted calculation which determines the total number of points.
| unsigned(* MAT300API::GetNumDegree)() |
Retrieves the current value of the Degree slider.
This value is a raw number set by a GUI control.
| unsigned(* MAT300API::GetNumDisplayedShell)() |
Retrieves the current value of the Displayed Shell slider.
This value is a raw number set by a GUI control. It will vary between 1 and the maximum number of calculated points.
| unsigned(* MAT300API::GetNumNestingLevels)() |
Retrieves the current value of the Nesting Levels slider.
This value is a raw number set by a GUI control. Use it to determine the number of levels of recursion used for a recursive algorithm.
| bool(* MAT300API::GetUseEndpointContinuity)() |
Retrieves the current value of the Endpoint Continuity checkbox.
| bool(* MAT300API::IsPointMoving)() |
Query the MAT300 framework to determine if the user is moving a point.
| void(* MAT300API::SetBackgroundColor)(unsigned char Red, unsigned char Green, unsigned char Blue) |
Sets the background color for the canvas where drawing occurs.
| Red | A byte specifying the quantity of red to use | |
| Green | A byte specifying the quantity of green to use | |
| Blue | A byte specifying the quantity of blue to use |
| void(* MAT300API::SetCurNestingLevels)(int Current) |
Sets the recursion level slider current value.
Pick a starting value that makes sense for your algorithm. Be aware that values which are too large can take excessive amounts of time or overflow your stack. A value too low will result in "joined line segments"
| void(* MAT300API::SetFillColor)(unsigned char Red, unsigned char Green, unsigned char Blue) |
Sets the fill (interior) color for subsequently drawn objects.
| Red | A byte specifying the quantity of red to use | |
| Green | A byte specifying the quantity of green to use | |
| Blue | A byte specifying the quantity of blue to use |
| void(* MAT300API::SetInputLineColor)(unsigned char Red, unsigned char Green, unsigned char Blue) |
Sets the color which will be used to draw the input poly line (if displayed).
| Red | A byte specifying the quantity of red to use | |
| Green | A byte specifying the quantity of green to use | |
| Blue | A byte specifying the quantity of blue to use |
| void(* MAT300API::SetInputPointDrawRadius)(unsigned radius) |
Sets the radius of any subsequently drawn input points.
| Radius | The radius to be used for input points |
| void(* MAT300API::SetInputPointFillColor)(unsigned char Red, unsigned char Green, unsigned char Blue) |
Sets the color which will be used to fill input points.
| Red | A byte specifying the quantity of red to use | |
| Green | A byte specifying the quantity of green to use | |
| Blue | A byte specifying the quantity of blue to use |
| void(* MAT300API::SetInputPointOutlineColor)(unsigned char Red, unsigned char Green, unsigned char Blue) |
Sets the color which will be used to outline input points.
| Red | A byte specifying the quantity of red to use | |
| Green | A byte specifying the quantity of green to use | |
| Blue | A byte specifying the quantity of blue to use |
| void(* MAT300API::SetInputPointPickRadius)(unsigned radius) |
Sets the pick radius of input points.
| Radius | The radius to be used for picking points. When the cursor is inside this radius the icon will change to indicate that the user can click and drag to move the point |
| void(* MAT300API::SetLineColor)(unsigned char Red, unsigned char Green, unsigned char Blue) |
Sets the line (border) color for subsequently drawn objects.
| Red | A byte specifying the quantity of red to use | |
| Green | A byte specifying the quantity of green to use | |
| Blue | A byte specifying the quantity of blue to use |
| void(* MAT300API::SetMaxCalcPoints)(int Max) |
Sets the maximum value on the Calculated Points slider.
Note that the number required for a smooth curve can depend on many factors, including number of input points and interpolation method. Set this high enough that your curve does not look like joined line segments or you will lose points.
| Max | An integer representing the new max value |
| void(* MAT300API::SetMaxPoints)(unsigned Max) |
Sets a limit on the number of points which may be entered by the user.
| Max | An unsigned integer representing the maximum number of points which the user may enter. Use 0 to indicate an infinite number of points. If the user enters one more point than the currently set maximum, the first point in the array will be removed and the new point will be added. This is useful if you are using data structures which only support a maximum number of input points |
| void(* MAT300API::SetUserPointDrawRadius)(unsigned radius) |
Sets the radius of any points subsequently drawn by the user.
| Radius | The radius to be used for subsequent points |
| void(* MAT300API::SetWindowTitle)(const char *Title) |
Sets the window title for the main form.
| Title | A pointer to a constant c-string specifying the new title |
1.6.2