Code Monkey home page Code Monkey logo

cutegl's Introduction

CuteGL

CuteGL is a high level OpenGL 3.3 library based on Qt5.5. It allows user to develop openGL application quickly and faster by using a Scene / View models similar than QGraphicsView and QGraphicsScene.

Architecture

There are 3 class to render a basic 3d view.

  • cgl::View This class based on QWidget, is the openGL window. It manages view transformation from keyboard or mouse event, and the frame loop. You should be able to have many view for one scene.

  • cgl::Scene This class contains all meshs and lights to render to the view. It deals with Meshs creation and contains differents methods called from the view.

  • cgl::Mesh This class is a 3d object composed by vertex, normal, textures and material. They are different kind of mesh like BoxMesh or PlaneMesh. You can design your own mesh by sub-classing it.

Exemple

#include <QGuiApplication>
#include "view.h"
#include "cubemesh.h"

int main(int argc, char **argv)
{
    QGuiApplication app(argc, argv);
    cgl::View view;
    cgl::CubeMesh * mesh2 = new cgl::CubeMesh(1,1,1);
    view.scene()->addMesh(mesh);
    view.show();
    return app.exec();
}

Installation and Use

Actually cutegl is not a dynamics library. You can just copy the project and add from your *.pro file the following command :

include(cutegl/cutegl.pri)

cutegl's People

Contributors

dridk avatar yschutz avatar

Stargazers

 avatar  avatar  avatar

Watchers

Frederic De Groef avatar James Cloos avatar  avatar  avatar Éverton Antunes de Oliveira avatar  avatar

cutegl's Issues

enlever le mot eye de camera

Cest une suggestion, mais je pense que eye de la camera peut correspondre a la position.
Donc être remplacer par setPosition.
Les autres noms des méthodes pevent alors etre simplifier en enlevant le mot eye .

control standard

[ click + move ]  => Tourne autour de l'object OK sauf bug #2
[ click + move ] + ctrl => Camera z+ z- free
[ click + move ] + shift => Camera y+ y- free
[ click + move ] + ctrl + shift => Rotation de la camera

[ molette/gesture ] => Camera z+ z- by step
[ molette/gesture] + shift => Camera y+ y- by step
[ molette/gesture] + ctrl => Camera x+ x- by step

Create a demo application

I want you to create a simple demo application for cuteGL , showing all mesh rotating around them self.

Class Camera

Toutes les methodes associé à la camera, seraient bien dans une class Camera se trouvant dans la scene !
ex:

mScene->camera->setPosition(); 
mScene->camera->setViewCenter(c)

Rename ViewObject to MeshList

ViewObject seems to be a Mesh containers with different features.
Please rename it to MeshList and create methods to add and remove mesh .

MeshList * list = new MeshList;
list->addMesh(cube);
list->setOpacity(3.0) 

Rotaton camera depuis souris

Lorsque l'on bouge la camera avec la souris, la transformation se reinitialise au prochain clique.
Il faut pouvoir tourner autour de l'object. Conserver la transformation !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.