LiangliangNan / Easy3D

A lightweight, easy-to-use, and efficient C++ library for processing and rendering 3D data
GNU General Public License v3.0
1.35k stars 243 forks source link

Model Matrix #183

Closed Champion-zzy closed 4 months ago

Champion-zzy commented 4 months ago

Hello, Professor Nan! I would like to inquire about a convenient method to obtain the model matrix of a surface mesh model.

LiangliangNan commented 4 months ago

I didn't quite understand your question. Do you mean when the mesh is being visualized in the viewer, how to query the model-view matrix with respect to the current view? If so, please check the following function in the Camera class. https://github.com/LiangliangNan/Easy3D/blob/7e47b17175ae89380013329d1eb142e9b3909d8f/easy3d/renderer/camera.h#L448

Champion-zzy commented 4 months ago

I want to control the translation and rotation transformations of individual objects instead of the entire scene, and manipulating the camera cannot achieve this. Are there any good ways?

LiangliangNan commented 4 months ago

Easy3D has an object manipulator that is for manipulating models. Please check out Tutorial_405_ObjectManipulation.

Champion-zzy commented 4 months ago

Thank you very much for Professor Nan's answer.