我自己写的3D图形数学库。。。有点乱!

// Det.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#define M 3//矩阵大小
#include 
#include 
#include 
#include 
#include 
#include "ArrayInterTriangle.h"

#define FRAND   (((float)rand()-(float)rand())/RAND_MAX)
float  hanglieshi(float array[M][M])
{//计算行列式
   float temp[M][2*M];
   int i,j,c,c1;
   float result=0,t=1;
   for(i=0;i

 

#ifndef __ArrayInterTriangle_H__
#define __ArrayInterTriangle_H__
#define DotProduct(x,y) ((x)[0] * (y)[0] + (x)[1] * (y)[1] + (x)[2] * (y)[2]);
bool IsIntersectWithTriangle(float org[3],float dir[3],float a[3],float b[3],float c[3],float point[3],bool &IsFromFront);
void VectBinus(float a[3],float b[3],float c[3]);
bool qiuPingMianFangCheng(float a[3],float b[3],float c[3],float flat_4[4]);
void qiuFaXiangLiang(float a[3],float b[3],float c[3],float faXiangLiang[3]);
bool calInsert(float org[3],float dir[3],float flat[4],float intersection[3]);
bool IsTriangle(float a[3],float b[3],float c[3]);
#endif

 

你可能感兴趣的:(C,C#,J#,C++)