SEO [PR] 爆速!無料ブログ 無料ホームページ開設 無料ライブ放送

B_3d_lib.cpp の解説

#include "stdafx.h"
#include "B_3d_lib.h"
#include <math.h>

B_3d_lib.cppのインクルード依存関係図

Include dependency graph

構成

struct  Poly_MinMax_T

マクロ定義

#define SWAP(a, b)   ((a)^=(b),(b)^=(a),(a)^=(b))

関数

polygon_type set_poly ()
int getline ()
SDWORD FixedMul (SDWORD const num1, SDWORD const num2)
int loadpoly2 (polygon_type *l_polygon, char *filename, int *l_vertex_num)
void project (polygon_type *polygon, int distance, int vertex_num)
void inittrans ()
void matmult (float result[4][4], float mat1[4][4], float mat2[4][4])
void matcopy (float dest[4][4], float source[4][4])
void scale (float sf)
void translate (float xt, float yt, float zt)
void rotate (float ax, float ay, float az)
void transform (polygon_type *polygon, int vertex_num)
int getnumber (FILE *f)
char nextchar (FILE *f)
int backface (struct polygon_type p, struct men_type men)
float SquareMagnitude (struct vector &v)
float Magnitude (struct vector &v)
void Normalize (struct vector &v)
void draw_shape (polygon_type polygon, int color, int vertex_num)

変数

vertex_type cube_vertices [] = {NULL}
vertex_type cube_tex_vertex []
line_type cube_line [] = {NULL}
men_type cube_men [12] = {NULL}
vector data [12][4]
polygon_type polygon
FILE * f
int num
int groupcode
char linbuf [2048]
float matrix [4][4]
float smat [4][4]
float zmat [4][4]
float xmat [4][4]
float ymat [4][4]
float tmat [4][4]
char buff [256]
const int XORIGIN = 320
const int YORIGIN = 240
float naiseking

マクロ定義の解説

#define SWAP a,
b   )     ((a)^=(b),(b)^=(a),(a)^=(b))
 


関数の解説

int backface struct polygon_type  p,
struct men_type  men
 

void draw_shape polygon_type  polygon,
int  color,
int  vertex_num
 

SDWORD FixedMul SDWORD const  num1,
SDWORD const  num2
 

int getline  ) 
 

int getnumber FILE *  f  ) 
 

void inittrans  ) 
 

int loadpoly2 polygon_type *  l_polygon,
char *  filename,
int *  l_vertex_num
 

float Magnitude struct vector &  v  ) 
 

void matcopy float  dest[4][4],
float  source[4][4]
 

void matmult float  result[4][4],
float  mat1[4][4],
float  mat2[4][4]
 

char nextchar FILE *  f  ) 
 

void Normalize struct vector &  v  ) 
 

void project polygon_type *  polygon,
int  distance,
int  vertex_num
 

void rotate float  ax,
float  ay,
float  az
 

void scale float  sf  ) 
 

polygon_type set_poly  ) 
 

float SquareMagnitude struct vector &  v  ) 
 

void transform polygon_type *  polygon,
int  vertex_num
 

void translate float  xt,
float  yt,
float  zt
 


変数の解説

char buff[256]
 

line_type cube_line[] = {NULL}
 

men_type cube_men[12] = {NULL}
 

vertex_type cube_tex_vertex[]
 

初期値:

{
    0,0,0,0,    
    0,0,0,0,
    0,0,0,0,

    127,0,0,0,  
    0,0,0,0,
    0,0,0,0,
    
    0,127,0,0,  
    0,0,0,0,
    0,0,0,0,
    
    127,127,0,0,    
    0,0,0,0,
    0,0,0,0,

}

vertex_type cube_vertices[] = {NULL}
 

vector data[12][4]
 

FILE* f
 

int groupcode
 

char linbuf[2048]
 

float matrix[4][4]
 

float naiseking
 

int num
 

polygon_type polygon
 

初期値:

{
    0,0,200,        
    1,              
    0,0,0,          
    12,             
    12,             
    12,             
    
    cube_line,      
    cube_vertices,  
    cube_men,       
    cube_tex_vertex
}

float smat[4][4]
 

float tmat[4][4]
 

float xmat[4][4]
 

const int XORIGIN = 320
 

float ymat[4][4]
 

const int YORIGIN = 240
 

float zmat[4][4]
 


DxLib Extension Library ( DxEx )に対してThu Aug 21 13:18:58 2003に生成されました。 doxygen1.3