Quantcast
Viewing all articles
Browse latest Browse all 40524

Tubular primitives

@julapy, some more debugging. If I define the point as follow

    auto point1 = ofVec3f(0, 0, 0);
    auto point2 = ofVec3f(0, 0, 100);
    auto point3 = ofVec3f(0, 0, 100);
    auto point4 = ofVec3f(100, 0, 200);
    auto point5 = ofVec3f(0, 0, 100);
    auto point6 = ofVec3f(-100, 0, 200);

The trunk is not displayed. But if i change the point 2 like this:

auto point2 = ofVec3f(0, 1, 100);

or the point 1 like this:

auto point1 = ofVec3f(0, 1, 0);

The trunk is displayed.

It looks it is a problem with the normals, at line 70 of ofxTubePrimitive.cpp. When the 2 ofVec3 has the same x and y, the normals are messed.


Viewing all articles
Browse latest Browse all 40524

Trending Articles