Box side normals


#1

I’m trying to get the normal of the TOP_SIDE of an ofBoxPrimitive but it’s always <0, -1, 0> in spite of the transforms I applied to the box. I applied these transforms:

box.rotate(45.0f, 0.0, 1.0, 0.0);
box.rotate(-45.0f, 1.0, 0.0, 0.0);
ofRotate(angle, 0, 1, 0);
ofMesh side = box.getSideMesh(ofBoxPrimitive::BoxSides::SIDE_TOP);
ofVec3f normal = side.getNormals()[0];
std::cout<<normal<<std::endl; // 0, -1, 0

The normal returned from getNormals isn’t taking into account the transforms. How do I apply them?

The overarching problem is defining a plane using a vertex on the side and the side’s normal.