#include <boxresource.h>
Inheritance diagram for KrBoxResource:

Public Member Functions | |
| KrBoxResource (const std::string &name, int width, int height, const KrRGBA *colorArray, int numColors, int boxtype) | |
| A box resource is NOT created by a dat file, but is created by the client program. | |
| virtual U32 | Type () |
| The type of the resource. ( ex, KYRATAG_SPRITE ). | |
| virtual const std::string & | TypeName () |
| The name of the type. ( ex, "Sprite" ). | |
| virtual KrBoxResource * | ToBoxResource () |
| Return a pointer if this is a box resource. | |
| int | Width () const |
| Width. | |
| int | Height () const |
| Height. | |
Which seems a bit odd, granted, but from a certain point of view they are all the same thing.
| KrBoxResource::KrBoxResource | ( | const std::string & | name, | |
| int | width, | |||
| int | height, | |||
| const KrRGBA * | colorArray, | |||
| int | numColors, | |||
| int | boxtype | |||
| ) |
A box resource is NOT created by a dat file, but is created by the client program.
Once a box resource is created (and normally placed in the vault) it is used like any other resource.
| width | The width of the box. A width of 1 is a vertical line. | |
| height | The height of the box. A height of 1 is a horizontal line. | |
| colorArray | A box can be made of one or multiple colors. OpenGL mode does not support multiple colors. Only the first color is used in OpenGL rendering. | |
| numColors | The number of colors in the color array. To be drawn correctly for large objects, this needs to be a power of 2 that is 64 or less. | |
| type | OUTLINE, FILL, or CROSSHAIR |
1.4.7