Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bug Reports

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-12-2007, 11:02 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default Azone utility bug: Faces that intersect a node but have no vertices in that node

I've run across a couple of small bugs in the azone utility which
means that some faces which intersect a node, but don't have any
vertices in that node, will not be included in the facelist for
that node.

E.g. in the case shown in this picture:



The first bug is in one of the GPoint constructors:

azone.cpp, Line 1155:

Change:

Code:
GPoint::GPoint(float x, float y, float z) {
        x = x;
        y = y;
        z = z;
}
to

Code:
GPoint::GPoint(float nx, float ny, float nz) {
        x = nx;
        y = ny;
        z = nz;
}
The second bug is in the edges_cross function. Take the following
example of two lines which intersect.



The following code illustrates the bug, it returns FALSE:

Code:
        GPoint p1(100,100,0), p2(100,300,0);
        VERTEX p3, p4;
        p3.x=300;p3.y=200;p3.z=0;
        p4.x=50;p4.y=200;p4.z=0;
        printf("edges_cross returns %d\n", edges_cross(&p1,&p2,&p3,&p4));
The fix is to change:

azone.cpp, Line 868:

from
Code:
#define CoordOnLine(p1, p2, coord, dim) \
 (p1->dim > p2->dim? (coord > p2->dim && coord < p1->dim) : (coord > p1->dim && coord < p2->dim))
to

Code:
#define CoordOnLine(p1, p2, coord, dim) \
 (p1->dim > p2->dim? (coord >= p2->dim && coord <= p1->dim) : (coord >= p1->dim && coord <= p2->dim))
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:35 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3