transform the local coordinate to global coordinat
wzqneu
✭
hi,every body,
when i got the vector3 of a vertex. i can find the body coordinate values. but i find this value is in local coordinate. i wan to transform this local coordinate to global coordinate. i use the TransformVector to realize this function.
the definition of TransformVector as follow:
public Vector3 TransformVector(
Matrix4 from,
Matrix4 to
)
my code:
Vector3 vertextrans = codege.Edge.EndVertex.Position;
Matrix4 localmatrix = body.Transform.Matrix;
Matrix4 worldmatrix = station.Transform .GlobalMatrix;
Vector3 tmp =vertextrans.TransformVector(localmatrix,worldmatrix);
--------------------------------------------------------
i want to transform the local vertor3 into world coordinate,but there is no effect,.what is wrong with the code?
i guess maybe there is mistake in obtaining the matrix,
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 799 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings