Commit 6ad6141f by Zoltan Karsa

bugfix

parent 650b979a
......@@ -86,7 +86,7 @@ __device__ inline bool intriangle(const vec3& Q, const vec3& A, const vec3& B, c
__device__ inline int stabil_ep(const vec3& S, const vec3& C, const vec3& D) {
int cnt = 0;
vec3 A(0, 0, 0), B(0, 0, 1.0);
vec3 A(0, 0, 0), B(1.0, 0, 0.0);
// ABC oldal:
vec3 planeNN = normalize(cross(B-A, C-A));
vec3 P = intersection(planeNN, A, S);
......@@ -128,7 +128,7 @@ __device__ inline bool instabil_ell(const vec3& S, const vec3& X, const vec3& A,
__device__ inline int instabil_ep(const vec3& S, const vec3& C, const vec3& D) {
int cnt = 0;
vec3 A(0, 0, 0), B(0, 0, 1.0);
vec3 A(0, 0, 0), B(1.0, 0, 0.0);
// D CSUCSNAL
if (instabil_ell(S, D, A, B, C))
cnt++;
......@@ -166,7 +166,7 @@ __device__ inline bool nyereg_ell(const vec3& S, const vec3& X1, const vec3& X2,
__device__ inline int nyereg_ep(const vec3& S, const vec3& C, const vec3& D) {
int cnt = 0;
vec3 A(0, 0, 0), B(0, 0, 1.0);
vec3 A(0, 0, 0), B(1.0, 0.0, 0.0);
if (nyereg_ell(S, A, B, C, D))
cnt++;
......@@ -190,13 +190,13 @@ __device__ void ABC_oldal(int v, int w, const vec3& C, const vec3& D, char* egys
vec3 AB(1.0/v, 0.0, 0.0);
vec3 AC = C/v;
for (double i = 0.0001; i < v; i++)
for (double i = 0.0; i < v; i++)
{
for (double j = 0.0001; j < v; j++)
for (double j = 0.0; j < v; j++)
{
vec3 K = i*AB + j * AC;
vec3 L = (D - K)/w;
for (double k = 0.0001; k < w; k++)
for (double k = 0.0; k < w; k++)
{
vec3 Sv = K + L*k;
int S = stabil_ep(Sv, C, D);
......@@ -213,17 +213,17 @@ __device__ void ABC_oldal(int v, int w, const vec3& C, const vec3& D, char* egys
__device__ void BCD_oldal(int v, int w, const vec3& C, const vec3& D, char* egysulyi_mtx) {
int pos = blockDim.x * blockIdx.x + threadIdx.x;
vec3 A(0.0, 0.0, 0.0), B(0.0, 0.0, 1.0);
vec3 A(0.0, 0.0, 0.0), B(1.0, 0.0, 0.0);
vec3 BC = (C - B) / v;
vec3 BD = (D - B) / v;
for (double i = 0.0001; i < v; i++)
for (double i = 0.0; i < v; i++)
{
for (double j = 0.0001; j < v; j++)
for (double j = 0.0; j < v; j++)
{
vec3 K = B + i * BC + j * BD;
vec3 L = (A - K)/w;
for (double k = 0.0001; k < w; k++)
for (double k = 0.0; k < w; k++)
{
vec3 Sv = K + L*k;
int S = stabil_ep(Sv, C, D);
......@@ -240,17 +240,17 @@ __device__ void BCD_oldal(int v, int w, const vec3& C, const vec3& D, char* egys
__device__ void CDA_oldal(int v, int w, const vec3& C, const vec3& D, char* egysulyi_mtx) {
int pos = blockDim.x * blockIdx.x + threadIdx.x;
vec3 A(0.0, 0.0, 0.0), B(0.0, 0.0, 1.0);
vec3 A(0.0, 0.0, 0.0), B(1.0, 0.0, 0.0);
vec3 CA = (A - C) / v;
vec3 CD = (D - C) / v;
for (double i = 0.0001; i < v; i++)
for (double i = 0.0; i < v; i++)
{
for (double j = 0.0001; j < v; j++)
for (double j = 0.0; j < v; j++)
{
vec3 K = C + i * CA + j * CD;
vec3 L = (B - K)/w;
for (double k = 0.0001; k < w; k++)
for (double k = 0.0; k < w; k++)
{
vec3 Sv = K + L*k;
int S = stabil_ep(Sv, C, D);
......@@ -267,17 +267,17 @@ __device__ void CDA_oldal(int v, int w, const vec3& C, const vec3& D, char* egys
__device__ void DAB_oldal(int v, int w, const vec3& C, const vec3& D, char* egysulyi_mtx) {
int pos = blockDim.x * blockIdx.x + threadIdx.x;
vec3 A(0.0, 0.0, 0.0), B(0.0, 0.0, 1.0);
vec3 A(0.0, 0.0, 0.0), B(1.0, 0.0, 0.0);
vec3 DA = (A - D) / v;
vec3 DB = (B - D) / v;
for (double i = 0.0001; i < v; i++)
for (double i = 0.0; i < v; i++)
{
for (double j = 0.0001; j < v; j++)
for (double j = 0.0; j < v; j++)
{
vec3 K = D + i * DA + j * DB;
vec3 L = (C - K)/w;
for (double k = 0.0001; k < w; k++)
for (double k = 0.0; k < w; k++)
{
vec3 Sv = K + L*k;
int S = stabil_ep(Sv, C, D);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment