[source lang = 'java']
//creating a ray starting starting at the face baricenter going to the normal direction
Point3d p0= new Point3d();
p0.x = (v1.x + v2.x + v3.x)/3d;
p0.y = (v1.y + v2.y + v3.y)/3d;
p0.z = (v1.z + v2.z + v3.z)/3d;
Line ray = new Line(getNormal(),p0);
[java] 3d keyword
I was just browsing somebody else's source code so I could figure out how to implement csg when I saw this
does anybody know what the 3d keyword means?
the 3d keyword mean that the point is in a 3 dimensional plane, not only does it have an x and y axis but a z axis as well.
D or d indicates that the number is a double precision floating point number.
He could have used 3.0 instead, but 3d was funnier i suppose.
He could have used 3.0 instead, but 3d was funnier i suppose.
it's not a keyword ... it means they're dividing by 3 as an double rather than a float or integer. I forget the exact name of the letter, but put "f" after values you want treated as floats
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement