1
0

PLUSH.H 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720
  1. /******************************************************************************
  2. plush.h
  3. PLUSH 3D VERSION 1.2 MAIN HEADER
  4. Copyright (c) 1996-2000 Justin Frankel
  5. Copyright (c) 1998-2000 Nullsoft, Inc.
  6. For more information on Plush and the latest updates, please visit
  7. http://www.nullsoft.com
  8. This software is provided 'as-is', without any express or implied
  9. warranty. In no event will the authors be held liable for any damages
  10. arising from the use of this software.
  11. Permission is granted to anyone to use this software for any purpose,
  12. including commercial applications, and to alter it and redistribute it
  13. freely, subject to the following restrictions:
  14. 1. The origin of this software must not be misrepresented; you must not
  15. claim that you wrote the original software. If you use this software
  16. in a product, an acknowledgment in the product documentation would be
  17. appreciated but is not required.
  18. 2. Altered source versions must be plainly marked as such, and must not be
  19. misrepresented as being the original software.
  20. 3. This notice may not be removed or altered from any source distribution.
  21. Justin Frankel
  22. [email protected]
  23. ******************************************************************************/
  24. #ifndef _PLUSH_H_
  25. #define _PLUSH_H_
  26. #include <stdio.h>
  27. #include <stdlib.h>
  28. #include <string.h>
  29. #include <math.h>
  30. #include "pl_conf.h"
  31. #include "pl_defs.h"
  32. #include "pl_types.h"
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36. extern pl_uChar plText_DefaultFont[256*16]; /* Default 8x16 font for plText* */
  37. extern pl_uInt32 plRender_TriStats[4]; /* Three different triangle counts from
  38. the last plRender() block:
  39. 0: initial tris
  40. 1: tris after culling
  41. 2: final polys after real clipping
  42. 3: final tris after tesselation
  43. */
  44. /******************************************************************************
  45. ** Material Functions (mat.c)
  46. ******************************************************************************/
  47. /*
  48. plMatCreate() creates a material.
  49. Parameters:
  50. none
  51. Returns:
  52. a pointer to the material on success, 0 on failure
  53. */
  54. pl_Mat *plMatCreate();
  55. /*
  56. plMatDelete() deletes a material that was created with plMatCreate().
  57. Parameters:
  58. m: a pointer to the material to be deleted
  59. Returns:
  60. nothing
  61. */
  62. void plMatDelete(pl_Mat *m);
  63. /*
  64. plMatInit() initializes a material that was created with plMatCreate().
  65. Parameters:
  66. m: a pointer to the material to be intialized
  67. Returns:
  68. nothing
  69. Notes:
  70. you *must* do this before calling plMatMapToPal() or plMatMakeOptPal().
  71. */
  72. void plMatInit(pl_Mat *m);
  73. /*
  74. plMatMapToPal() maps a material that was created with plMatCreate() and
  75. initialized with plMatInit() to a palette.
  76. Parameters:
  77. mat: material to map
  78. pal: a 768 byte array of unsigned chars, each 3 being a rgb triplet
  79. (0-255, *not* the cheesy vga 0-63)
  80. pstart: starting offset to use colors of, usually 0
  81. pend: ending offset to use colors of, usually 255
  82. Returns:
  83. nothing
  84. Notes:
  85. Mapping a material with > 2000 colors can take up to a second or two.
  86. Be careful, and go easy on plMat.NumGradients ;)
  87. */
  88. void plMatMapToPal(pl_Mat *m, pl_uChar *pal, pl_sInt pstart, pl_sInt pend);
  89. /*
  90. plMatMakeOptPal() makes an almost optimal palette from materials
  91. created with plMatCreate() and initialized with plMatInit().
  92. Paramters:
  93. p: palette to create
  94. pstart: first color entry to use
  95. pend: last color entry to use
  96. materials: an array of pointers to materials to generate the palette from
  97. nmats: number of materials
  98. Returns:
  99. nothing
  100. */
  101. void plMatMakeOptPal(pl_uChar *p, pl_sInt pstart,
  102. pl_sInt pend, pl_Mat **materials, pl_sInt nmats);
  103. /******************************************************************************
  104. ** Object Functions (obj.c)
  105. ******************************************************************************/
  106. /*
  107. plObjCreate() allocates an object
  108. Paramters:
  109. np: Number of vertices in object
  110. nf: Number of faces in object
  111. Returns:
  112. a pointer to the object on success, 0 on failure
  113. */
  114. pl_Obj *plObjCreate(pl_uInt32 np, pl_uInt32 nf);
  115. /*
  116. plObjDelete() frees an object and all of it's subobjects
  117. that was allocated with plObjCreate();
  118. Paramters:
  119. o: object to delete
  120. Returns:
  121. nothing
  122. */
  123. void plObjDelete(pl_Obj *o);
  124. /*
  125. plObjClone() creates an exact but independent duplicate of an object and
  126. all of it's subobjects
  127. Paramters:
  128. o: the object to clone
  129. Returns:
  130. a pointer to the new object on success, 0 on failure
  131. */
  132. pl_Obj *plObjClone(pl_Obj *o);
  133. /*
  134. plObjScale() scales an object, and all of it's subobjects.
  135. Paramters:
  136. o: a pointer to the object to scale
  137. s: the scaling factor
  138. Returns:
  139. a pointer to o.
  140. Notes: This scales it slowly, by going through each vertex and scaling it's
  141. position. Avoid doing this in realtime.
  142. */
  143. pl_Obj *plObjScale(pl_Obj *o, pl_Float s);
  144. /*
  145. plObjStretch() stretches an object, and all of it's subobjects
  146. Parameters:
  147. o: a pointer to the object to stretch
  148. x,y,z: the x y and z stretch factors
  149. Returns:
  150. a pointer to o.
  151. Notes: same as plObjScale(). Note that the normals are preserved.
  152. */
  153. pl_Obj *plObjStretch(pl_Obj *o, pl_Float x, pl_Float y, pl_Float z);
  154. /*
  155. plObjTranslate() translates an object
  156. Parameters:
  157. o: a pointer to the object to translate
  158. x,y,z: translation in object space
  159. Returns:
  160. a pointer to o
  161. Notes: same has plObjScale().
  162. */
  163. pl_Obj *plObjTranslate(pl_Obj *o, pl_Float x, pl_Float y, pl_Float z);
  164. /*
  165. plObjFlipNormals() flips all vertex and face normals of and object
  166. and allo of it's subobjects.
  167. Parameters:
  168. o: a pointer to the object to flip normals of
  169. Returns:
  170. a pointer to o
  171. Notes:
  172. Not especially fast.
  173. A call to plObjFlipNormals() or plObjCalcNormals() will restore the normals
  174. */
  175. pl_Obj *plObjFlipNormals(pl_Obj *o);
  176. /*
  177. plObjSetMat() sets the material of all faces in an object.
  178. Paramters:
  179. o: the object to set the material of
  180. m: the material to set it to
  181. th: "transcend hierarchy". If set, it will set the
  182. material of all subobjects too.
  183. Returns:
  184. nothing
  185. */
  186. void plObjSetMat(pl_Obj *o, pl_Mat *m, pl_Bool th);
  187. /*
  188. plObjCalcNormals() calculates all face and vertex normals for an object
  189. and all subobjects.
  190. Paramters:
  191. obj: the object
  192. Returns:
  193. nothing
  194. */
  195. void plObjCalcNormals(pl_Obj *obj);
  196. /******************************************************************************
  197. ** Frustum Clipping Functions (clip.c)
  198. ******************************************************************************/
  199. /*
  200. plClipSetFrustum() sets up the clipping frustum.
  201. Parameters:
  202. cam: a camera allocated with plCamCreate().
  203. Returns:
  204. nothing
  205. Notes:
  206. Sets up the internal structures.
  207. DO NOT CALL THIS ROUTINE FROM WITHIN A plRender*() block.
  208. */
  209. void plClipSetFrustum(pl_Cam *cam);
  210. /*
  211. plClipRenderFace() renders a face and clips it to the frustum initialized
  212. with plClipSetFrustum().
  213. Parameters:
  214. face: the face to render
  215. Returns:
  216. nothing
  217. Notes: this is used internally by plRender*(), so be careful. Kinda slow too.
  218. */
  219. void plClipRenderFace(pl_Face *face);
  220. /*
  221. plClipNeeded() decides whether the face is in the frustum, intersecting
  222. the frustum, or completely out of the frustum craeted with
  223. plClipSetFrustum().
  224. Parameters:
  225. face: the face to check
  226. Returns:
  227. 0: the face is out of the frustum, no drawing necessary
  228. 1: the face is intersecting the frustum, splitting and drawing necessary
  229. Notes: this is used internally by plRender*(), so be careful. Kinda slow too.
  230. */
  231. pl_sInt plClipNeeded(pl_Face *face);
  232. /******************************************************************************
  233. ** Light Handling Routines (light.c)
  234. ******************************************************************************/
  235. /*
  236. plLightCreate() creates a new light
  237. Parameters:
  238. none
  239. Returns:
  240. a pointer to the light
  241. */
  242. pl_Light *plLightCreate();
  243. /*
  244. plLightSet() sets up a light allocated with plLightCreate()
  245. Parameters:
  246. light: the light to set up
  247. mode: the mode of the light (PL_LIGHT_*)
  248. x,y,z: either the position of the light (PL_LIGHT_POINT*) or the angle
  249. in degrees of the light (PL_LIGHT_VECTOR)
  250. intensity: the intensity of the light (0.0-1.0)
  251. halfDist: the distance at which PL_LIGHT_POINT_DISTANCE is 1/2 intensity
  252. Returns:
  253. a pointer to light.
  254. */
  255. pl_Light *plLightSet(pl_Light *light, pl_uChar mode, pl_Float x, pl_Float y,
  256. pl_Float z, pl_Float intensity, pl_Float halfDist);
  257. /*
  258. plLightDelete() frees a light allocated with plLightCreate().
  259. Paramters:
  260. l: light to delete
  261. Returns:
  262. nothing
  263. */
  264. void plLightDelete(pl_Light *l);
  265. /* PUT ME SOMEWHERE */
  266. /*
  267. ** plTexDelete() frees all memory associated with "t"
  268. */
  269. void plTexDelete(pl_Texture *t);
  270. /******************************************************************************
  271. ** Camera Handling Routines (cam.c)
  272. ******************************************************************************/
  273. /*
  274. plCamCreate() allocates a new camera
  275. Parameters:
  276. sw: screen width
  277. sh: screen height
  278. ar: aspect ratio (usually 1.0)
  279. fov: field of view (usually 45-120)
  280. fb: pointer to framebuffer
  281. zb: pointer to Z buffer (or NULL)
  282. Returns:
  283. a pointer to the newly allocated camera
  284. */
  285. pl_Cam *plCamCreate(pl_uInt sw, pl_uInt sh, pl_Float ar, pl_Float fov,
  286. pl_uChar *fb, pl_ZBuffer *zb);
  287. /*
  288. plCamSetTarget() sets the target of a camera allocated with plCamCreate().
  289. Parameters:
  290. c: the camera to set the target of
  291. x,y,z: the worldspace coordinate of the target
  292. Returns:
  293. nothing
  294. Notes:
  295. Sets the pitch and pan of the camera. Does not touch the roll.
  296. */
  297. void plCamSetTarget(pl_Cam *c, pl_Float x, pl_Float y, pl_Float z);
  298. /*
  299. plCamDelete() frees all memory associated with a camera excluding
  300. framebuffers and Z buffers
  301. Paramters:
  302. c: camera to free
  303. Returns:
  304. nothing
  305. */
  306. void plCamDelete(pl_Cam *c);
  307. /******************************************************************************
  308. ** Easy Rendering Interface (render.c)
  309. ******************************************************************************/
  310. /*
  311. plRenderBegin() begins the rendering process.
  312. Parameters:
  313. Camera: camera to use for rendering
  314. Returns:
  315. nothing
  316. Notes:
  317. Only one rendering process can occur at a time.
  318. Uses plClip*(), so don't use them within or around a plRender() block.
  319. */
  320. void plRenderBegin(pl_Cam *Camera);
  321. /*
  322. plRenderLight() adds a light to the scene.
  323. Parameters:
  324. light: light to add to scene
  325. Returns:
  326. nothing
  327. Notes: Any objects rendered before will be unaffected by this.
  328. */
  329. void plRenderLight(pl_Light *light);
  330. /*
  331. plRenderObj() adds an object and all of it's subobjects to the scene.
  332. Parameters:
  333. obj: object to render
  334. Returns:
  335. nothing
  336. Notes: if Camera->Sort is zero, objects are rendered in the order that
  337. they are added to the scene.
  338. */
  339. void plRenderObj(pl_Obj *obj);
  340. /*
  341. plRenderEnd() actually does the rendering, and closes the rendering process
  342. Paramters:
  343. none
  344. Returns:
  345. nothing
  346. */
  347. void plRenderEnd();
  348. /******************************************************************************
  349. ** Object Primitives Code (make.c)
  350. ******************************************************************************/
  351. /*
  352. plMakePlane() makes a plane centered at the origin facing up the y axis.
  353. Parameters:
  354. w: width of the plane (along the x axis)
  355. d: depth of the plane (along the z axis)
  356. res: resolution of plane, i.e. subdivisions
  357. m: material to use
  358. Returns:
  359. pointer to object created.
  360. */
  361. pl_Obj *plMakePlane(pl_Float w, pl_Float d, pl_uInt res, pl_Mat *m);
  362. /*
  363. plMakeBox() makes a box centered at the origin
  364. Parameters:
  365. w: width of the box (x axis)
  366. d: depth of the box (z axis)
  367. h: height of the box (y axis)
  368. Returns:
  369. pointer to object created.
  370. */
  371. pl_Obj *plMakeBox(pl_Float w, pl_Float d, pl_Float h, pl_Mat *m);
  372. /*
  373. plMakeCone() makes a cone centered at the origin
  374. Parameters:
  375. r: radius of the cone (x-z axis)
  376. h: height of the cone (y axis)
  377. div: division of cone (>=3)
  378. cap: close the big end?
  379. m: material to use
  380. Returns:
  381. pointer to object created.
  382. */
  383. pl_Obj *plMakeCone(pl_Float r, pl_Float h, pl_uInt div, pl_Bool cap, pl_Mat *m);
  384. /*
  385. plMakeCylinder() makes a cylinder centered at the origin
  386. Parameters:
  387. r: radius of the cylinder (x-z axis)
  388. h: height of the cylinder (y axis)
  389. divr: division of of cylinder (around the circle) (>=3)
  390. captop: close the top
  391. capbottom: close the bottom
  392. m: material to use
  393. Returns:
  394. pointer to object created.
  395. */
  396. pl_Obj *plMakeCylinder(pl_Float r, pl_Float h, pl_uInt divr, pl_Bool captop,
  397. pl_Bool capbottom, pl_Mat *m);
  398. /*
  399. plMakeSphere() makes a sphere centered at the origin.
  400. Parameters:
  401. r: radius of the sphere
  402. divr: division of the sphere (around the y axis) (>=3)
  403. divh: division of the sphere (around the x,z axis) (>=3)
  404. m: material to use
  405. Returns:
  406. pointer to object created.
  407. */
  408. pl_Obj *plMakeSphere(pl_Float r, pl_uInt divr, pl_uInt divh, pl_Mat *m);
  409. /*
  410. plMakeTorus() makes a torus centered at the origin
  411. Parameters:
  412. r1: inner radius of the torus
  413. r2: outer radius of the torus
  414. divrot: division of the torus (around the y axis) (>=3)
  415. divrad: division of the radius of the torus (x>=3)
  416. m: material to use
  417. Returns:
  418. pointer to object created.
  419. */
  420. pl_Obj *plMakeTorus(pl_Float r1, pl_Float r2, pl_uInt divrot,
  421. pl_uInt divrad, pl_Mat *m);
  422. /******************************************************************************
  423. ** File Readers (read_*.c)
  424. ******************************************************************************/
  425. /*
  426. plRead3DSObj() reads a 3DS object
  427. Parameters:
  428. fn: filename of object to read
  429. m: material to assign it
  430. Returns:
  431. pointer to object
  432. Notes:
  433. This reader organizes multiple objects like so:
  434. 1) the first object is returned
  435. 2) the second object is the first's first child
  436. 3) the third object is the second's first child
  437. 4) etc
  438. */
  439. pl_Obj *plRead3DSObj(char *fn, pl_Mat *m);
  440. /*
  441. plReadCOBObj() reads an ascii .COB object
  442. Parameters:
  443. fn: filename of object to read
  444. mat: material to assign it
  445. Returns:
  446. pointer to object
  447. Notes:
  448. This is Caligari's ASCII object format.
  449. This reader doesn't handle multiple objects. It just reads the first one.
  450. Polygons with lots of sides are not always tesselated correctly. Just
  451. use the "Tesselate" button from within truespace to improve the results.
  452. */
  453. pl_Obj *plReadCOBObj(char *fn, pl_Mat *mat);
  454. /*
  455. plReadJAWObj() reads a .JAW object.
  456. Parameters:
  457. fn: filename of object to read
  458. m: material to assign it
  459. Returns:
  460. pointer to object
  461. Notes:
  462. For information on the .JAW format, please see the jaw3D homepage,
  463. http://www.tc.umn.edu/nlhome/g346/kari0022/jaw3d/
  464. */
  465. pl_Obj *plReadJAWObj(char *fn, pl_Mat *m);
  466. /*
  467. plReadPCXTex() reads a 8bpp PCX texture
  468. Parameters:
  469. fn: filename of texture to read
  470. rescale: will rescale image if not whole log2 dimensions (USE THIS)
  471. optimize: will optimize colors (USE THIS TOO)
  472. Returns:
  473. pointer to texture
  474. Notes:
  475. The PCX must be a 8bpp zSoft version 5 PCX. The texture's palette will
  476. be optimized, and the texture might be scaled up so that it's dimensions
  477. will be a nice power of two.
  478. */
  479. pl_Texture *plReadPCXTex(char *fn, pl_Bool rescale, pl_Bool optimize);
  480. /******************************************************************************
  481. ** Math Code (math.c)
  482. ******************************************************************************/
  483. /*
  484. plMatrixRotate() generates a rotation matrix
  485. Parameters:
  486. matrix: an array of 16 pl_Floats that is a 4x4 matrix
  487. m: the axis to rotate around, 1=X, 2=Y, 3=Z.
  488. Deg: the angle in degrees to rotate
  489. Returns:
  490. nothing
  491. */
  492. void plMatrixRotate(pl_Float matrix[], pl_uChar m, pl_Float Deg);
  493. /*
  494. plMatrixTranslate() generates a translation matrix
  495. Parameters:
  496. m: the matrix (see plMatrixRotate for more info)
  497. x,y,z: the translation coordinates
  498. Returns:
  499. nothing
  500. */
  501. void plMatrixTranslate(pl_Float m[], pl_Float x, pl_Float y, pl_Float z);
  502. /*
  503. plMatrixMultiply() multiplies two matrices
  504. Parameters:
  505. dest: destination matrix will be multipled by src
  506. src: source matrix
  507. Returns:
  508. nothing
  509. Notes:
  510. this is the same as dest = dest*src (since the order *does* matter);
  511. */
  512. void plMatrixMultiply(pl_Float *dest, pl_Float src[]);
  513. /*
  514. plMatrixApply() applies a matrix.
  515. Parameters:
  516. m: matrix to apply
  517. x,y,z: input coordinate
  518. outx,outy,outz: pointers to output coords.
  519. Returns:
  520. nothing
  521. Notes:
  522. applies the matrix to the 3d point to produce the transformed 3d point
  523. */
  524. void plMatrixApply(pl_Float *m, pl_Float x, pl_Float y, pl_Float z,
  525. pl_Float *outx, pl_Float *outy, pl_Float *outz);
  526. /*
  527. plNormalizeVector() makes a vector a unit vector
  528. Parameters:
  529. x,y,z: pointers to the vector
  530. Returns:
  531. nothing
  532. */
  533. void plNormalizeVector(pl_Float *x, pl_Float *y, pl_Float *z);
  534. /*
  535. plDotProduct() returns the dot product of two vectors
  536. Parameters:
  537. x1,y1,z1: the first vector
  538. x2,y2,z2: the second vector
  539. Returns:
  540. the dot product of the two vectors
  541. */
  542. pl_Float plDotProduct(pl_Float x1, pl_Float y1, pl_Float z1,
  543. pl_Float x2, pl_Float y2, pl_Float z2);
  544. /******************************************************************************
  545. ** Spline Interpolation (spline.c)
  546. ******************************************************************************/
  547. /*
  548. plSplineInit() initializes a spline
  549. Parameters:
  550. s: the spline
  551. Returns:
  552. nothing
  553. Notes:
  554. Intializes the spline. Do this once, or when you change any of the settings
  555. */
  556. void plSplineInit(pl_Spline *s);
  557. /*
  558. plSplineGetPoint() gets a point on the spline
  559. Parameters:
  560. s: spline
  561. frame: time into spline. 0.0 is start, 1.0 is second key point, etc.
  562. out: a pointer to an array of s->keyWidth floats that will be filled in.
  563. Returns:
  564. nothing
  565. */
  566. void plSplineGetPoint(pl_Spline *s, pl_Float frame, pl_Float *out);
  567. /******************************************************************************
  568. ** 8xX Bitmapped Text
  569. ******************************************************************************/
  570. /*
  571. plTextSetFont() sets the font to be used by the plText*() functions.
  572. Parameters:
  573. font: a pointer to a 8xX bitmapped font
  574. height: the height of the font (X)
  575. Returns:
  576. nothing
  577. */
  578. void plTextSetFont(pl_uChar *font, pl_uChar height);
  579. /*
  580. plTextPutChar() puts a character to a camera
  581. Parameters:
  582. cam: The camera. If the camera has a zBuffer, it will be used.
  583. x: the x screen position of the left of the text
  584. y: the y screen position of the top of the text
  585. z: the depth of the text (used when cam->zBuffer is set)
  586. color: the color to make the text
  587. c: the character to put. Special characters such as '\n' aren't handled.
  588. Returns:
  589. nothing
  590. */
  591. void plTextPutChar(pl_Cam *cam, pl_sInt x, pl_sInt y, pl_Float z,
  592. pl_uChar color, pl_uChar c);
  593. /*
  594. plTextPutString() puts an array of characters to a camera
  595. Parameters:
  596. cam: The camera. If the camera has a zBuffer, it will be used.
  597. x: the x screen position of the left of the text
  598. y: the y screen position of the top of the text
  599. z: the depth of the text (used when cam->zBuffer is set)
  600. color: the color to make the text
  601. string:
  602. the characters to put. '\n' and '\t' are handled as one would expect
  603. Returns:
  604. nothing
  605. */
  606. void plTextPutStr(pl_Cam *cam, pl_sInt x, pl_sInt y, pl_Float z,
  607. pl_uChar color, pl_sChar *string);
  608. /*
  609. plTextPrintf() is printf() for graphics
  610. Parameters:
  611. cam: The camera. If the camera has a zBuffer, it will be used.
  612. x: the x screen position of the left of the text
  613. y: the y screen position of the top of the text
  614. z: the depth of the text (used when cam->zBuffer is set)
  615. color: the color to make the text
  616. format:
  617. the characters to put, with printf() formatting codes.
  618. '\n' and '\t' are handled as one would expect
  619. ...: any additional parameters specified by format
  620. Returns:
  621. nothing
  622. */
  623. void plTextPrintf(pl_Cam *cam, pl_sInt x, pl_sInt y, pl_Float z,
  624. pl_uChar color, pl_sChar *format, ...);
  625. /******************************************************************************
  626. ** Built-in Rasterizers
  627. ******************************************************************************/
  628. void plPF_SolidF(pl_Cam *, pl_Face *);
  629. void plPF_SolidG(pl_Cam *, pl_Face *);
  630. void plPF_TexF(pl_Cam *, pl_Face *);
  631. void plPF_TexG(pl_Cam *, pl_Face *);
  632. void plPF_TexEnv(pl_Cam *, pl_Face *);
  633. void plPF_PTexF(pl_Cam *, pl_Face *);
  634. void plPF_PTexG(pl_Cam *, pl_Face *);
  635. void plPF_TransF(pl_Cam *, pl_Face *);
  636. void plPF_TransG(pl_Cam *, pl_Face *);
  637. #ifdef __cplusplus
  638. }
  639. #endif
  640. #endif /* !_PLUSH_H_ */