NAME:BI3DFONT
CATEGORY:STRUCTURE
DEFINITION:
typedef struct {
real wid; Width of 1 charactor
real hei; Height of 1 charactor
BICOLOR col; Color of charactor
(omitted)
}BI3DFONT;
DESCRIPTION:
Structure represents 3D font.
REFERENCE:
NAME:BI3DG_NOERR
NAME:BI3DG_STACKOVERFLOW
NAME:BI3DG_UNSUPPORTED
CATEGORY:MACRO
DEFINITION:
(ommited)
DESCRIPTION:
Macro representing 3D Graphics Routines.
BI3DG_NOERR No error
BI3DG_STACKOVERFLOW Temporary stack overflow
BI3DG_UNSUPPORTED Attempted to use unsupported function
REFERENCE:
NAME:BIAL_CENTER NAME:BIAL_LEFT NAME:BIAL_RIGHT NAME:BIAL_TOP NAME:BIAL_BOTTOM NAME:BIMG_CENTER NAME:BIMG_LEFT NAME:BIMG_RIGHT NAME:BIMG_TOP NAME:BIMG_BOTTOM CATEGORY:MACRO DEFINITION: (omitted) DESCRIPTION: Macros representing Text Alignment. BIMG_ was my wrongful use of English in earlier version(^_^;) Now, you can use both BIAL_ and BIMG_. (Never mind BIMG_??? and just use BIAL_????)(^_^;) REFERENCE:
NAME:BIANGLE
CATEGORY:STRUCTURE
DEFINITION:
typedef struct {
long h,p,b;
} BIANGLE;
DESCRIPTION:
Structure represents an attitude. Identical to BIATTITUDE.
REFERENCE:
NAME:BIATTITUDE CATEGORY:STRUCTURE DEFINITION: typedef BIANGLE BIATTITUDE; DESCRIPTION: Structure represents an attitude by euler angle. Identical to BIANGLE REFERENCE:
NAME:BIAXIS
CATEGORY:STRUCTURE
DEFINITION:
typedef struct {
BIPOINT p; /* Point of origin */
BIANGLE a; /* Euler angle that defines relative rotation */
BITRIGON t; /* Trigonomy value corresponding to a */
} BIAXIS;
DESCRIPTION:
Structure represents a local coordinate system. Use BiMakeAxis to
construct.
REFERENCE:
NAME:BICOLOR
CATEGORY:STRUCTURE
DEFINITION:
typedef struct {
unsigned int g,r,b;
} BICOLOR;
DESCRIPTION:
Structure represents a color. The range of r,g,b is 0 through 255.
REFERENCE:
NAME:BIFLD NAME:BIFIELD CATEGORY:STRUCTURE DEFINITION: (omitted) DESCRIPTION: Structure represents a Field Object REFERENCE:
NAME:BIKEY_
NAME:BIKEY_NULL
NAME:BIKEY_STOP
NAME:BIKEY_COPY
NAME:BIKEY_F1
NAME:BIKEY_F2
NAME:BIKEY_F3
NAME:BIKEY_F4
NAME:BIKEY_F5
NAME:BIKEY_F6
NAME:BIKEY_F7
NAME:BIKEY_F8
NAME:BIKEY_F9
NAME:BIKEY_F10
NAME:BIKEY_ZERO
NAME:BIKEY_ONE
NAME:BIKEY_TWO
NAME:BIKEY_THREE
NAME:BIKEY_FOUR
NAME:BIKEY_FIVE
NAME:BIKEY_SIX
NAME:BIKEY_SEVEN
NAME:BIKEY_EIGHT
NAME:BIKEY_NINE
NAME:BIKEY_A
NAME:BIKEY_B
NAME:BIKEY_C
NAME:BIKEY_D
NAME:BIKEY_E
NAME:BIKEY_F
NAME:BIKEY_G
NAME:BIKEY_H
NAME:BIKEY_I
NAME:BIKEY_J
NAME:BIKEY_K
NAME:BIKEY_L
NAME:BIKEY_M
NAME:BIKEY_N
NAME:BIKEY_O
NAME:BIKEY_P
NAME:BIKEY_Q
NAME:BIKEY_R
NAME:BIKEY_S
NAME:BIKEY_T
NAME:BIKEY_U
NAME:BIKEY_V
NAME:BIKEY_W
NAME:BIKEY_X
NAME:BIKEY_Y
NAME:BIKEY_Z
NAME:BIKEY_SPACE
NAME:BIKEY_ESC
NAME:BIKEY_TAB
NAME:BIKEY_CTRL
NAME:BIKEY_SHIFT
NAME:BIKEY_ALT
NAME:BIKEY_BS
NAME:BIKEY_RET
NAME:BIKEY_HOME
NAME:BIKEY_DEL
NAME:BIKEY_UP
NAME:BIKEY_DOWN
NAME:BIKEY_LEFT
NAME:BIKEY_RIGHT
NAME:BIKEY_TEN0
NAME:BIKEY_TEN1
NAME:BIKEY_TEN2
NAME:BIKEY_TEN3
NAME:BIKEY_TEN4
NAME:BIKEY_TEN5
NAME:BIKEY_TEN6
NAME:BIKEY_TEN7
NAME:BIKEY_TEN8
NAME:BIKEY_TEN9
NAME:BIKEY_TENMUL
NAME:BIKEY_TENDIV
NAME:BIKEY_TENPLUS
NAME:BIKEY_TENMINUS
NAME:BIKEY_TENEQUAL
NAME:BIKEY_TENDOT
CATEGORY:MACRO
DEFINITION:
(ommited)
DESCRIPTION:
Blue Impulse SDK's keycode
BIKEY_NULL No input
BIKEY_STOP BREAK/STOP
BIKEY_COPY COPY
BIKEY_F1 F1
BIKEY_F2 F2
BIKEY_F3 F3
BIKEY_F4 F4
BIKEY_F5 F5
BIKEY_F6 F6
BIKEY_F7 F7
BIKEY_F8 F8
BIKEY_F9 F9
BIKEY_F10 F10
BIKEY_ZERO 0(full key side)
BIKEY_ONE 1(full key side)
BIKEY_TWO 2(full key side)
BIKEY_THREE 3(full key side)
BIKEY_FOUR 4(full key side)
BIKEY_FIVE 5(full key side)
BIKEY_SIX 6(full key side)
BIKEY_SEVEN 7(full key side)
BIKEY_EIGHT 8(full key side)
BIKEY_NINE 9(full key side)
BIKEY_A A
BIKEY_B B
BIKEY_C C
BIKEY_D D
BIKEY_E E
BIKEY_F F
BIKEY_G G
BIKEY_H H
BIKEY_I I
BIKEY_J J
BIKEY_K K
BIKEY_L L
BIKEY_M M
BIKEY_N N
BIKEY_O O
BIKEY_P P
BIKEY_Q Q
BIKEY_R R
BIKEY_S S
BIKEY_T T
BIKEY_U U
BIKEY_V V
BIKEY_W W
BIKEY_X X
BIKEY_Y Y
BIKEY_Z Z
BIKEY_SPACE SPACE
BIKEY_ESC ESC
BIKEY_TAB TAB
BIKEY_CTRL CTRL
BIKEY_SHIFT SHIFT
BIKEY_ALT ALT (Usually unable to use due to OS overtaking)
BIKEY_BS BACK SPACE
BIKEY_RET ENTER
BIKEY_HOME HOME
BIKEY_DEL DEL
BIKEY_UP UP ARROW
BIKEY_DOWN DOWN ARROW
BIKEY_LEFT LEFT ARROW
BIKEY_RIGHT RIGHT ARROW
BIKEY_TEN0 0(Ten key side)
BIKEY_TEN1 1(Ten key side)
BIKEY_TEN2 2(Ten key side)
BIKEY_TEN3 3(Ten key side)
BIKEY_TEN4 4(Ten key side)
BIKEY_TEN5 5(Ten key side)
BIKEY_TEN6 6(Ten key side)
BIKEY_TEN7 7(Ten key side)
BIKEY_TEN8 8(Ten key side)
BIKEY_TEN9 9(Ten key side)
BIKEY_TENMUL *(Ten key side)
BIKEY_TENDIV /(Ten key side)
BIKEY_TENPLUS +(Ten key side)
BIKEY_TENMINUS -(Ten key side)
BIKEY_TENEQUAL =(Ten key side)
BIKEY_TENDOT .(Ten key side)
CAUTION:
Some keys cannot be sensed. For example, ALT key and COPY key is
overtaken by Windows. So, Blue Impulse SDK cannot sense them on
Windows. I recommend not to use those keys.
Or, in some Window Managers of X-Window system, even SPACE key is
overtaken. In such case, please replace Window Manager. Blue Impulse SDK
cannot take care of those systems (^_^;)
REFERENCE:
NAME:BILIMLINE
CATEGORY:STRUCTURE
DEFINITION:
typedef struct {
BIPOINT p1,p2;
} BILIMLINE;
DESCRIPTION:
Structure represents a line segment.
p1 :One end point
p2 :The other end point
REFERENCE:
NAME:BILIMLINE2
CATEGORY:STRUCTURE
DEFINITION:
typedef struct {
BIPOINT2 p1,p2;
} BILIMLINE2;
DESCRIPTION:
Structure represents a 2D line segment
p1 :One end point
p2 :The other end point
REFERENCE:
NAME:BILINE
CATEGORY:STRUCTURE
DEFINITION:
typedef struct {
BIPOINT o,v;
} BILINE;
DESCRIPTION:
Structure represents a 3D line.
o :One passing point
v :Direction
REFERENCE:
NAME:BILINE2
CATEGORY:STRUCTURE
DEFINITION:
typedef struct {
BIPOINT2 o,v;
} BILINE2;
DESCRIPTION:
Structure represents a 2D line
o :Passing point
v :Direction
REFERENCE:
NAME:BIPC2 NAME:BIPICT2 CATEGORY:STRUCTURE DEFINITION: (omitted) DESCRIPTION: Structure represents 2D-Drawing Object REFERENCE:
NAME:BIPLANE
CATEGORY:STRUCTURE
DEFINITION:
typedef struct {
BIPOINT o,n;
} BIPLANE;
DESCRIPTION:
Structure represents an infinite plane.
REFERENCE:
NAME:BIPNTANG
CATEGORY:STRUCTURE
DEFINITION:
typedef struct {
BIPOINT p;
BIANGLE a;
} BIPNTANG;
DESCRIPTION:
Structure represents a position and an attitude. Identical to BIPOSATT.
REFERENCE:
NAME:BIPOINT
CATEGORY:STRUCTURE
DEFINITION:
typedef struct {
double x,y,z;
} BIPOINT;
DESCRIPTION:
Structure represents a coordinate(or a vector). Identical to BIVECTOR
REFERENCE:
NAME:BIPOINT2
CATEGORY:STRUCTURE
DEFINITION:
typedef struct {
double x,y;
} BIPOINT2;
DESCRIPTION:
Structure represents a 2D coordinate/vector.
REFERENCE:
NAME:BIPOINTS
CATEGORY:STRUCTURE
DEFINITION:
typedef struct {
long x,y;
} BIPOINTS;
DESCRIPTION:
Structure represents a screen coordinate.
REFERENCE:
NAME:BIPOLYGON
CATEGORY:STRUCTURE
DEFINITION:
typedef struct {
int np;
BIPOINT *p;
} BIPOLYGON;
DESCRIPTION:
Structure represents a 3D polygon
REFERENCE:
NAME:BIPOSATT CATEGORY:STRUCTURE DEFINITION: typedef BIPNTANG BIPOSATT; DESCRIPTION: A combination of a position and an attitude. Identical to BIPNTANG. REFERENCE:
NAME:BIPRJ_PERS
NAME:BIPRJ_ORTHO
CATEGORY:MACRO
DEFINITION:
enum { BIPRJ_PERS,BIPRJ_ORTHO };
DESCRIPTION:
Macro representing projection mode.
BIPRJ_PERS Perspective View
BIPRJ_ORTHO Orthogonal View
REFERENCE:
NAME:BIPROJ
CATEGORY:STRUCTURE
DEFINITION:
typedef struct {
long lx,ly;
long cx,cy;
double magx,magy;
double nearz,farz;
} BIPROJ;
DESCRIPTION:
Structure keeps projection information.
lx,ly : Screen size
cx,cy : Center of screen
magx,magy : Magnification in x and y direction (aspect ratio)
nearz,farz : Distance to clip plane in z direction. (Note:farz is used
just for culling. Not actual clipping)
REFERENCE:
NAME:BISRF NAME:BISRFMODEL CATEGORY:STRUCTURE DEFINITION: (omitted) DESCRIPTION: Structure keeps a polygon model. Use BiLoadSrf to load polygon model from a file. REFERENCE:
NAME:BITER
NAME:BITERRMESH
CATEGORY:STRUCTURE
DEFINITION:
typedef struct {
long xSiz,zSiz; Number of blocks in lateral and vertical direction
double xWid,zWid; Width of one block
BITERRBLOCK *blk; Blocks ([0]`[(xSiz+1)*(zSiz+1)]
int side[4]; BI_ON if sidefaces are needed.
BICOLOR sdCol[4]; Color of sidefaces (efective when side[?]==BI_ON)
(explanation of other members are ommited)
} BITERRMESH;
DESCRIPTION:
Structure represents a terrain object. If you create a terrain object
in your program (not from a file), set values to members above, then
use BiConstTerrMesh to initialize the other members.
Subscript of side,sdCol are shown below.
[3]
Z
|
+----+----+
| | |
[2]| +----|->X [1]
| |
+---------+
[0]
REFERENCE:
NAME:BITERRBLOCK
CATEGORY:STRUCTURE
DEFINITION:
typedef struct {
double y; Elevation of left-bottom point
int lup; BI_ON if left-up
BICOLOR col[2]; Color of top triangle (col[0]) bottom triangle(col[1])
(explanation of other members are ommited)
} BITERRBLOCK;
DESCRIPTION:
Structure represents a terrain object.
REFERENCE:
NAME:BITRIGON CATEGORY:STRUCTURE DEFINITION: (omitted) DESCRIPTION: Structure keeps a set of trigonomy value for an attitude(h,p,b). REFERENCE:
NAME:BITWIST_UNKNOWN
NAME:BITWIST_RIGHT
NAME:BITWIST_LEFT
CATEGORY:MACRO
DEFINITION:
enum {BITWIST_UNKNOWN,BITWIST_RIGHT,BITWIST_LEFT};
DESCRIPTION:
Macro representing twist direction of a polygon.
BITWIST_UNKNOWN Calculation failure (Eg. There's some self intersection)
BITWIST_RIGHT Clockwise
BITWIST_LEFT Counter Clockwise
(Assuming left handed coordinate system)
REFERENCE:
NAME:BIVECTOR CATEGORY:STRUCTURE DEFINITION: typedef BIPOINT BIVECTOR; DESCRIPTION: Structure represents a 3D vector. Identical to BIPOINT REFERENCE:
NAME:BI_CRS_SAME
NAME:BI_CRS_PARALLEL
NAME:BI_CRS_ON_LINE
NAME:BI_CRS_ONESIDE_SAME
NAME:BI_CRS_CROSS
NAME:BI_CRS_NOCROSS
NAME:BI_CRS_LN1_TOUCH_LN2
NAME:BI_CRS_LN2_TOUCH_LN1
CATEGORY:MACRO
DEFINITION:
(omitted)
DESCRIPTION:
Macro representing relation between to line segments.
BI_CRS_SAME Identical
BI_CRS_PARALLEL Parallel
BI_CRS_ON_LINE On the same straightline
BI_CRS_ONESIDE_SAME Shareing one point
BI_CRS_CROSS Crossing
BI_CRS_NOCROSS Not parallel, Not crossing
BI_CRS_LN1_TOUCH_LN2 Line1 is touching Line2
BI_CRS_LN2_TOUCH_LN1 Line2 is touching Line1
REFERENCE:
NAME:BI_OFF
NAME:BI_ON
CATEGORY:MACRO
DEFINITION:
enum { BI_OFF,BI_ON };
DESCRIPTION:
Macro representing On/Off
REFERENCE:
NAME:BI_OK
NAME:BI_ERR
CATEGORY:MACRO
DEFINITION:
enum { BI_OK,BI_ERR };
DESCRIPTION:
Macro representing the result of an operation
REFERENCE:
NAME:BI_OUT
NAME:BI_IN
CATEGORY:MACRO
DEFINITION:
enum { BI_OUT,BI_IN };
DESCRIPTION:
Macro representing the result of inside/outside check
REFERENCE:
NAME:BI_TRUE
NAME:BI_FALSE
CATEGORY:MACRO
DEFINITION:
enum { BI_TRUE,BI_FALSE };
DESCRIPTION:
Macro representing boolean
REFERENCE:
NAME:BiAboveTer NAME:BiAboveTerrMesh CATEGORY:FUNCTION DEFINITION: int BiAboveTer(real x,real z,BITER *ter,BIPOSATT *pos); RETURN: BI_IN (x,z) is above the terrain *ter BI_OUT (x,z)is not above the terrain *ter (out of range) DESCRIPTION: Check if (x,z) is above terrain *ter that is placed at *pos. REFERENCE:
NAME:BiAbs CATEGORY:MACRO DEFINITION: #define BiAbs(a) ((a)>=0 ? (a) : -(a)) DESCRIPTION: Calculate absolute value. REFERENCE:
NAME:BiAcos CATEGORY:FUNCTION DEFINITION: long BiAcos(double s); PARAMETER: double s; cos value(-1.0...+1.0) RETURN: Angle(+0x0000...+0x8000) DESCRIPTION: Calculate arccos. Return value will be between 0 (for 0 degree) and 32768(for 180 degree). REFERENCE:
NAME:BiAddPoint CATEGORY:MACRO DEFINITION: void BiAddPoint(BIPOINT *ret,BIPOINT *a,BIPOINT *b); (equivalent) PARAMETER: BIPOINT *ret; Pointer to accept the result BIPOINT *a,*b; Two coordinates to be added. DESCRIPTION: Add *a and *b. Return it to *ret. REFERENCE:
NAME:BiAddPoint2 CATEGORY:MACRO DEFINITION: void BiAddPoint2(BIPOINT2 *ret,BIPOINT2 *a,BIPOINT2 *b); (equivalent) PARAMETER: BIPOINT2 *ret; Pointer to accept the result BIPOINT2 *a,*b; Two coordinates to be added DESCRIPTION: Add *a and *b. Return it to *ret. REFERENCE:
NAME:BiAngle2
CATEGORY:FUNCTION
DEFINITION:
long BiAngle2(BIPOINT2 *vec);
PARAMETER:
BIPOINT2 *vec; 2D Vector
RETURN:
long angle(-0x8000...+0x8000)
DESCRIPTION:
Return radial angular direction of (vec->x,vec->y)
(t,0) {t>0} will return 0 (0degree)
(0,t) {t>0} will return 16384 (90degree)
REFERENCE:
NAME:BiAngleToVector CATEGORY:FUNCTION DEFINITION: void BiAngleToVector(BIPOINT *eye,BIPOINT *up,BIANGLE *an); PARAMETER: BIPOINT *eye; Accept Viewing vector(Corresponds to Z axis) BIPOINT *up; Accept Up vector(Corresponds to Y axis) BIANGLE *an; Attitude DESCRIPTION: Calculae viewing vector and up vector from *an. Then return them to *eye and *up. REFERENCE:
NAME:BiAsin CATEGORY:FUNCTION DEFINITION: long BiAsin(double s); PARAMETER: double s; sin value(-1.0...+1.0) RETURN: long angle(-0x4000...+0x4000) DESCRIPTION: Calculate arcsin. Return value will be between -16384(-90degree) and 16384(90degree) REFERENCE:
NAME:BiAtan CATEGORY:FUNCTION DEFINITION: long BiAtan(double s); PARAMETER: double s; tan value RETURN: long angle(-0x4000...+0x4000); DESCRIPTION: Calculate arctan. Return value will be between -16384(-90degree) and 16384(90degree) REFERENCE:
NAME:BiAverageNormalVector CATEGORY:FUNCTION DEFINITION: int BiAverageNormalVector(BIPOINT *nom,int np,BIPOINT p[]); PARAMETER: BIPOINT *nom; Accept Normal vector int np; Number of coordinates BIPOINT p[]; Coordinates DESCRIPTION: Calculate average normal vector from p[0]....p[np-1]. REFERENCE:
NAME:BiAxisToPlane CATEGORY:FUNCTION DEFINITION: void BiAxisToPlane(BIPLANE *dst,BIAXIS *src) PARAMETER: BIPLANE *dst; Accept a plane BIAXIS *src; Original coordinate system DESCRIPTION: Calculate XZ plane of *src. Then return it to *dst. REFERENCE:
NAME:BiBlack CATEGORY:Pre-Defined Variable DEFINITION: BICOLOR BiBlack; DESCRIPTION: Black (R=0,G=0,B=0) REFERENCE:
NAME:BiBlue CATEGORY:Pre-Defined Variable DEFINITION: BICOLOR BiBlue; DESCRIPTION: Blue (R=0,G=0,B=255) REFERENCE:
NAME:BiCalcInitialize CATEGORY:FUNCTION DEFINITION: void BiCalcInitialize(void); DESCRIPTION: Initialize math library. Must be called once in the main function. REFERENCE:
NAME:BiCheckClicked
NAME:BiCheckClickedPoint
NAME:BiCheckClickedPolyg
NAME:BiCheckClickedLine
DEFINITION:
int BiCheckClicked(int *i1,int *i2,int *i3,void **ext,BIPOINTS *sc,int ctr);
int BiCheckClickedPoint
(int *i1,int *i2,int *i3,void **ext,BIPOINTS *sc,int ctr);
int BiCheckClickedPolyg
(int *i1,int *i2,int *i3,void **ext,BIPOINTS *sc,int ctr);
int BiCheckClickedLine
(int *i1,int *i2,int *i3,void **ext,BIPOINTS *sc,int ctr);
CATEGORY:FUNCTION
PARAMETER:
int *i1,*i2,*i3; Accept object ID(NULL is acceptable)
void **ext; Accept additional information(NULL is acceptable)
BIPOINTS *sc; Screen coordinate
int ctr; Depth count(Typically 1)
RETURN:
BI_TRUE Hit
BI_FALSE Doesn't hit
DESCRIPTION:
Compare screen coordinate and clickable object position on the screen.
If a clickable object is hit, this function returns IDs specified by
BiInsClickable??? function.
BiCheckClickedPoint checks only points.
BiCheckClickedLine checks only lines.
BiCheckClickedPolyg checks only polygons.
If you want to detect click behind other clickable object,
specify more than 1 to ctr.
REFERENCE:
NAME:BiCheckConvex NAME:BiCheckConvex2 CATEGORY:FUNCTION DEFINITION: int BiCheckConvex(BIPOLYGON *plg); int BiCheckConvex2(BIPOLYGON2 *plg); PARAMETER: BIPOLYGON *plg; target polyson BIPOLYGON2 *plg; target polygon RETURN: BI_TRUE Convex BI_FALSE Concave or indeterminant DESCRIPTION: Check if the polygon is convex or concave or indeterminant. REFERENCE:
NAME:BiClearClickable CATEGORY:FUNCTION DEFINITION: int BiClearClickable(void); RETURN: BI_OK Always BI_OK DESCRIPTION: Clear Clickable Object Table. Call right after BiClearScreen function. REFERENCE:
NAME:BiClearLocalMatrix CATEGORY:FUNCTION DEFINITION: void BiClearLocalMatrix(void); DESCRIPTION: Clear the local coordinate system set by BiSetLocalMatrix. REFERENCE:
NAME:BiClearScreen CATEGORY:FUNCTION DEFINITION: void BiClearScreen(void); DESCRIPTION: Clear frame buffer. If your program uses clickable object features, BiClearClickable function must be called right after this function. REFERENCE:
NAME:BiClipLineScrn CATEGORY:FUNCTION DEFINITION: int BiClipLineScrn(BIPOINTS *p1New,BIPOINTS *p2New,BIPOINTS *p1,BIPOINTS *p2) RETURNF BI_IN The line is inside the screen (is visible) BI_OUT The line is out of the screen DESCRIPTION: Clip a line segment *p1 and *p2 by a clipping rectangle. Then return them to *p1New and *p2New. Clipping rectangle is specified by BiSetClipScreenFrame function. REFERENCE:
NAME:BiClipPolygScrn CATEGORY:FUNCTION DEFINITION: int BiClipPolygScrn(int *npNew,BIPOINTS *pNew,int np,BIPOINTS *p) RETURN: BI_IN The polygon is inside the screen (is visible) BI_OUT The polygon is outside the screen DESCRIPTION: Clip the polygon (np,p[]) by clipping rectangle. Then return them to *npNew,pNew[]. Cliping rectangle is specified by BiSetClipScreenFrame function. The length of pNew[] must be np*4. REFERENCE:
NAME:BiCloseWindow CATEGORY:FUNCTION DEFINITION: void BiCloseWindow(void); DESCRIPTION: Close the window opened by BiOpenWindow. Current version does not suppor multi window. So, open a window once at the top of the application, close it at the end of the application. REFERENCE:
NAME:BiConstTer NAME:BiConstTerrMesh CATEGORY:FUNCTION DEFINITION: void BiConstTer(BITER *ter); DESCRIPTION: Initialize terrain object. You must not call this function for the terrain object already loaded from file. REFERENCE:
NAME:BiConvAxisGtoL CATEGORY:FUNCTION DEFINITION: void BiConvAxisGtoL(BIAXIS *neo,BIAXIS *src,BIAXIS *bas) DESCRIPTION: Convert *src (in Global coordinate system) into a local coordinate system relative to *bas. Then return it to *neo. REFERENCE:
NAME:BiConvAxisLtoG CATEGORY:FUNCTION DEFINITION: void BiConvAxisLtoG(BIAXIS *neo,BIAXIS *src,BIAXIS *bas) DESCRIPTION: Convert a local coordinate system *src relative to *bas into the global coordinate system. Then return it to *neo. REFERENCE:
NAME:BiConvGtoL CATEGORY:MACRO DEFINITION: void BiConvGtoL(BIPOINT *ret,BIPOINT *src,BIAXIS *axs); (equivalent) PARAMETER: BIPOINT *ret; Accpt transformed coordinate BIPOINT *src; Original coordinate BIAXIS *axs; Local coordinate system DESCRIPTION: Transform *src (in the global coordinate system) into local coordinate system *axs. Then return it to *ret. This function works oppositely to BiConvLtoG function. REFERENCE:
NAME:BiConvLtoG CATEGORY:MACRO DEFINITION: void BiConvLtoG(BIPOINT *ret,BIPOINT *src,BIAXIS *axs); (equivalent) PARAMETER: BIPOINT *ret; Accept transformed coordinate BIPOINT *src; Original coordinate BIAXIS *axs; Local coordinate system DESCRIPTION: Transform *src (in the local coordinate system *axs) into the global coordinate system. Then return it to *ret. This function works oppositely to BiConvGtoL function. REFERENCE:
NAME:BiCopyPolyg NAME:BiCopyPolyg2 CATEGORY:FUNCTION DEFINITION: int BiCopyPolyg(BIPOLYGON *neo,BIPOLYGON *org); int BiCopyPolyg2(BIPOLYGON2 *neo,BIPOLYGON2 *org); PARAMETER: BIPOLYGON *neo; Accept copied polygon BIPOLYGON *org; Original polygon BIPOLYGON2 *neo; Accept copied polygon BIPOLYGON2 *org; Original polygon RETURN: BI_OK Success BI_ERR Failed(usually out of memory) DESCRIPTION: Copy a polygon from *org to *neo. Memory blocks are automatically allocated inside this function. Use BiFreePolyg2/BiFreePolyg to release the memory block. REFERENCE:
NAME:BiCos CATEGORY:FUNCTION DEFINITION: double BiCos(long a); PARAMETER: long a; Angle RETURN: double cos value DESCRIPTION: Calculate cos(a). You have to specify angle by Blue Impulse SDK's system. (0 for 0 degree, 32768 for 180 degree, 65536 for 360 degree) REFERENCE:
NAME:BiCrossPoint CATEGORY:FUNCTION DEFINITION: int BiCrossPoint(BIPOINT *out,BILINE *ln,BIPLANE *pl); PARAMETER: BIPOINT *out; Accept return value BILINE *ln; Line BIPLANE *pl; Plane DESCRIPTION: Calculate intersecting point of *ln and *pl. Then return it to *out. REFERENCE:
NAME:BiCube2G
DEFINITION:
void BiCube2G(float x,float y,float z,float lx,float ly,float lz,BICOLOR *c);
DESCRIPTION:
Draw a 3D block. (x,y,z) is center of the block. (lx,ly,lz) is the size
of the block. You can specify color by c. Or you can use pre-defined
variable for c. Available pre-defined variables are as follows.
&BiBlack
&BiBlue
&BiRed
&BiMagenta
&BiGreen
&BiCyan
&BiYellow
&BiWhite
Eg)BiCube2G(0,0,0,2,2,2,&BiGreen);
REFERENCEF
BiLine2G,BiFalcon2G,BiPlane2G,BiPset2G
REFERENCE:
NAME:BiCyan CATEGORY:Pre-Defined Variable DEFINITION: BICOLOR BiCyan; DESCRIPTION: Cyan(R=0,G=255,B=255) REFERENCE:
NAME:BiDeviceInitialize CATEGORY:FUNCTION DEFINITION: void BiDeviceInitialize(void); DESCRIPTION: Initialize device library. Call once at the beginning of the program. REFERENCE:
NAME:BiDivPoint CATEGORY:MACRO DEFINITION: void BiDivPoint(BIPOINT *ret,BIPOINT *src,double d); (equivalent) PARAMETER: BIPOINT *ret; Accept result BIPOINT *src; Vector to be devided double d; Division factor DESCRIPTION: Divide *src by d. Result will be set to *ret. REFERENCE:
NAME:BiDivPoint2 CATEGORY:MACRO DEFINITION: void BiDivPoint2(BIPOINT2 *ret,BIPOINT2 *src,double d); (equivalent) PARAMETER: BIPOINT2 *ret; Accept result BIPOINT2 *src; Vector to be divided double d; Division factor DESCRIPTION: Divide *src by d. Result will be set to *ret. REFERENCE:
NAME:BiDrawCircle2 CATEGORY:FUNCTION DEFINITION: void BiDrawCircle2(BIPOINTS *s,long radx,long rady,BICOLOR *c); PARAMETER: BIPOINTS *s; Center of the circle long radx,rady; Radius in X and Y direction. BICOLOR *c; Color DESCRIPTION: Draw a filled ellipse. REFERENCE:
NAME:BiDrawEmptyCircle2 CATEGORY:FUNCTION DEFINITION: void BiDrawEmptyCircle2(BIPOINTS *s,long radx,long rady,BICOLOR *col); DESCRIPTION: Draw an empty ellipse. REFERENCE:
NAME:BiDrawEmptyPolyg2 CATEGORY:FUNCTION DEFINITION: void BiDrawEmptyPolyg2(int n,BIPOINTS *s,BICOLOR *col); DESCRIPTION: Draw an empty polygon. REFERENCE:
NAME:BiDrawEmptyRect2 CATEGORY:FUNCTION DEFINITION: void BiDrawEmptyRect2(BIPOINTS *s1,BIPOINTS *s2,BICOLOR *col); PARAMETER: BIPOINTS *s1,*s2; Two end point of the rectangle BICOLOR *col; Color DESCRIPTION: Draw an empty rectangle. REFERENCE:
NAME:BiDrawGroundSky CATEGORY:FUNCTION DEFINITION: void BiDrawGroundSky(BICOLOR *grd,BICOLOR *sky); PARAMETER: BICOLOR *grd,*sky; Ground and sky color. DESCRIPTION: Draw ground and sky. REFERENCE:
NAME:BiDrawLine2 CATEGORY:FUNCTION DEFINITION: void BiDrawLine2(BIPOINTS *s1,BIPOINTS *s2,BICOLOR *c); PARAMETER: BIPOINTS *s1,*s2; Two end point of a line BICOLOR *c; Color DESCRIPTION: Draw a 2D line. REFERENCE:
NAME:BiDrawMarker2
CATEGORY:FUNCTION
DEFINITION:
void BiDrawMarker2(BIPOINTS *s,int mkType,BICOLOR *col);
PARAMETER:
BIPOINTS *s; Position of the marker
int mkType; Marker type
BICOLOR *col; Color of the marker
DESCRIPTION:
Draw a marker. Marker type can be chosen from:
BIMK_RECT Rectangle
BIMK_CIRCLE Circle
BIMK_CROSS X mark
REFERENCE:
NAME:BiDrawPc2 NAME:BiDrawPict2 CATEGORY:FUNCTION DEFINITION: void BiDrawPc2(BIPC2 *pic,BIPOINTS *sc); PARAMETER: BIPC2 *pic; 2D Drawing object BIPOINTS *sc; Top-left position in screen coordinate DESCRIPTION: Draw a 2D drawing object. REFERENCE:
NAME:BiDrawPc2Zoom NAME:BiDrawPict2Zoom CATEGORY:FUNCTION DEFINITION: void BiDrawPc2Zoom(BIPC2 *pic,BIPOINTS *s1,BIPOINTS *s2); PARAMETER: BIPC2 *pic; 2D drawing object BIPOINTS *s1; Top-left position in screen coordinate BIPOINTS *s2; Bottom-right position in screen coordinate DESCRIPTION: Draw a 2D drawing object with magnification/inversion. REFERENCE:
NAME:BiDrawPolyg2 CATEGORY:FUNCTION DEFINITION: void BiDrawPolyg2(int ns,BIPOINTS *s,BICOLOR *c); PARAMETER: int ns; Number of coordinates BIPOINTS *s; Coordinates BICOLOR *c; Color DESCRIPTION: Draw a filled polygon. REFERENCE:
NAME:BiDrawPolyline2 CATEGORY:FUNCTION DEFINITION: void BiDrawPolyline2(int n,BIPOINTS *s,BICOLOR *col); PARAMETER: int n; Number of coordinates BIPOINTS *s; Coordinates BICOLOR *col; Color DESCRIPTION: Draw a polyline. REFERENCE:
NAME:BiDrawPset2 CATEGORY:FUNCTION DEFINITION: void BiDrawPset2(BIPOINTS *s,BICOLOR *c); PARAMETER: BIPOINTS *s; Position of the point BICOLOR *c; Color DESCRIPTION: Draw a dot. REFERENCE:
NAME:BiDrawRect2 CATEGORY:FUNCTION DEFINITION: void BiDrawRect2(BIPOINTS *s1,BIPOINTS *s2,BICOLOR *c) PARAMETER: BIPOINTS *s1,*s2; Top-left and bottom-right coordinates of a rectangle. BICOLOR *c; Color DESCRIPTION: Draw a filled rectangle. REFERENCE:
NAME:BiDrawString2 CATEGORY:FUNCTION DEFINITION: void BiDrawString2(BIPOINTS *s,char *str,BICOLOR *c) PARAMETER: BIPOINTS *s; Screen coordinate of bottom-left of the string char *str; String BICOLOR *c; Color DESCRIPTION: Draw a string. REFERENCE:
NAME:BiDrawText2
CATEGORY:FUNCTION
DEFINITION:
void BiDrawText2(BIPOINTS *s,char *str[],int h,int v,BICOLOR *c)
PARAMETER:
BIPOINTS *s; Position in screen coordinate
char *str[]; Text
int h,v; Alignment(horizontal,vertical)
BICOLOR *c; Color
DESCRIPTION:
Draw a text. Text is an array of char pointer like:
char *str[3];
str[0]="ABC";
str[1]="DEF";
str[2]=NULL;
Last element must be NULL.
Horizontal alignment can be chosen from:
BIAL_CENTER s->x is the center of the text
BIAL_LEFT s->x is the left end of the text
BIAL_RIGHT s->x is the right end of the text
Vertical alignment can be chosen from:
BIAL_CENTER s->y is the center of the text
BIAL_TOP s->y is the top of the text
BIAL_BOTTOM s->y is the bottom of the text
REFERENCE:
NAME:BiEpsClose CATEGORY:FUNCTION DEFINITION: int BiEpsClose(void); DESCRIPTION: Terminate PS output originated by BiEpsOpen function. REFERENCE:
NAME:BiEpsOpen DEFINITION: int BiEpsOpen(char *fn,int wid,int hei); PARAMETER: char *fn; PS file name int wid; Width of PS file int hei; Height of PS file RETURN: BI_OK No error BI_ERR Error occured DESCRIPTION: Originate PS output. Blue Impulse SDK will record objects that are drawn between BiEpsOpen and BiEpsClose. Then output them to PS file. REFERENCE:
NAME:BiFalcon2G DEFINITION: void BiFalcon2G(BIPOSATT *pos); DESCRIPTION: Draw a F-16 at *pos. REFERENCE:
NAME:BiFatal CATEGORY:FUNCTION DEFINITION: int BiFatal(void); DESCRIPTION: This function used to return BI_ON when some critical event happend to the program. It is almost for Windows3.1. This function remains just for compatibility. You don't have to use this function any more. REFERENCE:
NAME:BiFlushBuffer CATEGORY:FUNCTION DEFINITION: void BiFlushBuffer(void); DESCRIPTION: Flush 3D object recorded to Z-Sort buffer into frame buffer. REFERENCE:
NAME:BiFree CATEGORY:FUNCTION DEFINITION: void BiFree(void *ptr); DESCRIPTION: Free a memory block allocated by BiMalloc function. REFERENCE:
NAME:BiFreePolyg NAME:BiFreePolyg2 CATEGORY:FUNCTION DEFINITION: void BiFreePolyg(BIPOLYGON *plg); void BiFreePolyg2(BIPOLYGON2 *plg); PARAMETER: BIPOLYGON *plg; Polygon to be released BIPOLYGON2 *plg; Polygon to be released DESCRIPTION: Release the memory block used by *plg. Do not use this function to the polygons that are not created by Blue Impulse SDK. REFERENCE:
NAME:BiFreeSolidFont CATEGORY:FUNCTION DEFINITION: void BiFreeSolidFont(BI3DFONT *fnt); PARAMETER: BI3DFONT *fnt; 3D font to be released DESCRIPTION: Release a 3D font created by BiMakeStdSolidFont or BiMakeStdWireFont. REFERENCE:
NAME:BiFreeSrf NAME:BiFreeSrfModel CATEGORY:FUNCTION DEFINITION: void BiFreeSrf(BISRF *srf); DESCRIPTION: Free memory block allocated by BiLoadSrf. REFERENCE:
NAME:BiGetClipScreenFrame CATEGORY:FUNCTION DEFINITION: void BiGetClipScreenFrame(BIPOINTS *l,BIPOINTS *r) PARAMETER: BIPOINTS *l,*r; Clip Frame(Just for calculation, not for drawing) DESCRIPTION: Get clip frame set by BiSetClipScreenFrame. REFERENCE:
NAME:BiGetFldElevation
NAME:BiGetFieldElevation
CATEGORY:FUNCTION
DEFINITION:
int BiGetFldElevation
(int *trId,char tag[],real *elv,BIPOINT *ev,BIPOINT *uv,
BIFLD *fld,BIPOSATT *pos,BIPOINT *p,long hdg);
PARAMETER:
int *trId; Accept terrain ID(NULL is acceptable)
char tag[]; Accept terrain name(NULL is acceptable)
real *elv; Accept terrain elevation(NULL is acceptable)
BIPOINT *ev; Accept viewing vector at reference point(NULL is acceptable)
BIPOINT *uv; Accept up vector at reference point(NULL is acceptable)
BIFLD *fld; Field object
BIPOSATT *pos; Position and attitude of the field
BIPOINT *p; Reference position
long hdg; Reference heading(if ev,uv are both NULL, set hdg 0)
RETURN:
BI_IN Reference position is inside(above) terrain object
BI_OUT Reference position is not inside(above) terrain object
DESCRIPTION:
Check if the reference position *p is inside a terrain object of
a field *fld at *pos. If *p is inside(above) a terrain object,
this function will return *trId,tag[],*elv,*ev,*uv (except NULL).
REFERENCE:
NAME:BiGetFldGroundSky NAME:BiGetFieldGroundSky CATEGORY:FUNCTION DEFINITION: int BiGetFldGroundSky(BICOLOR *gnd,BICOLOR *sky,BIFLD *fld); PARAMETER: BICOLOR *gnd; Ground color BICOLOR *sky; Sky color BIFLD *fld; Field object RETURN: BI_OK Always BI_OK DESCRIPTION: Get ground and sky color of the field. REFERENCE:
NAME:BiGetFldNumObj NAME:BiGetFieldNumObj CATEGORY:FUNCTION DEFINITION: int BiGetFldNumObj(int *nObj,BIFLD *fld,int typ); DESCRIPTION: Get a number of object contained in a Field object. The parameter "typ" specifies the type of an object as follows. BIFLD_PC2MAP 2D Drawing Object (as a map) BIFLD_SRF Polygon model BIFLD_PC2 2D Drawing Object (as a signboard) BIFLD_TER Terrain Object BIFLD_RGN Rectangular region BIFLD_FLD Field REFERENCE:
NAME:BiGetFldObjId NAME:BiGetFieldObjId CATEGORY:FUNCTION DEFINITION: int BiGetFldObjId(int *oId,char tag[],BIFLD *fld,int typ,int id); PARAMETER: int *oId; Object ID(Specified in Gefil) char tag[]; Message of the objet(Specified in Gefil) BIFLD *fld; Field object int typ; Type of the object int id; Serial number DESCRIPTION: Get an object-Id and a message specified in Gefil. The length of "tag" must be larger than BIFLD_TAG_LEN. The parameter "typ" specifies the type of the object as follows. BIFLD_PC2MAP 2D Drawing Object (as a map) BIFLD_SRF Polygon model BIFLD_PC2 2D Drawing Object (as a signboard) BIFLD_TER Terrain Object BIFLD_RGN Rectangular region BIFLD_FLD Field The parameter "id" specifies the serial number of the target object in the field. Id should be 0 through (number of objects in the field)-1. The number of objects is obtained by BiGetFldNumObj function. REFERENCE:
NAME:BiGetFldObjPosition
NAME:BiGetFieldObjPosition
CATEGORY:FUNCTION
DEFINITION:
int BiGetFldObjPosition
(BIPOSATT *pos,BIFLD *fld,BIPOSATT *lay,int typ,int id);
PARAMETER:
BIPOSATT *pos; Receives a position and an attitude of the object
to this pointer.
BIFLD *fld; Field object
BIPOSATT *lay; Position and attitude of the Field object.
int typ; Type of the object
int id; Id of the object
DESCRIPTION:
Get a position and an attitude of an object that is contained in
the Field object. The parameter "typ" specifies the type of the
object as follows.
BIFLD_PC2MAP 2D Drawing Object (as a map)
BIFLD_SRF Polygon model
BIFLD_PC2 2D Drawing Object (as a signboard)
BIFLD_TER Terrain Object
BIFLD_RGN Rectangular region
BIFLD_FLD Field
The parameter "id" specifies the serial number of the target object
in the field. Id should be 0 through (number of objects in the field)-1.
The number of objects is obtained by BiGetFldNumObj function.
REFERENCE:
NAME:BiGetFldRegion
NAME:BiGetFieldRegion
CATEGORY:FUNCTION
DEFINITION:
int BiGetFldRegion
(int *rgId,char tag[],BIFLD *fld,BIPOSATT *pos,BIPOINT *p)
PARAMETER:
int *rgId; Accept region id (NULL is acceptable)
char tag[]; Accept region name(NULL is acceptable)
BIFLD *fld; Field object
BIPOSATT *pos; Position and attitude of the field
BIPOINT *p; Reference Point
RETURN:
BI_IN *p is inside a rectangular region
BI_OUT *p is not inside a rectangular region
DESCRIPTION:
Check if *p is inside a rectangular region of *fld at *pos.
If *p is inside a rectangular region, this function returns
the id and the name of the rectangular region.
REFERENCE:
NAME:BiGetFldSrfCollision
NAME:BiGetFieldSrfCollision
CATEGORY:FUNCTION
DEFINITION:
int BiGetFldSrfCollision
(int *sfId,char tag[],BIFLD *fld,BIPOSATT *pos,BIPOINT *p);
PARAMETER:
int *sfId; Polygon model ID(NULL is acceptable)
char tag[]; Polygon model name(NULL is acceptable)
BIFLD *fld; Field object
BIPOSATT *pos; Position and attitude of the field
BIPOINT *p; Reference Position
real bump; Tolerance
RETURN:
BI_IN Collided
BI_OUT Not collided
DESCRIPTION:
Check if *p is collided with a polygon model of *fld. If collided,
this function will return *sfId and tag[].
REFERENCE:
NAME:BiGetOrbitViewer2G DEFINITION: void BiGetOrbitViewer2G(BIPOSATT *pos); DESCRIPTION: Get a current viewpoint controled by BiOrbitViewer2G REFERENCE:
NAME:BiGetSrfRadius CATEGORY:FUNCTION DEFINITION: void BiGetSrfRadius(real *rad,BISRF *srf); DESCRIPTION: Calculate a maximum bounding box radius of *srf. (The length between the origin of *srf and farthest point of bounding box). REFERENCE:
NAME:BiGetStdProjection CATEGORY:FUNCTION DEFINITION: void BiGetStdProjection(BIPROJ *prj); DESCRIPTION: Get a standare projection information with 60 degree of viewing area. REFERENCE:
NAME:BiGetWindowSize CATEGORY:FUNCTION DEFINITION: void BiGetWindowSize(long *wid,long *hei); DESCRIPTION: Get a current window size. REFERENCE:
NAME:BiGraphInitialize CATEGORY:FUNCTION DEFINITION: void BiGraphInitialize(char *work,unsigned wSize); PARAMETER: char *work; Workarea used by graphics library unsigned wSize; Workarea size DESCRIPTION: Initialize Graphics Library. The larger the workarea size, the more objects can be drawn. REFERENCE:
NAME:BiGraphSetBuffer2 NAME:BiGraphSetBuffer3 CATEGORY:FUNCTION DEFINITION: void BiGraphSetBuffer2(char *work,unsigned long wSize); void BiGraphSetBuffer3(char *work,unsigned long wSize); PARAMETER: char *work; Additional workarea of graphics library unsigned wSize; Workarea size. DESCRIPTION: These functions are the legacy of (stupid) Windows3.1. Actually, much beauty is lost due to shameful specs of Windows3.1 all over this toolkit. You don't have to use these functions. You can just pass enough large workarea by BiGraphInitialize. REFERENCE:
NAME:BiGreen CATEGORY:Pre-Defined Variable DEFINITION: BICOLOR BiGreen; DESCRIPTION: Green(R=0,G=255,B=0) REFERENCE:
NAME:BiInBetweenAngle CATEGORY:FUNCTION DEFINITION: void BiInBetweenAngle(BIANGLE *dst,BIANGLE *a1,BIANGLE *a2,real t); DESCRIPTION: Interpolate attitudes *a1 and *a2 by (t:1-t). Then return it to *dst. REFERENCE:
NAME:BiInBetweenPoint CATEGORY:FUNCTION DEFINITION: void BiInBetweenPoint(BIPOINT *dst,BIPOINT *p1,BIPOINT *p2,real t); DESCRIPTION: Interpolate coordinate *p1 and *p2 by (t:1-t). Then return it to *dst. REFERENCE:
NAME:BiInkey
CATEGORY:FUNCTION
DEFINITION:
int BiInkey(void);
DESCRIPTION:
Read key code from key buffer. BiUpdateDevice function must be called
at the top of the loop like:
while(1)
{
BiUpdateDevice();
if(BiInkey()==BIKEY_ESC)
{
break;
}
/* Do something */
}
Please refer to BIKEY_A,BIKEY_B,.... for key code. (EG. A key->BIKEY_A)
Following expression will flush key buffer.
while(BiInkey()!=BIKEY_NULL); /* Clear Key Buffer */
REFERENCE:
NAME:BiInnerPoint CATEGORY:MACRO DEFINITION: double BiInnerPoint(BIPOINT *a,BIPOINT *b); (equivalent) PARAMETER: BIPOINT *a,*b; Vectors RETURN: double Inner Product (dot product) of *a and *b DESCRIPTION: Calculate Inner Product of *a and *b. REFERENCE:
NAME:BiInnerPoint2 CATEGORY:MACRO DEFINITION: double BiInnerPoint2(BIPOINT2 *a,BIPOINT2 *b); (equivalent) PARAMETER: BIPOINT2 *a,*b; Vectors RETURN: double Inner Product (dot product) of *a and *b DESCRIPTION: Calculate Inner Product of *a and *b. REFERENCE:
NAME:BiInsCircle CATEGORY:FUNCTION DEFINITION: int BiInsCircle(BIPOINT *p,double r,BICOLOR *col); PARAMETER: BIPOINT *p; Center of the circle double r; Radius of the circle BICOLOR *col; Color DESCRIPTION: Add a circle to Z-Sort buffer. (If you are using OpenGL/GL implementation, the object is directly drawn to frame buffer). REFERENCE:
NAME:BiInsClickable
NAME:BiInsClickableLine
NAME:BiInsClickablePolyg
DEFINITION:
int BiInsClickable
(BIPOINT *p,real rad,int pix,int i1,int i2,int i3,void *ext);
int BiInsClickablePolyg
(int np,BIPOINT p[],BIVECTOR *n,int i1,int i2,int i3,void *extra);
int BiInsClickableLine
(BIPOINT *p1,BIPOINT *p2,int i1,int i2,int i3,void *extra);
CATEGORY:FUNCTION
RETURN:
BI_OK Success
BI_ERR Failed (Clickable buffer is not registered,
Buffer overflow, etc....)
PARAMETER:
BIPOINT *p; Clickable Object Position
real rad; Minimum Radius (in 3D coordinate)
int pix; Minimum Radius (in pixels)
int np; Number of coordinates of clickable polygon
BIPOINT p[]; Coordinates of clickable polygon
BIPOINT *n; Normal of the clickable polygon
(NULL means two sided polygon)
BIPOINT *p1,*p2;
Two ends of clickable line segment.
int i1,i2,i3; Object ID (use freely)
void *ext; Additional information of the object(NULL is acceptable)
DESCRIPTION:
Register clickable object. It will be convenient to call right after
BiIns???? functions. IDs and additional information can be retrieved
by BiCheckClicked function.
REFERENCE:
NAME:BiInsFld NAME:BiInsField CATEGORY:FUNCTION DEFINITION: void BiInsFld(BIFLD *fld,BIPOSATT *pos) PARAMETER: BIFLD *fld; Field Object BIPOSATT *pos; Position and attitude of the field DESCRIPTION: Add a field object to Z-Sort buffer. REFERENCE:
NAME:BiInsLine CATEGORY:FUNCTION DEFINITION: int BiInsLine(BIPOINT *p1,BIPOINT *p2,BICOLOR *col); PARAMETER: BIPOINT *p1,*p2; Two end of line segment BICOLOR *col; Color DESCRIPTION: Add a line segment to Z-Sort buffer. (If you are using OpenGL/GL implementation, the object is directly drawn to frame buffer). REFERENCE:
NAME:BiInsMarker
CATEGORY:FUNCTION
DEFINITION:
int BiInsMarker(BIPOINT *p,BICOLOR *col,int mkType);
PARAMETER:
BIPOINT *p; Position of the marker
BICOLOR *col; Color
int mkType; Marker type
DESCRIPTION:
Add a marker to Z-Sort buffer.
(If you are using OpenGL/GL implementation, the object is directly
drawn to frame buffer).
Marker type can be chosen from:
BIMK_RECT Rectangle
BIMK_CIRCLE Circle
BIMK_CROSS X mark
REFERENCE:
NAME:BiInsPc2 NAME:BiInsPict2 CATEGORY:FUNCTION DEFINITION: void BiInsPc2(BIPC2 *pic,BIPOSATT *pos); PARAMETER: BIPC2 *pic; 2D Drawing object BIPOSATT *pos; Position and attitude DESCRIPTION: Add a 2D Drawing Object to Z-Sort buffer. REFERENCE:
NAME:BiInsPolyg CATEGORY:FUNCTION DEFINITION: int BiInsPolyg(int n,BIPOINT p[],BICOLOR *col); PARAMETER: int n; Number of coordinates BIPOINT p[]; Coordinates BICOLOR *col; Color DESCRIPTION: Add a two-sided polygon to Z-Sort buffer. (If you are using OpenGL/GL implementation, the object is directly drawn to frame buffer). REFERENCE:
NAME:BiInsPolygFast CATEGORY:FUNCTION DEFINITION: int BiInsPolygFast(int n,BIPOINT p[],BIPOINT *cen,BIPOINT *nom,BICOLOR *col); PARAMETER: int n; Number of coordinates BIPOINT p[]; Coordinates BIPOINT *cen; Center of the polygon(NULL is acceptable) BIPOINT *nom; Normal of the polygon BICOLOR *col; Color DESCRIPTION: Add a single-sided polygon to Z-Sort buffer. (If you are using OpenGL/GL implementation, the object is directly drawn to frame buffer). This oplygon is invisible from the behind. If you specify NULL to *cen, Blue Impulse SDK will automatically calculate the center. (You also can shift the center to control the priority the polygon). REFERENCE:
NAME:BiInsPset CATEGORY:FUNCTION DEFINITION: int BiInsPset(BIPOINT *p,BICOLOR *col); PARAMETER: BIPOINT *p; Coordinate BICOLOR *col; Color DESCRIPTION: Add a dot to Z-Sort buffer. (If you are using OpenGL/GL implementation, the object is directly drawn to frame buffer). REFERENCE:
NAME:BiInsRoundPolyg CATEGORY:FUNCTION DEFINITION: int BiInsRoundPolyg(int n,BIPOINT p[],BIPOINT n[],BICOLOR *col); PARAMETER: int n; Number of coordinates BIPOINT p[]; Coordinates(0...n-1) BIPOINT n[]; Normal correspond to each coordinates(0...n-1) BICOLOR *col; Color DESCRIPTION: Add a smooth-shaded polygon to Z-Sort buffer. (If you are using OpenGL/GL implementation, the object is directly drawn to frame buffer). This polygon will be smooth shaded if you are using OpenGL/GL implementation. Otherwise, it is same as one-sided polygon. REFERENCE:
NAME:BiInsSolidString CATEGORY:FUNCTION DEFINITION: void BiInsSolidString(BIPOSATT *pos,BI3DFONT *fnt,char str[],int h,int v); PARAMETER: BIPOSATT *pos; Position and attitude BI3DFONT *fnt; 3D font created by BiMakeStdSolidFont/BiMakeStdWireFont char str[]; String int h,v; Alignment (Refer to BiDrawText2) DESCRIPTION: Add a 3D string to Z-Soft buffer. REFERENCE:
NAME:BiInsSolidText CATEGORY:FUNCTION DEFINITION: void BiInsSolidText(BIPOSATT *pos,BI3DFONT *fnt,char *str[],int h,int v); PARAMETER: BIPOSATT *pos; Position and attitude BI3DFONT *fnt; 3D font created by BiMakeStdSolidFont/BiMakeStdWireFont char *str[]; Text int h,v; Alignment (Refer to BiDrawText2) DESCRIPTION: Add a 3D text to Z-Soft buffer. REFERENCE:
NAME:BiInsSrf NAME:BiInsSrfModel CATEGORY:FUNCTION DEFINITION: int BiInsSrf(BISRF *mdl,BIPOSATT *pos); PARAMETER: BISRF *mdl; Polygon Model BIPOSATT *pos; Position and attitude DESCRIPTION: Add a polygon model to Z-Sort buffer. (If you are using OpenGL/GL implementation, the object is directly drawn to frame buffer). This function will add one polygon model as an element. If two polygon model are drawn closely to each other, accuracy of the final image may become low. In such case, use BiInsSrfDivide instead of BiInsSrf. CAUTION: Do not delete polygon model until BiFlushBuffer. REFERENCE:
NAME:BiInsSrfDivide NAME:BiInsSrfModelDivide CATEGORY:FUNCTION DEFINITION: int BiInsSrf(BISRF *mdl,BIPOSATT *pos); PARAMETER: BISRF *mdl; Polygon model BIPOSATT *pos; Position and attitude DESCRIPTION: Add a polygon model to Z-Sort buffer. (If you are using OpenGL/GL implementation, the object is directly drawn to frame buffer). This function will be more accurate than BiInsSrf. But slightly slower than BiInsSrf. REFERENCE:
NAME:BiInsString
CATEGORY:FUNCTION
DEFINITION:
int BiInsString(BIPOINT *p,char *str,BICOLOR *col,int h,int v);
PARAMETER:
BIPOINT *p; Position of the string
char *str; String
BICOLOR *col; Color
int h,v; Alignment(horizontal,vertical)
DESCRIPTION:
Add a string to Z-Sort buffer.
(If you are using OpenGL/GL implementation, the object is directly
drawn to frame buffer).
Horizontal alignment can be chosen from:
BIAL_CENTER s->x is the center of the text
BIAL_LEFT s->x is the left end of the text
BIAL_RIGHT s->x is the right end of the text
Vertical alignment can be chosen from:
BIAL_CENTER s->y is the center of the text
BIAL_TOP s->y is the top of the text
BIAL_BOTTOM s->y is the bottom of the text
REFERENCE:
NAME:BiInsTer NAME:BiInsTerrMesh CATEGORY:FUNCTION DEFINITION: int BiInsTer(BITER *ter,BIPOSATT *pnt); PARAMETER: BITER *ter; Terrain Object BIPOSATT *pnt; Position and attitude of terrain object DESCRIPTION: Add a terrain object to Z-Sort buffer. (If you are using OpenGL/GL implementation, the object is directly drawn to frame buffer). REFERENCE:
NAME:BiInsText
CATEGORY:FUNCTION
DEFINITION:
int BiInsText(BIPOINT *p,char *str[],BICOLOR *col,int h,int v);
PARAMETER:
BIPOINT *p; Position of the text
char *str[]; Text
BICOLOR *col; Color
int h,v; Alignment(horizontal,vertical)
DESCRIPTION:
Add a text object to Z-Sort buffer.
(If you are using OpenGL/GL implementation, the object is directly
drawn to frame buffer).
Horizontal alignment can be chosen from:
BIAL_CENTER s->x is the center of the text
BIAL_LEFT s->x is the left end of the text
BIAL_RIGHT s->x is the right end of the text
Vertical alignment can be chosen from:
BIAL_CENTER s->y is the center of the text
BIAL_TOP s->y is the top of the text
BIAL_BOTTOM s->y is the bottom of the text
REFERENCE:
NAME:BiKey CATEGORY:FUNCTION DEFINITION: int BiKey(int kcode); RETURN: BI_ON the key is pressed BI_OFF the key is not pressed DESCRIPTION: Check if the key specified by kcode is pressed or not. Please refer to BIKEY_A,BIKEY_B,.... for key code. (EG. A key->BIKEY_A) CAUTION: BiKey function will not clear key buffer. If your application checks key press by BiKey, it is recommended to flush key buffer right after BiKey function detected key press. REFERENCE:
NAME:BiKey2G
DEFINITION:
int BiKey2G(void);
DESCRIPTION:
Return key code after waiting for key press. Typical Key codes are
as follows
BIKEY_A
: A`Z
BIKEY_Z
BIKEY_SPACE SPACE
BIKEY_LEFT Left Arrow
BIKEY_RIGHT Right arrow
BIKEY_UP Up arrow
BIKEY_DOWN Down Arrow
REFERENCE:
NAME:BiKeyToAscii CATEGORY:FUNCTION DEFINITION: int BiKeyToAscii(int bik) DESCRIPTION: Convert Blue Impulse SDK key code into ASCII character. REFERENCE:
NAME:BiKillCLoop CATEGORY:FUNCTION DEFINITION: int BiKillCLoop(BIPOLYGON *neo,int nPl,BIPOLYGON *pl) PARAMETER: BIPOLYGON *neo Accept a polygon with C-Loop eliminated int nPl Total number o polygons BIPOLYGON *pl P-Loop and C-Loop(pl[0]:P-Loop pl[1...nPl-1]:C-Loop) RETURN: BI_OK C-Loops are successfully eliminated BI_ERR Could not eliminate C-Loops DESCRIPTION: Eliminate C-Loops from P-Loop and make it single polygon and return it to *neo. If some edges are intersecting or if more than two conseqtive vertices are identical, this function may fail. REFERENCE:
NAME:BiKillCLoop2 CATEGORY:FUNCTION DEFINITION: int BiKillCLoop2(BIPOLYGON2 *dst,int nPl,BIPOLYGON2 *pl) PARAMETER: BIPOLYGON2 *neo Accept a polygon with C-Loop eliminated int nPl Total number o polygons BIPOLYGON2 *pl P-Loop and C-Loop(pl[0]:P-Loop pl[1...nPl-1]:C-Loop) RETURN: BI_OK C-Loops are successfully eliminated BI_ERR Could not eliminate C-Loops DESCRIPTION: Eliminate C-Loops from P-Loop and make it single polygon and return it to *neo. If some edges are intersecting or if more than two conseqtive vertices are identical, this function may fail. REFERENCE:
NAME:BiLarger CATEGORY:MACRO DEFINITION: #define BiLarger(a,b) ((a)>(b) ? (a) : (b)) DESCRIPTION: Return larger one of a and b. REFERENCE:
NAME:BiLength2 CATEGORY:FUNCTION DEFINITION: double BiLength2(double x,double y); PARAMETER: double x,y; Vector RETURN: double Length of the vector DESCRIPTION: Calculate the length of the vector (x,y). REFERENCE:
NAME:BiLength3 CATEGORY:MACRO DEFINITION: double BiLength3(double x,double y,double z); (equivalent) PARAMETER: double x,y,z; Vector RETURN: double Length of the vector DESCRIPTION: Calculate the length of the vector (x,y,z). REFERENCE:
NAME:BiLengthPoint2 CATEGORY:MACRO DEFINITION: double BiLengthPoint2(BIPOINT2 *p); (equivalent) PARAMETER: BIPOINT2 *p; Vector RETURN: double Lenvth of the vector DESCRIPTION: Calculate the length of the vector *p REFERENCE:
NAME:BiLengthPoint3 CATEGORY:MACRO DEFINITION: double BiLengthPoint3(BIPOINT *p); (equivalent) PARAMETER: BIPOINT *p; Vector RETURN: double The length of the vector DESCRIPTION: Calculate the length of the vector *p. REFERENCE:
NAME:BiLimLineToLine NAME:BiLimLineToLine2 CATEGORY:MACRO DEFINITION: void BiLimLineToLine(BILINE *dst,BILIMLINE *src); (equivalent) void BiLimLineToLine2(BILINE2 *dst,BILIMLINE *src); (equivalent) PARAMETER: BILINE *src; Destination BILIMLINE *dst; Original BILINE2 *src; Destination BILIMLINE2 *dst; Original DESCRIPTION: Convert a line segment *src into a line *dst. REFERENCE:
NAME:BiLine2CrossPoint
CATEGORY:FUNCTION
DEFINITION:
int BiLine2CrossPoint(BIPOINT *o,BILINE2 *l1,BILINE2 *l2);
PARAMETER:
BIPOINT *o Accept the result
BILINE2 *l1 Line 1
BILINE2 *l2 Line 2
RETURN:
BI_OK Successfully calculated
BI_ERR Failed (Eg. two lines are parallel)
DESCRIPTION:
Calculate the intersecting point of two lines)
QźüĚđ_đvZľÜˇB
REFERENCE:
NAME:BiLine2CrossStatus
CATEGORY:FUNCTION
DEFINITION:
int BiLine2CrossStatus(BILIMLINE2 *ln1,BILIMLINE2 *ln2);
PARAMETER:
BILIMLINE2 *ln1,*ln2; Line segment 1/2
RETURN:
BI_CRS_SAME Identical
BI_CRS_PARALLEL Parallel
BI_CRS_ON_LINE On the same straightline
BI_CRS_ONESIDE_SAME Shareing one point
BI_CRS_CROSS Crossing
BI_CRS_NOCROSS Not parallel, Not crossing
BI_CRS_LN1_TOUCH_LN2 Line1 is touching Line2
BI_CRS_LN2_TOUCH_LN1 Line2 is touching Line1
DESCRIPTION:
Calculate the relation between two line segments
REFERENCE:
NAME:BiLine2G
DEFINITION:
void BiLine2G
(float x1,float y1,float z1,float x2,float y2,float z2,BICOLOR *c);
DESCRIPTION:
Draw a 3D line. You can specify color by c. Or you can use pre-defined
variable for c. Available pre-defined variables are as follows.
&BiBlack
&BiBlue
&BiRed
&BiMagenta
&BiGreen
&BiCyan
&BiYellow
&BiWhite
REFERENCE:
NAME:BiLineProjectionVector CATEGORY:FUNCTION DEFINITION: void BiLineProjectionVector(BIPOINT *v,BIPOINT *org,BILINE *ln) PARAMETER: BIPOINT *v; Accept the result BIPOINT *org; Coordinage BILINE *ln; Line DESCRIPTION: Find the point on the line *ln that is closest to *org. REFERENCE:
NAME:BiLineToLimLine NAME:BiLineToLimLine2 CATEGORY:MACRO DEFINITION: void BiLineToLimLine(BILIMLINE *dst,BILINE *src); (equivalent) void BiLineToLimLine2(BILIMLINE2 *dst,BILINE2 *src); (equivalent) PARAMETER: BILIMLINE *dst; Destination BILINE *src; Original BILIMLINE2 *dst; Destination BILINE2 *src; Original DESCRIPTION: Convert a line *src into a line segment *dst. REFERENCE:
NAME:BiLoadFld CATEGORY:FUNCTION DEFINITION: int BiLoadFld(BIFLD *fld,char fn[]) PARAMETER: BIFLD *fld; Field object char fn[]; Filename RETURN: BI_OK Success BI_ERR Error DESCRIPTION: Read a field object file into *fld. REFERENCE:
NAME:BiLoadPc2
NAME:BiLoadPict2
CATEGORY:FUNCTION
DEFINITION:
int BiLoadPc2(BIPC2 *pic,char *fn);
PARAMETER:
BIPC2 *pic; 2D Drawing Object
char *fn; Filename
DESCRIPTION:
Read a 2D Drawing Object file into *pic.
REFERENCE:
NAME:BiLoadPc2FromString NAME:BiLoadPict2FromString CATEGORY:FUNCTION DEFINITION: int BiLoadPc2FromString(BIPC2 *pic,char *str[]); PARAMETER: BIPC2 *pic; 2D Drawing Object char *str[]; Source string array RETURN: BI_OK Success BI_ERR Failed DESCRIPTION: Read str and create a 2D Drawing Object. (str is used instead of a file) REFERENCE:
NAME:BiLoadSrf CATEGORY:FUNCTION DEFINITION: int BiLoadSrf(BISRF *mdl,char *fn); PARAMETER: BISRF *mdl; Polygon Model char *fn; Filename DESCRIPTION: Read a polygon model file fn[] into *mdl. REFERENCE:
NAME:BiLoadSrfFromString CATEGORY:FUNCTION DEFINITION: int BiLoadSrfFromString(BISRF *mdl,char *str[]); PARAMETER: BISRF *mdl; Polygon model char *str[]; Source string array RETURN: BI_OK Success BI_ERR Failed DESCRIPTION: Read str and create a polygon model. (str is used instead of a file) REFERENCE:
NAME:BiLoadTer NAME:BiLoadTerrMesh CATEGORY:FUNCTION DEFINITION: int BiLoadTer(BITER *tm,char *fn); PARAMETER: BITER *tm; Terrain object char *fn; Filename DESCRIPTION: Read a terrain object file fn[] into *tm. REFERENCE:
NAME:BiLoadTerFromString NAME:BiLoadTerrMeshFromString CATEGORY:FUNCTION DEFINITION: int BiLoadTerFromString(BITER *tm,char *str[]); PARAMETER: BITER *tm; Terrain object char *str[]; Source string array RETURN: BI_OK Success BI_ERR Failed DESCRIPTION: Read str and create a terrain object. (str is used instead of a file) REFERENCE:
NAME:BiMagenta CATEGORY:Pre-Defined Variable DEFINITION: BICOLOR BiMagenta; DESCRIPTION: Magenta(R=255,G=0,B=255) REFERENCE:
NAME:BiMakeAxis CATEGORY:MACRO DEFINITION: void BiMakeAxis(BIAXIS *axs,BIPOSATT *pos); (equivalent) DESCRIPTION: Create a coordinate system *axs from *pos. Identical to BiPntAngToAxis. REFERENCE:
NAME:BiMakeLimLine NAME:BiMakeLimLine2 CATEGORY:MACRO DEFINITION: void BiMakeLimLine(BILIMLINE *ln,BIPOINT *a,BIPOINT *b); (equivalent) void BiMakeLimLine2(BILIMLINE2 *ln,BIPOINT2 *a,BIPOINT2 *b); (equivalent) PARAMETER: BIPOINT *a,*b; Two end points of a line BIPOINT2 *a,*b; Two end points of a line DESCRIPTION: Make a line segment from two end points REFERENCE:
NAME:BiMakeLine NAME:BiMakeLine2 CATEGORY:MACRO DEFINITION: void BiMakeLine(BILINE *ln,BIPOINT *a,BIPOINT *b); (equivalent) void BiMakeLine2(BILINE2 *ln,BIPOINT2 *a,BIPOINT2 *b); (equivalent) PARAMETER: BIPOINT *a,*b; Two end points of a line BIPOINT2 *a,*b; Two end points of a line DESCRIPTION: Make a line from two end points. REFERENCE:
NAME:BiMakePlane
CATEGORY:FUNCTION
DEFINITION:
int BiMakePlane(BIPLANE *pln,int n,BIPOINT p[]);
PARAMETER:
BIPLANE *pln; Accept the result
int np; Number of coordinate
BIPOINT p[]; Coordinates
RETURN:
BI_TRUE Successfully calculated
BI_FALSE Failed
DESCRIPTION:
Find average plane from p[0]...p[np-1].
REFERENCE:
NAME:BiMakePolyg NAME:BiMakePolyg2 CATEGORY:FUNCTION DEFINITION: int BiMakePolyg(BIPOLYGON *plg,int np,BIPOINT p[]); int BiMakePolyg2(BIPOLYGON2 *plg,int np,BIPOINT2 p[]); PARAMETER: BIPOLYGON *plg; Accept newly created polygon BIPOLYGON2 *plg; Accept newly created polygon int np; Number of coordinates BIPOINT p[]; Coordinates BIPOINT2 p[]; Coordinates RETURN: BI_OK Success BI_ERR Failed(ususally out of memory) DESCRIPTION: Create a polygon. Memory blocks are automatically allocated inside this function. Use BiFreePolyg2/BiFreePolyg to release the memory block. REFERENCE:
NAME:BiMakeStdSolidFont CATEGORY:FUNCTION DEFINITION: int BiMakeStdSolidFont(BI3DFONT *fnt,real wid,BICOLOR *col); PARAMETER: BI3DFONT *fnt; Accept newly created solid font real wid; Width of 1 character BICOLOR *col; Color DESCRIPTION: Create a solid font. REFERENCE:
NAME:BiMakeStdWireFont CATEGORY:FUNCTION DEFINITION: int BiMakeStdWireFont(BI3DFONT *fnt,real wid,BICOLOR *col); PARAMETER: BI3DFONT *fnt; Accept newly created wire font real wid; Width of 1 character BICOLOR *col; Color DESCRIPTION: Create a wireframe font. REFERENCE:
NAME:BiMakeTrigonomy CATEGORY:MACRO DEFINITION: void BiMakeTrigonomy(BITRIGON *trg,BIANGLE *ang); (equivalent) PARAMETER: BITRIGON *trg; Accept the result BIANGLE *ang; Attitude DESCRIPTION: Calculate trigonomy value from *ang. REFERENCE:
NAME:BiMalloc CATEGORY:FUNCTION DEFINITION: void *BiMalloc(size_t siz); DESCRIPTION: Allocate a memory block of siz bytes. It is recommended to use this function if you are designing a software that runs on FM-TOWNS. Otherwise, you don't have to use BiMalloc/BiFree. You can simply use malloc/free and new/delete. REFERENCE:
NAME:BiMouse CATEGORY:FUNCTION DEFINITION: void BiMouse(int *lbt,int *mbt,int *rbt,long *mx,long *my); PARAMETER: int *lbt,*mbt,*rbt; Button status (left,mid,right) long *mx,*my; Mouse cursor position DESCRIPTION: Read mouse button status and cursor position. REFERENCE:
NAME:BiMouse2G
DEFINITION:
void BiMouse2G(int *lb,int *mb,int *rb,int *mx,int *my,int wait);
DESCRIPTION:
Read mouse button state and position. For example, lb==BI_ON
means left button is pressed, lb==BI_OFF means left button is
not pressed.
Use this function instead of BiMouse only when you want to use
IPL2G extension.
If you specify BI_ON as wait, this function will wait until a
user presses a button. Otherwise, does not wait.
Eg)
int lb,mb,rb,mx,my;
BiMouse2G(&lb,&mb,&rb,&mx,&my,BI_ON);
REFERENCE:
NAME:BiMulPoint CATEGORY:MACRO DEFINITION: void BiMulPoint(BIPOINT *ret,BIPOINT *src,double m); (equivalent) PARAMETER: BIPOINT *ret; Accept the result BIPOINT *src; Vector to be multiplied double m; Multiplication factor DESCRIPTION: Multiply *src by m and return it to *ret. REFERENCE:
NAME:BiMulPoint2 CATEGORY:MACRO DEFINITION: void BiMulPoint2(BIPOINT2 *ret,BIPOINT2 *src,double m); (equivalent) PARAMETER: BIPOINT2 *ret; Accept the result BIPOINT2 *src; Vector to be multiplied double m; Multiplication factor DESCRIPTION: Multiply *src by m and return it to *ret. REFERENCE:
NAME:BiNearClipLine CATEGORY:FUNCTION DEFINITION: void BiNearClipLine(BIPOINT c[2],BIPOINT p[2],double cpz); PARAMETER: BIPOINT c[2]; Accept result BIPOINT p[2]; Original line double cpz; Z value of clip plane DESCRIPTION: Clip a line segment p[0]-p[1] by a plane (z=cpz). The part of linesegment (z<cpz) is eliminated. Then the result is set to c[0] and c[1]. This function does nothing if both p[0].z and p[1].z are smaller than cpz. So, Application should check if the line will be alive or completely eliminated. REFERENCE:
NAME:BiNearClipPolyg CATEGORY:FUNCTION DEFINITION: void BiNearClipPolyg(int *nc,BIPOINT c[],int np,BIPOINT p[],double cpz); PARAMETER: int *nc; Accept the number of clipped polygon BIPOINT c[]; Accept the clipped polygon int np; Number of vertices of original polygon BIPOINT p[]; Original Polygon double cpz; Z value of clip playe DESCRIPTION: Clip a polygon by a plane (z=cpz). The part of polygon(z<cpz) is eliminated. Then the result is set to (*nc,c[]) This function does nothing if all p[0...np-1].z are smaller than cpz. So, Application should check if the polygon will be alive or completely eliminated. REFERENCE:
NAME:BiNormalize CATEGORY:FUNCTION DEFINITION: void BiNormalize(BIPOINT *dst,BIPOINT *src); PARAMETER: BIPOINT *ret; Accept result BIPOINT *src; Original Vector DESCRIPTION: Normalize *src, the result is set to *ret. REFERENCE:
NAME:BiNormalize2 CATEGORY:FUNCTION DEFINITION: void BiNormalize2(BIPOINT2 *ret,BIPOINT2 *src); PARAMETER: BIPOINT2 *ret; Accept result BIPOINT2 *src; Original vector DESCRIPTION: Normalize *src, the result is set to *ret. REFERENCE:
NAME:BiOpenWindow CATEGORY:FUNCTION DEFINITION: void BiOpenWindow(long reqX,long reqY); PARAMETER: long reqX,reqY; Window size request DESCRIPTION: Open a window. REFERENCE:
NAME:BiOpenWindow2G DEFINITION: int BiOpenWindow2G(int wid,int hei); DESCRIPTION: Open a window. Use this function instead of BiOpenWindow only when you want to use IPL2G extension. Otherwise, use BiOpenWindow. REFERENCE:
NAME:BiOrbitViewer2G DEFINITION: void BiOrbitViewer2G(void); DESCRIPTION: Rotate/Move viewpoint. Call this function inside main loop. Viewpoint will rotate by mouse right button. Zoom and unzoom by mouse right button. This viewpoint control is valid when you specify NULL to vp of BiStartBuffer2G. REFERENCE:
NAME:BiOrgA CATEGORY:Pre-Defined Variable DEFINITION: BIATTITUDE BiOrgA; DESCRIPTION: Represents attitude (0,0,0) REFERENCE:
NAME:BiOrgAxs CATEGORY:Pre-Defined Variable DEFINITION: BIAXIS BiOrgAxs; DESCRIPTION: Represents a coordinate system that is created from position(0,0,0) and attitude(0,0,0) REFERENCE:
NAME:BiOrgP CATEGORY:Pre-Defined Variable DEFINITION: BIPOINT BiOrgP; DESCRIPTION: Represents Origin (0,0,0) REFERENCE:
NAME:BiOrgPA CATEGORY:Pre-Defined Variable DEFINITION: BIPOSATT BiOrgPA; DESCRIPTION: Represents position(0,0,0) and attitude(0,0,0) REFERENCE:
NAME:BiOrgPln CATEGORY:Pre-Defined Variable DEFINITION: BIPLANE BiOrgPln; DESCRIPTION: Represents XZ plane REFERENCE:
NAME:BiOuterProduct CATEGORY:FUNCTION DEFINITION: void BiOuterProduct(BIPOINT *ou,BIPOINT *a,BIPOINT *b); PARAMETER: BIPOINT *ou; Accept result BIPOINT *a; Vector 1 BIPOINT *b; Vector 2 DESCRIPTION: Calculate cross product of *a and *b and return it to *ou. REFERENCE:
NAME:BiOvwFld NAME:BiOvwField CATEGORY:FUNCTION DEFINITION: void BiOvwFld(BIFLD *fld,BIPOSATT *pos) PARAMETER: BIFLD *fld; Field object BIPOSATT *pos; Position and attitude of the field DESCRIPTION: Draw a map of *fld. This function must be used while draing the underlay. (Must be called between BiStartBuffer and first BiIns???) REFERENCE:
NAME:BiOvwLine CATEGORY:FUNCTION DEFINITION: void BiOvwLine(BIPOINT *p1,BIPOINT *p2,BICOLOR *col); PARAMETER: BIPOINT *p1,*p2; Both end of the line BICOLOR *col; Color DESCRIPTION: Draw a 3D line without depth checking. This function must not be called between BiIns??? function and BiFlushBuffer. REFERENCE:
NAME:BiOvwLineShadow CATEGORY:FUNCTION DEFINITION: int BiOvwLineShadow(BIPOINT *p1,BIPOINT *p2,BICOLOR *col); DESCRIPTION: Draw a shadow of the line. REFERENCE:
NAME:BiOvwMarker CATEGORY:FUNCTION DEFINITION: void BiOvwMarker(BIPOINT *p,BICOLOR *col,int mkType); PARAMETER: BIPOINT *p; Marker Position BICOLOR *col; Color int mkType; Marker type DESCRIPTION: Draw a 3D marker without depth checking. This function must not be called between BiIns??? function and BiFlushBuffer. REFERENCE:
NAME:BiOvwPc2 NAME:BiOvwPict2 CATEGORY:FUNCTION DEFINITION: void BiOvwPc2(BIPC2 *pic,BIPOSATT *pnt); PARAMETER: BIPC2 *pic; 2D Drawing Object BIPOSATT *pnt; Position and attitude of 2D Drawing Object DESCRIPTION: Draw a 2D Drawing Object without depth checking. This function must not be called between BiIns??? function and BiFlushBuffer. REFERENCE:
NAME:BiOvwPolyg CATEGORY:FUNCTION DEFINITION: void BiOvwPolyg(int n,BIPOINT *p,BICOLOR *col); PARAMETER: int n; Number of coordinates BIPOINT *p; Coordinates BICOLOR *col; Color DESCRIPTION: Draw a polygon without depth checking. This function must not be called between BiIns??? function and BiFlushBuffer. REFERENCE:
NAME:BiOvwPolygShadow CATEGORY:FUNCTION DEFINITION: int BiOvwPolygShadow(int np,BIPOINT p[],BICOLOR *col); DESCTIPTION: Draw a shadow of the polygon. REFERENCE:
NAME:BiOvwPset CATEGORY:FUNCTION DEFINITION: void BiOvwPset(BIPOINT *p,BICOLOR *col); PARAMETER: BIPOINT *p; Position of a dot BICOLOR *col; Color DESCRIPTION: Draw a dot without depth checking. This function must not be called between BiIns??? function and BiFlushBuffer. REFERENCE:
NAME:BiOvwSrfShadow CATEGORY:FUNCTION DEFINITION: int BiOvwSrfShadow(BISRF *mdl,BIPOSATT *pos); DESCRIPTION: Draw a shadow of Polygon Model. REFERENCE:
NAME:BiOvwString CATEGORY:FUNCTION DEFINITION: int BiOvwString(BIPOINT *p,char str[],BICOLOR *col,int hori,int vert); PARAMETER: BIPOINT *p; Position of the string char str[]; String BICOLOR *col; Color int hori; Horizontal alignment(Refer to BiDrawText2) int vert; Vertical alignment(Referto BiDrawText2) DESCRIPTION: Draw a string without depth checking. This function must not be called between BiIns??? function and BiFlushBuffer. REFERENCE:
NAME:BiOvwText CATEGORY:FUNCTION DEFINITION: int BiOvwText(BIPOINT *p,char *str[],BICOLOR *col,int hori,int vert); PARAMETER: BIPOINT *p; Position of the text char *str[]; Text BICOLOR *col; Color int hori; Horizontal alignment(Refer to BiDrawText2) int vert; Vertical alignment(Refer to BiDrawText2) DESCRIPTION: Draw a text without depth checking. This function must not be called between BiIns??? function and BiFlushBuffer. REFERENCE:
NAME:BiPitchUp CATEGORY:FUNCTION DEFINITION: void BiPitchUp(BIANGLE *ret,BIANGLE *src,long pit,long yaw); PARAMETER: BIANGLE *ret; Accepting result BIANGLE *src; Original attitude long pit; Angle of nose-up long yaw; Angle of yaw DESCRIPTION: From original attitude, nose-ap by angle pit, turn the head(yaw) by yaw, and set the result to *ret. It is useful to calculate the attitude change in flight simulators. REFERENCE:
NAME:BiPlProject CATEGORY:MACRO DEFINITION: void BiPlProject(int n,BIPOINTS ret[],BIPOINT src[],BIPROJ *prj); (equivalent) PARAMETER: int n; Number of coordinates BIPOINTS ret[]; Accepting result BIPOINT src[]; Original coordinates BIPROJ *prj; Projection information DESCRIPTION: Transform src[0]...src[n-1] into screen coordinate, then set the result into ret. Coordinates src[0]...src[n-1] must be transformed into viewing coordinate system prior to call this function. REFERENCE:
NAME:BiPlane2G DEFINITION: void BiPlane2G(BIPOSATT *pos); DESCRIPTION: Draw a airplane-like(?) shape at *pos. REFERENCE:
NAME:BiPntAngToAxis CATEGORY:MACRO DEFINITION: void BiPntAngToAxis(BIAXIS *ret,BIPOSATT *pos); (equivalent) PARAMETER: BIAXIS *ret; Accept result BIPOSATT *pos; Position and attitude DESCRIPTION: Calculate a local coordinate system from *pos. This function is identical to BiMakeAxis REFERENCE:
NAME:BiPolyg2ToTris
CATEGORY:FUNCTION
DEFINITION:
int BiPolyg2ToTris(int *nTr,BIPOINT2 *tr,int nPl,BIPOLYGON2 *pl)
PARAMETER:
int *nTr Accept a number of triangles extracted
BIPOINT2 *tr Accept triangles(NULL:Just calculate a number of triangles)
int nPl Total number of loops (P-Loop and C-Loop)
BIPOLYGON2 *pl pl[0]:P-Loop pl[1...nPl-1]:C-Loop
RETURN:
BI_OK Successfully Calculated
BI_ERR Failed to tesselate
DESCRIPTION:
Tesselate P-Loop and C-Loop. And set the result to
tr[n*3...n*3+2] (n:integer , n>=0)
The length of tr must large enough so that it can hold all triangles.
Required number of triangles can be found by specifying NULL to tr.
C-Loops must have opposite flip direction to P-Loop. (If P-Loop is
clockwise, C-Loops must be counter clockwise. Vice-versa).
REFERENCE:
NAME:BiPolygToConvex NAME:BiPolyg2ToConvex CATEGORY:FUNCTION DEFINITION: int BiPolygToConvex(int *nCvx,BIPOLYGON *cvx,BIPOLYGON *org); int BiPolyg2ToConvex(int *nCvx,BIPOLYGON2 cvx[],BIPOLYGON2 *org); PARAMETER: int *nCvx; Accept number of convex polygons BIPOLYGON cvx[]; Accept convex polygons BIPOLYGON *org; Original polygon BIPOLYGON2 cvx[]; Accept convex polygons BIPOLYGON2 *org; Original polygon RETURN: BI_OK Success BI_ERR Failed DESCRIPTION: Divide original polyogn into convex polygons. Since mmory blocks of newly created polygons are allocated inside this function, use BiFreePolyg2 or BiFreePolyg to free those memory blocks. REFERENCE:
NAME:BiPolygToTris
CATEGORY:FUNCTION
DEFINITION:
int BiPolygToTris(int *nTr,BIPOINT *tr,int nPl,BIPOLYGON *pl);
PARAMETER:
int *nTr Accept a number of triangles extracted
BIPOINT2 *tr Accept triangles(NULL:Just calculate a number of triangles)
int nPl Total number of loops (P-Loop and C-Loop)
BIPOLYGON2 *pl pl[0]:P-Loop pl[1...nPl-1]:C-Loop
RETURN:
BI_OK Successfully Calculated
BI_ERR Failed to tesselate
DESCRIPTION:
Tesselate P-Loop and C-Loop. And set the result to
tr[n*3...n*3+2] (n:integer , n>=0)
The length of tr must large enough so that it can hold all triangles.
Required number of triangles can be found by specifying NULL to tr.
C-Loops must have opposite flip direction to P-Loop. (If P-Loop is
clockwise, C-Loops must be counter clockwise. Vice-versa).
REFERENCE:
NAME:BiPopMatrix CATEGORY:FUNCTION DEFINITION: int BiPopMatrix(void); DESCRIPTION: Pop BiPushMatrix one layer. REFERENCE:
NAME:BiProject CATEGORY:FUNCTION DEFINITION: void BiProject(BIPOINTS *ret,BIPOINT *src,BIPROJ *prj); (equivalent) PARAMETER: BIPOINTS *ret; Accepting result BIPOINT *src; Original coordinte BIPROJ *prj; Projection information DESCRIPTION: Transform *src into screen coordinate, then set the result to *ret. Coordinate *src must be transformed into viewing coordinate system prior to this function. REFERENCE:
NAME:BiProjectToPlane CATEGORY:FUNCTION DEFINITION: void BiProjectToPlane(BIPOINT *pnt,BIPLANE *pln,BIPOINT *org) PARAMETER: BIPOINT *pnt; Accepting Result BIPLANE *pln; Projection plane BIPOINT *org; Original coordinate DESCRIPTION: Transform coordinate *org onto plane *pln. The result will be set to *pnt. REFERENCE:
NAME:BiPset2G
DEFINITION:
void BiPset2G(float x,float y,float z,BICOLOR *c);
DESCRIPTION:
Draw a dot. You can specify color by c. Or you can use pre-defined
variable for c. Available pre-defined variables are as follows.
&BiBlack
&BiBlue
&BiRed
&BiMagenta
&BiGreen
&BiCyan
&BiYellow
&BiWhite
REFERENCE:
NAME:BiPushMatrix CATEGORY:FUNCTION DEFINITION: int BiPushMatrix(BIPOSATT *pos); DESCRIPTION: Specify the reference coordinate system of 3D drawing functions (BiOvwXXXX,BiInsXXXX). It is almost same as BiSetLocalMatrix. But they are different. BiPushMatrix can specify coordinate system hierarchicaly. But BiSetLocalMatrix does not have hierarchy. REFERENCE:
NAME:BiQuickNormalize CATEGORY:FUNCTION DEFINITION: void BiQuickNormalize(BIPOINT *dst,BIPOINT *src); DESCRIPTION: Normalize *src then return it to *dst. This function is quick, but less accurate. REFERENCE:
NAME:BiRed CATEGORY:Pre-Defined Variable DEFINITION: BICOLOR BiRed; DESCRIPTION: Red(R=255,G=0,B=0) REFERENCE:
NAME:BiRenderClose CATEGORY:FUNCTION DEFINITION: void BiRenderClose(void); DESCRIPTION: Terminate raster output originated by BiRenderOpen. REFERENCE:
NAME:BiRenderOpen
CATEGORY:FUNCTION
DEFINITION:
int BiRenderOpen(char fn[],int type,int wid,int hei);
PARAMETER:
char fn[]; Output filename
int type; File type
int wid; Horizontal resolution
int hei; Vertical resolution
DESCRIPTION:
Begin rendering 3D object and output a raster image to a file.
Type can be chosen from:
BIRENDER_TIFF
BIRENDER_BMP
BIRENDER_PPM
CAUTION:
This function does not support:
BiDrawMarker2
BiDrawString2
BiOvwString
BiInsString
BiDrawText2
BiOvwText
BiInsText
BiDrawEmptyCircle2
REFERENCE:
NAME:BiRightAngleVector CATEGORY:FUNCTION DEFINITION: void BiRightAngleVector(BIPOINT *ret,BIPOINT *src); PARAMETER: BIPOINT *ret; Accepting result BIPOINT *src; Vector DESCRIPTION: Calculate arbitrary vector that is parpendicular to *src. The result will be set to *ret. REFERENCE:
NAME:BiRot2 CATEGORY:FUNCTION DEFINITION: void BiRot2(BIPOINT2 *ret,BIPOINT2 *src,long ang); DESCRIPTION: Rotate *src by ang. The result is set to *ret. REFERENCE:
NAME:BiRotFastGtoL NAME:BiRotFastLtoG CATEGORY:MACRO DEFINITION: void BiRotFastGtoL(BIPOINT *ret,BIPOINT *src,BITRIGON *trg); (equivalent) void BiRotFastLtoG(BIPOINT *ret,BIPOINT *src,BITRIGON *trg); (equivalent) PARAMETER: BIPOINT *ret; Accepting result BIPOINT *src; Original vector) BITRIGON *trg; Trigonomy of an attitude DESCRIPTION: Rotate vector *src by *trg. Then the result is set to *ret. GtoL means the global coordinate system into local coordinate system. LtoG means local coordinate system into the global coordinate system. Refer to BiMakeTrigonomy how to make BITRIGON *trg. REFERENCE:
NAME:BiRotGtoL NAME:BiRotLtoG CATEGORY:MACRO DEFINITION: void BiRotGtoL(BIPOINT *ret,BIPOINT *src,BIANGLE *ang); void BiRotLtoG(BIPOINT *ret,BIPOINT *src,BIANGLE *ang); PARAMETER: BIPOINT *ret; Accepting result BIPOINT *src; Original vector) BIANGLE *ang; An attitude DESCRIPTION: Rotate vector *src by *ang. Then the result is set to *ret. GtoL means the global coordinate system into local coordinate system. LtoG means local coordinate system into the global coordinate system. REFERENCE:
NAME:BiSame
NAME:BiSamePoint
NAME:BiSamePoint2
CATEGORY:MACRO
DEFINITION:
#define BiSame(x,y) ((BiAbs((x)-(y))<=YSEPS) ? BI_TRUE : BI_FALSE)
#define BiSamePoint(a,b) \
((BiSame((a)->x,(b)->x)&&\
BiSame((a)->y,(b)->y)&&\
BiSame((a)->z,(b)->z)) ? BI_TRUE : BI_FALSE)
#define BiSamePoint2(a,b) \
((BiSame((a)->x,(b)->x)&&\
BiSame((a)->y,(b)->y)) ? BI_TRUE : BI_FALSE)
DESCRIPTION:
Return BI_TRUE if two coordinates are the same. Otherwise return
BI_FALSE.
REFERENCE:
NAME:BiScaleSrf NAME:BiScaleSrfModel CATEGORY:FUNCTION DEFINITION: void BiScaleSrf(BISRF *srf,double scl); PARAMETER: BISRF *srf; Polygon Model double scl; Scaling factor DESCRIPTION: Multiply the size of *srf by the factor of scl. REFERENCE:
NAME:BiSetAngle
NAME:BiSetAngleDeg
NAME:BiSetAngleRad
CATEGORY:MACRO
DEFINITION:
void BiSetAngle(BIANGLE *ret,double h,double p,double b); (equivalent)
void BiSetAngleDeg(BIANGLE *ret,double h,double p,double b); (equivalent)
void BiSetAngleRad(BIANGLE *ret,double h,double p,double b); (equivalent)
PARAMETER:
BIANGLE *ret; An attitude to be set.
double h,p,b; Angle by euler angle
DESCRIPTION:
Substitute an attitude (h,p,b) into *ret.
SetAngle Substitute h,p,b with no conversion
SetAngleDeg h,p,b are in degree
SetAngleRad h,p,b are in radian
REFERENCE:
NAME:BiSetClickableBuffer CATEGORY:FUNCTION DEFINITION: int BiSetClickableBuffer(char buf[],int nbuf); PARAMETER: char buf[]; Clickable Object Buffer int nbuf; Clickable Object Buffser Size RETURN: BI_OK Always BI_OK DESCRIPTION: Initialize Clickable Object function. Call once at the beginning of the program. REFERENCE:
NAME:BiSetClipScreenFrame CATEGORY:FUNCTION DEFINITION: void BiSetClipScreenFrame(BIPOINTS *l,BIPOINTS *r) PARAMETER: BIPOINTS *l,*r; Clip frame (*l: Top-Left *r:Bottom-Right) DESCRIPTION: Specifies a clip frame that is used by BiClipLineScrn and BiClipPolygScrn. Note that this clip frame does not afect drawing. REFERENCE:
NAME:BiSetColorRGB CATEGORY:MACRO DEFINITION: void BiSetColorRGB(BICOLOR *col,int r,int g,int b); (equivalent) PARAMETER: BICOLOR *col; Color to be set int r,g,b; RGB value(0...255) DESCRIPTION: Substitute r,g,b into color structure. REFERENCE:
NAME:BiSetLightPosition CATEGORY:FUNCTION DEFINITION: void BiSetLightPosition(BIPOINT *p); PARAMETER: BIPOINT *p; Light Position DESCRIPTION: Set light position. REFERENCE:
NAME:BiSetLocalMatrix CATEGORY:FUNCTION DEFINITION: void BiSetLocalMatrix(BIPOSATT *mdl); PARAMETER: BIPOSATT *mdl; Position and attitude of local coordinate system. DESCRIPTION: Specify the reference coordinate system of 3D drawing functions (BiOvwXXXX,BiInsXXXX). Unlike BiPushMatrix, BiSetLocalMatrix cannot specify the local coordinate system hierarchically. REFERENCE:
NAME:BiSetOrthoDist
CATEGORY:FUNCTION
DEFINITION:
void BiSetOrthoDist(double dist);
PARAMETER:
double dist; Distance between viewing point and projection plane
in orthogonal mode.
DESCRIPTION:
Specify the distance between viewing point and projection plane
in orthogonal mode.
REFERENCE:
NAME:BiSetPoint CATEGORY:MACRO DEFINITION: void BiSetPoint(BIPOINT *ret,double x,double y,double z); (equivalent) PARAMETER: BIPOINT *ret; Point/vector to be set double x,y,z; coordinate DESCRIPTION: Substitute (x,y,z) into *ret REFERENCE:
NAME:BiSetPoint2 CATEGORY:MACRO DEFINITION: void BiSetPoint2(BIPOINT2 *ret,double x,double y); (equivalent) PARAMETER: BIPOINT2 *ret; Point/vector to be set double x,y; coordinate DESCRIPTION: Substitute (x,y) into *ret REFERENCE:
NAME:BiSetPointS
CATEGORY:MACRO
DEFINITION:
#define BiSetPointS(p,xx,yy) {(p)->x=(long)(xx);(p)->y=(long)(yy);}
PARAMETER:
BIPOINT *ret; Screen coordinate to be set
long x,y; Screen coordinate
DESCRIPTION:
Substitute (x,y) into *ret
REFERENCE:
NAME:BiSetProjection CATEGORY:FUNCTION DEFINITION: void BiSetProjection(BIPROJ *prj); PARAMETER: BIPROJ *prj; Projection information DESCRIPTION: Set projection information to the library. REFERENCE:
NAME:BiSetProjectionMode CATEGORY:FUNCTION DEFINITION: void BiSetProjectionMode(int mode); PARAMETER: int mode; Projection mode(BIPRJ_ORTHO / BIPRJ_PERS) DESCRIPTION: Set projection mode. REFERENCE:
NAME:BiSetShadMode CATEGORY:FUNCTION DEFINITION: void BiSetShadMode(int mode); PARAMETER: int mode; Shading Mode(BI_ON / BI_OFF) DESCRIPTION: Set shading mode. REFERENCE:
NAME:BiSetShadowPlane CATEGORY:FUNCTION DEFINITION: int BiSetShadowPlane(BIPOSATT *pos); DESCRIPTION: Specify shadow plane. REFERENCE:
NAME:BiSetWindowName CATEGORY:FUNCTION DEFINITION: void BiSetWindowName(char winname[]) PARAMETER: char winname[]; Window name DESCRIPTION: Set window name. Call before BiOpenWindow. REFERENCE:
NAME:BiSgn CATEGORY:MACRO DEFINITION: #define BiSgn(a) ((a)>=0 ? 1 : -1 ) DESCRIPTION: Return the sign of a. If a is greater or equal to zero, return 1. Otherwise, return -1. REFERENCE:
NAME:BiSin CATEGORY:FUNCTION DEFINITION: double BiSin(long ang); PARAMETER: long ang; Angle RETURN: double sin(ang) value DESCRIPTION: Calculate sin(a). You have to specify angle by Blue Impulse SDK's system. (0 for 0 degree, 32768 for 180 degree, 65536 for 360 degree) REFERENCE:
NAME:BiSmaller CATEGORY:MACRO DEFINITION: #define BiSmaller(a,b) ((a)<(b) ? (a) : (b)) DESCRIPTION: Return smaller one of a and b. REFERENCE:
NAME:BiSrfClose CATEGORY:FUNCTION DEFINITION: int BiSrfClose(void); DESCRIPTION: Terminate SRF output. Once BiSrfOpen is called, this function must be called once. REFERENCE:
NAME:BiSrfCollision CATEGORY:FUNCTION DEFINITION: int BiSrfCollision(BISRF *srf,BIPOSATT *pos,BIPOINT *p,real bump); PARAMETER: BISRF *srf; Polygon model BIPOSATT *pos; Position of the polygon model BIPOINT *p; Coordinate of interest real bump; Tolerance RETURN: BI_IN *p is collided with *srf BI_OUT *p is not collided with *srf DESCRIPTION: Check if *p is collided with a polygon model *srf at *pos using bounding box. REFERENCE:
NAME:BiSrfOpen CATEGORY:FUNCTION DEFINITION: int BiSrfOpen(char fn[]); PARAMETER: char fn[]; Polygon model filename DESCRIPTION: Originate SRF output. After this function is called, Blue Impulse SDK will capture objects drawn to the screen and export to SRF file. SRF output is terminated by BiSrfClose(); REFERENCE:
NAME:BiSrfSetOffset CATEGORY:FUNCTION DEFINITION: int BiSrfSetOffset(BIVECTOR *v); PARAMETER: BIVECTOR *v; Offset DESCRIPTION: Specify a offset (translation) of the object exported to SRF. REFERENCE:
NAME:BiStartBuffer CATEGORY:FUNCTION DEFINITION: void BiStartBuffer(BIPOSATT *eye); PARAMETER: BIPOSATT *eye; Viewing position and attitude DESCRIPTION: Set viewing position and attitude to enable adding objects to Z-Sort buffer. This function will reset Z-Sort buffer and temproary stack. REFERENCE:
NAME:BiStartBuffer2G DEFINITION: void BiStartBuffer2G(BIPOSATT *vp); DESCRIPTION: Clear Z-Soft buffer. Specify viewpoint. This function is almost identical to BiStartBuffer. One difference is that vp can be NULL for this function. If vp is NULL, IPL2G extension will automatically take care of viewpoint. Use this function instead of BiStartBuffer only when you use IPL2G extension. REFERENCE:
NAME:BiSubPoint CATEGORY:MACRO DEFINITION: void BiSubPoint(BIPOINT *ret,BIPOINT *a,BIPOINT *b); (equivalent) DESCRIPTION: Subtract *b from *a. Result is set to *ret. REFERENCE:
NAME:BiSubPoint2 CATEGORY:MACRO DEFINITION: void BiSubPoint2(BIPOINT2 *ret,BIPOINT2 *a,BIPOINT2 *b); (equivalent) DESCRIPTION: Subtract *b from *a. Result is set to *ret. REFERENCE:
NAME:BiSwapBuffers CATEGORY:FUNCTION DEFINITION: void BiSwapBuffers(void); DESCRIPTION: Transfer frame buffer into real screen. REFERENCE:
NAME:BiSwapBuffers2G DEFINITION: void BiSwapBuffers2G(void); DESCRIPTION: Transfer Frame buffer into real screen. Almost identical to BiSwapBuffers. Use this function instead of BiSwapBuffers only when you use IPL2G extension. REFERENCE:
NAME:BiTan CATEGORY:FUNCTION DEFINITION: double BiTan(long a); DESCRIPTION: Calculate tan(a). You have to specify angle by Blue Impulse SDK's system. (0 for 0 degree, 32768 for 180 degree, 65536 for 360 degree) REFERENCE:
NAME:BiTerEyeVecUpVec
NAME:BiTerrMeshEyeVecUpVec
CATEGORY:FUNCTION
DEFINITION:
int BiTerEyeVecUpVec
(BIPOINT *e,BIPOINT *u,real x,real z,long h,BITER *ter,BIPOSATT *pos)
RETURN:
BI_IN Successfully calculated
BI_OUT Calculation is failed because (x,z) is out of range.
DESCRIPTION:
When the terrain object *ter is placed at *pos, calculate viewing
vector and up vector above (x,0,z) with the heading h.
REFERENCE:
NAME:BiTerHeight NAME:BiTerrMeshHeight CATEGORY:FUNCTION DEFINITION: int BiTerHeight(real *y,real x,real z,BITER *ter,BIPOSATT *pos); RETURN: BI_IN Success BI_OUT Calculation is failed because (x,z) is out of range. DESCRIPTION: When the terrain object *ter is placed at *pos, calculate elevation above (x,0,z) with the heading h. REFERENCE:
NAME:BiTwist2 CATEGORY:FUNCTION DEFINITION: int BiTwist2(int np,BIPOINT2 *p); PARAMETER: int np; Number of coordinates BIPOINT2 *p; coordinates RETURN: int Flip direction(BITWIST_UNKNOWN,BITWIST_RIGHT,BITWIST_LEFT) DESCRIPTION: Calculate flip direction of a polygon (np,p[]). If some of edges are intersecting, this function will return BITWIST_UNKNOWN. Sometimes this function will make mistakes(^_^;) For now, I didn't experience such mistake (^_^;) REFERENCE:
NAME:BiTwist3 CATEGORY:FUNCTION DEFINITION: int BiTwist3(int np,BIPOINT *p,BIPOINT *nom); PARAMETER: int np; Number of coordinates BIPOINT *p; Coordinates BIPOINT *nom; Normal vector RETURN: int Flip direction(BITWIST_UNKNOWN,BITWIST_RIGHT,BITWIST_LEFT) DESCRIPTION: Calculate flip direction of the polygon (np,p[]) with the normal of *nom. If the polygon is not on the plane, or if some of the edges are intersecting, this function will return BITWIST_UNKNOWN. Sometimes this function will make mistakes(^_^;) For now, I didn't experience such mistake (^_^;) REFERENCE:
NAME:BiUpdateDevice CATEGORY:FUNCTION DEFINITION: void BiUpdateDevice(void); DESCRIPTION: Update event queue. This function must be called once at the beginning of main loop. You can call this function twice in the main loop, but it is not recommended. REFERENCE:
NAME:BiUpdateDevice2G DEFINITION: int BiUpdateDevice2G(void); DESCRIPTION: Almost identical to BiUpdateDevice function. Use 2G extension use this function instead of BiUpdateDevice only when you want to use IPL2G extension. Call this function at the beginning of the main loop. REFERENCE:
NAME:BiVecX CATEGORY:Pre-Defined Variable DEFINITION: BIPOINT BiVecX; DESCRIPTION: Represents a vector (1,0,0); REFERENCE:
NAME:BiVecY CATEGORY:Pre-Defined Variable DEFINITION: BIPOINT BiVecY; DESCRIPTION: Represents a vector (0,1,0); REFERENCE:
NAME:BiVecZ CATEGORY:Pre-Defined Variable DEFINITION: BIPOINT BiVecZ; DESCRIPTION: Represents a vector (0,0,1); REFERENCE:
NAME:BiVectorToAngle CATEGORY:FUNCTION DEFINITION: void BiVectorToAngle(BIANGLE *ret,BIPOINT *eye,BIPOINT *up); PARAMETER: BIANGLE *ret; Accept result BIPOINT *eye; Viewing vector BIPOINT *up; Up vector DESCRIPTION: Calculate an attitude defined by *eye and *up. *eye and *up must not be parallel. REFERENCE:
NAME:BiVectorToHeadPitch CATEGORY:FUNCTION DEFINITION: void BiVectorToHeadPitch(BIANGLE *an,BIPOINT *vec); PARAMETER: BIANGLE *an; Accept result BIPOINT *vec; Vector DESCRIPTION: Calculate an attitude from *vec. Bank angle will be 0. REFERENCE:
NAME:BiVrmlClose NAME:BiVrml2Close CATEGORY:FUNCTION DEFINITION: int BiVrmlClose(void); DESCRIPTION: Terminate VRML output. Once BiVrmlOpen is called, this function must be called once. Use BiVrmlClose for BiVrmlOpen. Use BiVrml2Close for BiVrml2Open. REFERENCE:
NAME:BiVrmlOpen NAME:BiVrml2Open CATEGORY:FUNCTION DEFINITION: int BiVrmlOpen(char fn[]); PARAMETER: char fn[]; VRML filename DESCRIPTION: Originate VRML output. After this function is called, Blue Impulse SDK will capture objects drawn to the screen and export to VRML file. VRML output is terminated by BiVrmlClose(); BiVrmlOpen will export objects to VRML 1.0 BiVrml2Open will export objects to VRML 2.0 REFERENCE:
NAME:BiVrmlSetOffset CATEGORY:FUNCTION DEFINITION: int BiVrmlSetOffset(BIVECTOR *v); PARAMETER: BIVECTOR *v; Offset to VRML object DESCRIPTION: Specify a offset (translation) of the object exported to VRML. REFERENCE:
NAME:BiWhite CATEGORY:Pre-Defined Variable DEFINITION: BICOLOR BiWhite; DESCRIPTION: White(R=255,G=255,B=255) REFERENCE:
NAME:BiYellow CATEGORY:Pre-Defined Variable DEFINITION: BICOLOR BiYellow; DESCRIPTION: Yellow(R=255,G=255,B=0) REFERENCE:
NAME:YSEPS CATEGORY:MACRO DEFINITION: #define YSEPS 0.001 DESCRIPTION: Macro representing tolerance REFERENCE:
NAME:YSPI CATEGORY:MACRO DEFINITION: #define YSPI 3.14159265 DESCRIPTION: Macro representing PI REFERENCE:
NAME:real CATEGORY:TYPE DEFINITION: typedef float real; DESCRIPTION: Floating point type. (Actually, it's float) REFERENCE: