LibGizmo: C++ Lib to Manipulate Transformation Matrices



LibGizmo
Scale and Move operations



LibGizmo is a small C++ library that brings easy matrix (4×4 floats) manipulation in your OpenGL applications. Three main functions are available to create a move, rotate and scale gizmo objects to handle the fundamental matrix operations. A draw function is also available with mouse control that allows to display the gizmos and handle them with the mouse.

Here is a code snippet to show the basic use of LibGizmo:

#include "IGizmo.h"
 
// The model matrix.
float objectMatrix[16];
 
// The three gizmos
IGizmo* gizmoMove = CreateMoveGizmo();
IGizmo* gizmoRotate = CreateRotateGizmo();
IGizmo* gizmoScale = CreateScaleGizmo();
IGizmo* cur_gizmo = NULL;
 
// Manipulate the position of the object.
cur_gizmo = gizmoMove;
gizmo->SetEditMatrix(objectMatrix);
gizmo->SetScreenDimension(screenWidth, screenHeight);
 
// Render the gizmo.
gizmo->SetCameraMatrix(viewMat, projMat);
gizmo->Draw();

Will test it asap in GeeXlab ;)

Links:

LibGizmo
Rotate operation





[ Subscribe to Geeks3D latest news by email ]

Geeks3D.com

↑ Grab this Headline Animator