PAlib: 3D functions

Main Page | Modules | File List | Globals | Search for

# 3D functions

## Data Structures

struct | PA_3DObject

## Functions

void | PA_Init3D (void)
| Initialise the 3d !!! Big thanks to Delfare for all the 3d functions !
void | PA_LoadSplash3D (void)
| Load a PlayerAdvance splash screen... It's always nice to give some credit ;)
void | PA_Init3DDrawing (float x1, float y1, float z1, float x2, float y2, float z2)
| takes care of the perspective, (x1,y1,z1) is the position of the camera, (x2,y2,z2) is where the camera looks at
void | PA_glulookat (float eyex, float eyey, float eyez, float lookAtx, float lookAty, float lookAtz, float upx, float upy, float upz)
| takes care of the camera, (eyex,eyey,eyez) is the position of the camera, (lookAtx,lookAty,lookAtz) is where the camera looks at, (upx,upy,upz) is the coord of the up
void | PA_image8to16 (sImage *img)
void | PA_VueKeys (void)
| takes care of the sight with the keys, (viseeX,viseeY,viseeZ) is where the camera looks at, you must use PA_glulookat with viseeX,viseeY and viseeZ
void | PA_LoadTexture (int numtexture, u8 *nomtexture, int mode)
| load a texture
void | PA_Texture (int numtexture)
| use a texture
void | PA_3DBox (float x, float y, float z, float longueur, float largeur, float hauteur, float rotatex, float rotatey, float rotatez, uint8 red, uint8 green, uint8 blue)
| create a 3D box
void | PA_3DBoxTexture (float x, float y, float z, float longueur, float largeur, float hauteur, float rotatex, float rotatey, float rotatez, uint8 red, uint8 green, uint8 blue)
| Create a 3D Box, but with a nice texture...
void | PA_Rotate3D (float x, float y, float z)
| rotate
void | PA_Translate3D (float x, float y, float z)
| translate
void | PA_Scale3D (float x, float y, float z)
| scale
void | PA_Vertex3D (float x, float y, float z)
| create a vertex without floattov16
void | PA_3Dto2D ()
| you must use it for use PA_Vertex2D
void | PA_Vertex2D (int x, int y)
| create a vertex in 2D
void | PA_TexCoord (float x, float y)
| use the tex coord
int | PA_InitCallList (struct PA_3DObject obj)
int | PA_VertexCallList (struct PA_3DObject obj, float x, float y, float z)
int | PA_TexCoordCallList (struct PA_3DObject obj, int x, int y)
int | PA_EndCallList (struct PA_3DObject obj)
int | PA_Draw3Dobject (struct PA_3DObject obj)
int | PA_ScaleCallList (struct PA_3DObject obj, float x, float y, float z)

## Detailed Description

Say thanks to Delfare for all these ! And check out http://delfare.pizz.biz for how to use them...

## Function Documentation

void PA_3DBox | ( | float | x,
|  | float | y,
|  | float | z,
|  | float | longueur,
|  | float | largeur,
|  | float | hauteur,
|  | float | rotatex,
|  | float | rotatey,
|  | float | rotatez,
|  | uint8 | red,
|  | uint8 | green,
|  | uint8 | blue
| ) |

create a 3D box

Parameters:

  | x | Box X position
  | y | Box Y position
  | z | Box Z position
  | longueur | Box length
  | largeur | Box width
  | hauteur | Box height
  | rotatex | rotate x
  | rotatey | rotate y
  | rotatez | rotate z
  | red | red color(max 31)
  | green | green color(max 31)
  | blue | blue color(max 31)

void PA_3DBoxTexture | ( | float | x,
|  | float | y,
|  | float | z,
|  | float | longueur,
|  | float | largeur,
|  | float | hauteur,
|  | float | rotatex,
|  | float | rotatey,
|  | float | rotatez,
|  | uint8 | red,
|  | uint8 | green,
|  | uint8 | blue
| ) |

Create a 3D Box, but with a nice texture...

Parameters:

  | x | Box X position
  | y | Box Y position
  | z | Box Z position
  | longueur | Box length
  | largeur | Box width
  | hauteur | Box height
  | rotatex | rotate x
  | rotatey | rotate y
  | rotatez | rotate z
  | red | red color(max 31)
  | green | green color(max 31)
  | blue | blue color(max 31)

void PA_glulookat | ( | float | eyex,
|  | float | eyey,
|  | float | eyez,
|  | float | lookAtx,
|  | float | lookAty,
|  | float | lookAtz,
|  | float | upx,
|  | float | upy,
|  | float | upz
| ) |

takes care of the camera, (eyex,eyey,eyez) is the position of the camera, (lookAtx,lookAty,lookAtz) is where the camera looks at, (upx,upy,upz) is the coord of the up

Parameters:

  | eyex | X position of the camera
  | eyey | Y position of the camera
  | eyez | Z position of the camera
  | lookAtx | X position to look at
  | lookAty | Y position to look at
  | lookAtz | Z position to look at
  | upx | X position of the top
  | upy | Y position of the top
  | upz | Z position of the top

void PA_Init3DDrawing | ( | float | x1,
|  | float | y1,
|  | float | z1,
|  | float | x2,
|  | float | y2,
|  | float | z2
| ) |

takes care of the perspective, (x1,y1,z1) is the position of the camera, (x2,y2,z2) is where the camera looks at

Parameters:

  | x1 | X position of the camera
  | y1 | Y position of the camera
  | z1 | Z position of the camera
  | x2 | X position to look at
  | y2 | Y position to look at
  | z2 | Z position to look at

inline void PA_LoadTexture | ( | int | numtexture,
|  | u8 * | nomtexture,
|  | int | mode
| ) | `[inline]`

load a texture

Parameters:

  | numtexture | number of texture to load...
  | nomtexture | Texture to load...
  | mode | texBIN or texPCX

void PA_Rotate3D | ( | float | x,
|  | float | y,
|  | float | z
| ) | `[inline]`

rotate

Parameters:

  | x | rotate x
  | y | rotate y
  | z | rotate z

void PA_Scale3D | ( | float | x,
|  | float | y,
|  | float | z
| ) | `[inline]`

scale

Parameters:

  | x | scale x
  | y | scale y
  | z | scale z

void PA_TexCoord | ( | float | x,
|  | float | y
| ) | `[inline]`

use the tex coord

Parameters:

  | x | X position
  | y | Y position

inline void PA_Texture | ( | int | numtexture | ) | `[inline]`

use a texture

Parameters:

  | numtexture | number of texture to use...

void PA_Translate3D | ( | float | x,
|  | float | y,
|  | float | z
| ) | `[inline]`

translate

Parameters:

  | x | translate x
  | y | translate y
  | z | translate z

inline void PA_Vertex2D | ( | int | x,
|  | int | y
| ) | `[inline]`

create a vertex in 2D

Parameters:

  | x | X position
  | y | Y position

inline void PA_Vertex3D | ( | float | x,
|  | float | y,
|  | float | z
| ) | `[inline]`

create a vertex without floattov16

Parameters:

  | x | X position
  | y | Y position
  | z | Z position