This documenta- tion describes the current state of development.
Note that interfaces and functionality may still change.

Prokee Modules:
  A
  B
  C
  D
  E
  F
  G
  I
  L
  M
  N
  O
  P
  R
  S
  T
  U
  W

     open all    |    close all

GUI Elements:
  B
  C
  I
  M
  P
  R
  S
  T

     open all    |    close all

GUI Interactions:
  B
  F
  H
  S

     open all    |    close all

GUI Layouts:
  L

     open all    |    close all

Games/Demos:
  M

     open all    |    close all

Third Party Libraries:
  P
  F
  Z

     open all    |    close all

Information about this Website / Informationen zu dieser Webseite:
In case of any questions, or comments, please feel free to contact me via email at apoll500@gmail.com.

Module region [Version: v01]

This documentation describes the Prokee module interface.


Static Methods:
create_empty
CRegion *region::create_empty()
create_full
CRegion *region::create_full()
create1d
CRegion *region::create1d(uint16_t x,uint16_t width)
create2d
CRegion *region::create2d(uint16_t x,uint16_t y,uint16_t width,uint16_t height)
createkd
CRegion *region::createkd(uint16_t *x,uint16_t k)
destroy
void region::destroy(CRegion *reg)
add1d
void region::add1d(CRegion **r,uint16_t p,uint16_t length)
sub1d
void region::sub1d(CRegion **r,uint16_t p,uint16_t length)
add2d
void region::add2d(CRegion **r,uint16_t x,uint16_t y,uint16_t width,uint16_t height)
sub2d
void region::sub2d(CRegion **r,uint16_t x,uint16_t y,uint16_t width,uint16_t height)
add
void region::add(CRegion **r,CRegion *s)
sub
void region::sub(CRegion **r,CRegion *s)
walk1d
void region::walk1d(CRegion *reg,uint16_t length,void(*callback)(uint16_t p,void *context),void *context)
walk2d
void region::walk2d(CRegion *reg,uint16_t width,uint16_t height,void(*callback)(uint16_t x,uint16_t y,void *context),void *context)
walk
void region::walk(CRegion *reg,uint16_t *dim,uint16_t *c,uint16_t d,uint16_t cd,void(*callback)(uint16_t *c,void *context),void *context)
move1d
void region::move1d(CRegion *reg,int16_t m)
move2d
void region::move2d(CRegion *reg,int16_t mx,int16_t my)
move
void region::move(CRegion *reg,int16_t *m,uint16_t d,uint16_t cd)
getRange
bool region::getRange(CRegion *reg,uint16_t d,uint16_t *b,uint16_t *e)
print (version 1)
void region::print(CRegion *reg)
print (version 2)
void region::print(FILE *f,CRegion *reg,unsigned int d)
isEmpty
bool region::isEmpty(CRegion *reg)
copyCRegion
CRegion *region::copyCRegion(CRegion *reg)

Motivation


Static Methods

   create_empty


Creates a new empty region.

Signature:
CRegion *region::create_empty()

Return value:
Pointer to a CRegion.

   create_full


Creates a new "full" region.

Signature:
CRegion *region::create_full()

Return value:
Pointer to a CRegion.

   create1d


Creates a new region from the given section.

Signature:
CRegion *region::create1d(uint16_t x,uint16_t width)

Parameters:
Type Name Direction Description
uint16_t xx-position of the region.
uint16_t widthThe width of the region.

Return value:
Pointer to a CRegion.

   create2d


Creates a new region from the given rectangle.

Signature:
CRegion *region::create2d(uint16_t x,uint16_t y,uint16_t width,uint16_t height)

Parameters:
Type Name Direction Description
uint16_t xx-position of the region.
uint16_t yy-position of the region.
uint16_t widthThe width of the region.
uint16_t heightThe height of the region.

Return value:
Pointer to a CRegion.

   createkd


Create a new region from the given k-dimensional cube.

Signature:
CRegion *region::createkd(uint16_t *x,uint16_t k)

Parameters:
Type Name Direction Description
uint16_t *xcoordinates/dimensions of k-dimensional cube.
uint16_t kdimensions.

Return value:
Pointer to a CRegion.

   destroy


Destroys a region.

Signature:
void region::destroy(CRegion *reg)

Parameters:
Type Name Direction Description
CRegion *reg[IN/OUT]Pointer to a CRegion.

   add1d


Adds a region.

Signature:
void region::add1d(CRegion **r,uint16_t p,uint16_t length)

Parameters:
Type Name Direction Description
CRegion **r[IN/OUT]Pointer to a CRegion.
uint16_t pstart-position of the region.
uint16_t lengthThe length of the region.

   sub1d


Subtracts a region.

Signature:
void region::sub1d(CRegion **r,uint16_t p,uint16_t length)

Parameters:
Type Name Direction Description
CRegion **r[IN/OUT]Pointer to a CRegion.
uint16_t pstart-position of the region.
uint16_t lengthThe length of the region.

   add2d


Adds a region.

Signature:
void region::add2d(CRegion **r,uint16_t x,uint16_t y,uint16_t width,uint16_t height)

Parameters:
Type Name Direction Description
CRegion **r[IN/OUT]Pointer to a CRegion.
uint16_t xx-position of the region.
uint16_t yy-position of the region.
uint16_t widthThe width of the region.
uint16_t heightThe height of the region.

   sub2d


Subtracts a region.

Signature:
void region::sub2d(CRegion **r,uint16_t x,uint16_t y,uint16_t width,uint16_t height)

Parameters:
Type Name Direction Description
CRegion **r[IN/OUT]Pointer to a CRegion.
uint16_t xx-position of the region.
uint16_t yy-position of the region.
uint16_t widthThe width of the region.
uint16_t heightThe height of the region.

   add


Adds a region.

Signature:
void region::add(CRegion **r,CRegion *s)

Parameters:
Type Name Direction Description
CRegion **r[IN/OUT]Pointer to a CRegion.
CRegion *s[IN]Pointer to a CRegion.

   sub


Subtracts a region.

Signature:
void region::sub(CRegion **r,CRegion *s)

Parameters:
Type Name Direction Description
CRegion **r[IN/OUT]Pointer to a CRegion.
CRegion *s[IN]Pointer to a CRegion.

   walk1d


Walks through a region.

Signature:
void region::walk1d(CRegion *reg,uint16_t length,void(*callback)(uint16_t p,void *context),void *context)

Parameters:
Type Name Direction Description
CRegion *reg[IN/OUT]Pointer to a CRegion.
uint16_t length
void(*callback)
(
   uint16_t p
,
   void *context
)
[IN] callback function.
Parameters
p:
context:
void *context

   walk2d


Walks through a region.

Signature:
void region::walk2d(CRegion *reg,uint16_t width,uint16_t height,void(*callback)(uint16_t x,uint16_t y,void *context),void *context)

Parameters:
Type Name Direction Description
CRegion *reg[IN/OUT]Pointer to a CRegion.
uint16_t width
uint16_t height
void(*callback)
(
   uint16_t x
,
   uint16_t y
,
   void *context
)
[IN] callback function.
Parameters
x:
y:
context:
void *context

   walk


Walks through a region.

Signature:
void region::walk(CRegion *reg,uint16_t *dim,uint16_t *c,uint16_t d,uint16_t cd,void(*callback)(uint16_t *c,void *context),void *context)

Parameters:
Type Name Direction Description
CRegion *reg[IN/OUT]Pointer to a CRegion.
uint16_t *dim
uint16_t *c
uint16_t d
uint16_t cd
void(*callback)
(
   uint16_t *c
,
   void *context
)
[IN] callback function.
Parameters
c:
context:
void *context

   move1d


Moves a region.

Signature:
void region::move1d(CRegion *reg,int16_t m)

Parameters:
Type Name Direction Description
CRegion *reg[IN/OUT]Pointer to a CRegion.
int16_t m

   move2d


Moves a region.

Signature:
void region::move2d(CRegion *reg,int16_t mx,int16_t my)

Parameters:
Type Name Direction Description
CRegion *reg[IN/OUT]Pointer to a CRegion.
int16_t mx
int16_t my

   move


Moves a region.

Signature:
void region::move(CRegion *reg,int16_t *m,uint16_t d,uint16_t cd)

Parameters:
Type Name Direction Description
CRegion *reg[IN/OUT]Pointer to a CRegion.
int16_t *m
uint16_t d
uint16_t cd

   getRange


Gets the bounding box/interval of the region.

Signature:
bool region::getRange(CRegion *reg,uint16_t d,uint16_t *b,uint16_t *e)

Parameters:
Type Name Direction Description
CRegion *reg[IN/OUT]Pointer to a CRegion.
uint16_t d
uint16_t *b
uint16_t *e

   print (version 1)


Prints a region.

Signature:
void region::print(CRegion *reg)

Parameters:
Type Name Direction Description
CRegion *reg[IN/OUT]Pointer to a CRegion.

   print (version 2)


Prints a region.

Signature:
void region::print(FILE *f,CRegion *reg,unsigned int d)

Parameters:
Type Name Direction Description
FILE *ffile handle
CRegion *reg[IN/OUT]Pointer to a CRegion.
unsigned int didentation, set this to 0.

   isEmpty


Tests if a region is empty.

Signature:
bool region::isEmpty(CRegion *reg)

Parameters:
Type Name Direction Description
CRegion *reg[IN/OUT]Pointer to a CRegion.

Return value:
Returns true, if the region is empty or false otherwise.

   copyCRegion


Copies a region.

Signature:
CRegion *region::copyCRegion(CRegion *reg)

Parameters:
Type Name Direction Description
CRegion *reg[IN/OUT]Pointer to a CRegion.

Return value:
Pointer to a CRegion.


Copyright © 2017 - 2019 by Andreas Pollhammer