MAT300API Struct Reference

Contains the function pointers for the MAT300 API. More...

#include <MAT300API.h>

List of all members.

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.

Detailed Description

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.


Member Data Documentation

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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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

Retrieves the current value of the Display Shells checkbox.

Returns:
A boolean value representing the checked state of the Display Shells checkbox

Retrieves the number of points that the user has entered.

Returns:
An unsigned integer representing the number of points currently entered

Retrieves the current list if points.

Returns:
A pointer to the first element of an array of IntPoint structures. Use GetInputPointCount() to determine the number of elements

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.

Returns:
A pointer to the first element of an array of integer values representing the knot sequence

Retrieves the number of values in the knot sequence text box.

Returns:
An integer value representing the number of elements in the GetKnotSequence() array
unsigned(* MAT300API::GetMaxPoints)()

Retrieves the currently set maximum number of points the MAT300 framework will accept.

Returns:
An unsigned integer representing the currently set maximum number of points. 0 indicates no limit.

Query the MAT300 framework to determine the index of a moving point.

Returns:
A integer value representing the index (in order of creation) of the point which is moving. This index can be used to retrieve the point's location in the GetInputPoints() array

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.

Returns:
An unsigned integer representing the current value of the Calculated Points slider
unsigned(* MAT300API::GetNumDegree)()

Retrieves the current value of the Degree slider.

This value is a raw number set by a GUI control.

Returns:
An unsigned integer representing the current value of the Degree slider

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.

Returns:
An unsigned integer representing the current value of the Displayed Shell slider

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.

Returns:
An unsigned integer representing the current value of the Nesting Levels slider

Retrieves the current value of the Endpoint Continuity checkbox.

Returns:
A boolean value representing the checked state of the Endpoint Continuity checkbox

Query the MAT300 framework to determine if the user is moving a point.

Returns:
A boolean value representing the state: true indicates that the user is actively 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.

Parameters:
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.

Parameters:
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).

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
Radius The radius to be used for subsequent points
void(* MAT300API::SetWindowTitle)(const char *Title)

Sets the window title for the main form.

Parameters:
Title A pointer to a constant c-string specifying the new title

The documentation for this struct was generated from the following file:
 All Classes Files Functions Variables

Generated on Wed Jan 19 14:24:02 2011 for MAT300API by  doxygen 1.6.2