Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

IUI_Border Class Reference

Interface for a frame border. More...

#include <IUI_Border.h>

Inheritance diagram for IUI_Border:

CUI_Resource CUI_PolyEdgeBorder List of all members.

Public Member Functions

 IUI_Border ()
 constructor

virtual ~IUI_Border ()
 destructor

virtual bool GetBorder (double dtime, v2_fp &vlist, int &numvert, unsigned short &primitivetype)=0
 Returns a list of 2d vertices and a primitive type.

virtual bool GetOutline (double dtime, v2_fp &vlist, int &numvert)=0
 returns list of 2d vertices that if drawn with UI_LINE_LOOP will produce the outline

virtual bool SetBorder (v2_f *vlist, int numvert)=0
 Defines the border by a list of vertices in counter-clockwise order.

virtual bool AddPoint (v2_f point)=0
 Add a point to the border (used during file loading).

virtual bool TestHit (float x, float y)=0
 Test to see if a given point is within this boundary.


Detailed Description

Interface for a frame border.

Defines a 2D enclosed space for the border of a CUI_Frame.

Static borders will be fairly easy to implement. Dynamic borders still need some more thought.


Member Function Documentation

virtual bool IUI_Border::GetBorder double  dtime,
v2_fp vlist,
int &  numvert,
unsigned short &  primitivetype
[pure virtual]
 

Returns a list of 2d vertices and a primitive type.

A loop rendering the vertices with the given primitive should produce the surface enclosed by the border.

Parameters:
dtime current time (for animation)
vlist pointer to hold the list of vertices
numvert integer to hold the number of vertices in the list
primitivetype to hold the type of primitive needed to render the list
See also:
UI_TRIANGLE_STRIP

UI_QUAD_STRIP

UI_TRIANGLE_FAN

UI_POLYGON

Implemented in CUI_PolyEdgeBorder.

virtual bool IUI_Border::GetOutline double  dtime,
v2_fp vlist,
int &  numvert
[pure virtual]
 

returns list of 2d vertices that if drawn with UI_LINE_LOOP will produce the outline

See also:
GetBorder

UI_LINE_LOOP

Implemented in CUI_PolyEdgeBorder.

virtual bool IUI_Border::SetBorder v2_f vlist,
int  numvert
[pure virtual]
 

Defines the border by a list of vertices in counter-clockwise order.

For dynamic borders, this should set the base border at logical frame 0.

Parameters:
vlist array of 2d vertices (x, y in local space)
numvert number of vertices in vlist

Implemented in CUI_PolyEdgeBorder.

virtual bool IUI_Border::TestHit float  x,
float  y
[pure virtual]
 

Test to see if a given point is within this boundary.

Parameters:
x x position (in local space)
y y position (in local space)
Returns:
true if the point is within the boundary

Implemented in CUI_PolyEdgeBorder.


The documentation for this class was generated from the following file:
Generated on Mon Sep 29 23:07:04 2003 for glGUI by doxygen 1.3.4