I’m creating a ifc importer in opengl and i read a 3d transform matrix that must be multiplied for some 2d points (a section) in x and y
the matrix show a 45 degree rotation, but this matrix is a 3d matrix and not a 2d matrix.
the values are:
row1(calculated with cross product of the two precedent axis):
my problem is that the trasformation is applied to some 2d points and the point’s are translated from x/y to y/z. Is possible?
Or there is an error?
I don’t find in the ifc specifics trace of this type(from x/y to y/z).
I ask .
this is the specific of the IfcAxis2Placement3D
see the IfcAxis2Placement3D after select alphabetical listing.
from this i create a 3x3 rotation matrix, in my project the up axis is the z.
i have also the extrude direction vector , that is the axis around i must do the rotation , but how i can assemble all for create a correct 2d rotation matrix
Can you write me an example of a 3d rotation matrix for a 2d rotation?
How i must trasform a 3x3 rotation matrix for obtain a 2d rotation matrix on xy ?
Instead of using a 3d rotation matrix on a 2d point, why not just set the z of all your 2d points to 0 and do regular 3d transforms on them? It’s the very same (2d is identical to 3d with z=0 or some other constant value).
i doo that you ave saw.
but i understand the problem:
I have a block in my code that return an array of x and y coords for a section manager.
The problem is that if i have the direction of the beam(a line) in the z coord i must take the y and z coords if i have a beam direction of x ,the x and the z(i suppose and this is the second question) ecc… .
The chose of the x,y or z coord to put in the x/ y array depends on the direction of the beam.
How i can calculate what are the source coord to put in the x/y array?
and that depends of the direction of the beam?
for the direction , no problem i have the start point of the beam and the end point .
but i don’t know how choose the coords to send to the sectionmanager that creates the rotated section.