*p | List of coordinates of endpoints of lines to be drawn |
n | Number of lines to be drawn |
attr | Attributes (specifies the drawing method) |
-NJD_DRAW_NORMAL | Independent line drawing. |
-NJD_DRAW_FAN | Radial line drawing. |
-NJD_DRAW_CONNECTED | Connected line drawing. |
-NJD_TRANSPARENT | Transparent drawing. |
-NJD_USE_TEXTURE | Drawing with texture. |
These 5 attributes can be used in mutually consistent combinations by using the "|" character as a delimiter.
The following draws 50 lines at random. int i; NJS_COLOR color[100]; p.p = point; p.col = color; p.tex = NULL; p.num = 100; for(i = 0; i < 100; i++){ p.p[i].x = njRandom()*1000.f-500.f; p.p[i].y = njRandom()*1000.f-500.f; p.p[i].z = -njRandom()*1000.f; p.col[i].argb.a = (Uint8)(0x80*njRandom()); p.col[i].argb.r = (Uint8)(0x80*njRandom()); p.col[i].argb.g = (Uint8)(0x80*njRandom()); p.col[i].argb.b = (Uint8)(0x80*njRandom()); } njDrawLine3D(&p, 100, NJD_DRAW_NORMAL|NJD_TRANSPARENT);