PDA

View Full Version : Sorting out duplicate vertices [THE ACTUAL POST]

Vexator
11-07-2005, 03:08 AM
sry for the double post, i forgot to log in! moderator, plz delete the other thread :(

-----------------------------------------------

hey! i've got a problem which most of you probaby have solved yet and as i'm stuck for days i thought i'd ask you :p

this is my vertex struct:

</font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">struct vxVertex
{
float Map[2];
float Normal[3];
float Position[3];

inline bool operator ==( const vxVertex &v ) const { return ( (fabs(Map[0]-v.Map[0]) < 0.0001f) && (fabs(Map[1]-v.Map[1]) < 0.0001f) && (fabs(Normal[0]-v.Normal[0]) < 0.0001f) && (fabs(Normal[1]-v.Normal[1]) < 0.0001f) && (fabs(Normal[2]-v.Normal[2]) < 0.0001f) && (fabs(Position[0]-v.Position[0]) < 0.0001f) && (fabs(Position[1]-v.Position[1]) < 0.0001f) && (fabs(Position[2]-v.Position[2]) < 0.0001f) ); }
inline bool operator !=( const vxVertex &v ) const { return ( (fabs(Map[0]-v.Map[0]) > 0.0001f)

Vexator
11-07-2005, 03:09 AM
hey! i've got a problem which most of you probaby have solved yet and as i'm stuck for days i thought i'd ask you :p

this is my vertex struct:

</font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">struct vxVertex
{
float Map[2];
float Normal[3];
float Position[3];

inline bool operator ==( const vxVertex &v ) const { return ( (fabs(Map[0]-v.Map[0]) < 0.0001f) && (fabs(Map[1]-v.Map[1]) < 0.0001f) && (fabs(Normal[0]-v.Normal[0]) < 0.0001f) && (fabs(Normal[1]-v.Normal[1]) < 0.0001f) && (fabs(Normal[2]-v.Normal[2]) < 0.0001f) && (fabs(Position[0]-v.Position[0]) < 0.0001f) && (fabs(Position[1]-v.Position[1]) < 0.0001f) && (fabs(Position[2]-v.Position[2]) < 0.0001f) ); }
inline bool operator !=( const vxVertex &v ) const { return ( (fabs(Map[0]-v.Map[0]) > 0.0001f)

Vexator
11-07-2005, 03:12 AM
argh whats wrong with the forum?! i get logged out as soon as i want to edit my posts :( and only the first lines are saved Oo

Overmind
11-07-2005, 04:39 AM
I think the problem is that the forum cuts posts whenever you put &#0124;&#0124; in your code...

Vexator
11-07-2005, 07:09 AM
d'oh.. crap.
so could one of the mods plz delete these two threads so that i can start over once again? ^^ thx..