Git Product home page Git Product logo

te3d's People

Contributors

flz5 avatar makman2 avatar mando21y avatar sils avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

te3d's Issues

Apple support

How about apple support? This should be relatively easy since it's a unix derivative.

Fix codeChecker warnings.

Just run
make codecheck
in src/ and you'll see code convention violations. These are to be solved.

Anywhere is a memory release failure when releasing the pipeline

Download this model:

http://www.blender-models.com/wp-content/uploads/2014/01/The-Lure-Breaker-3-2.blend

Export it to the wavefront obj format, rename it to "kinghearts.obj" and run the code below.

The funny thing about this bug is, when you're changing the scaling matrix to 15,15,15 everything is okay...



#include <TE3D.h>
#include <stdio.h>

#define OUTPUT_WIDTH 165
#define OUTPUT_HEIGHT 50

int main()
{
    // Initialize the pipeline.
    struct TE3D_Pipeline pipe = TE3D_InitializePipeline(OUTPUT_WIDTH, OUTPUT_HEIGHT);

    // Change the vector-format, because we want to render points. The default vector format on initialization is TRIANGLES.
    TE3D_Pipeline_ChangeVectorFormat(&pipe,TE3D_VECTORFORMAT_LINES);

    // Load the model.
    int newvectors, newindices;
    struct List inputmodels;
    inputmodels =LoadWavefrontFromFile("kinghearts.obj",TE3D_VECTORFORMAT_LINES, &newvectors, &newindices);

    for (int i = 0; i < inputmodels.count; i++)
    {
            List_Add(&pipe.Models, List_At(&inputmodels, i));
    }


    // Adjust the vector and indices buffer, because they're now insufficient.
    TE3D_Pipeline_ResizeVectorOutputBuffer(&pipe, newvectors);
    TE3D_Pipeline_ResizeVectorIndexOutputBuffer(&pipe, newindices);


    for (int i = 0; i < 100; i++)
    {
    // Set the stretch matrix. This improves the vision of the rendered scene,because the letters in the terminal are taller than wide.
        pipe.Transformation = TE3D_Transformation4x4f_Scale(1, 0.5f, 1);

        // Set the ortho-transformation.
    TE3D_Pipeline_AppendTransformation(&pipe,TE3D_Transformation4x4f_OrthogonalProjection(TE3D_Vector3f_N(1,1,1),TE3D_Vector3f_N(0,1,0)));

        // Add translation.
    TE3D_Pipeline_AppendTransformation(&pipe,TE3D_Transformation4x4f_Translation(120, 80, 0));
        // Rotate the model.
TE3D_Pipeline_AppendTransformation(&pipe,TE3D_Transformation4x4f_RotateY(i * 0.05));
        // Scale up.
TE3D_Pipeline_AppendTransformation(&pipe,TE3D_Transformation4x4f_Scale(20, 20, 20));    

        // Render.
        TE3D_Pipeline_Render(&pipe);
    }

    // Release inputmodels from the Wavefront file.
    List_Release(&inputmodels);



    // Release the pipeline.
    TE3D_ReleasePipeline(&pipe);

}

Tidy up project

This includes:

  • Creation of some senseful directories
  • Documentation update
  • Some further tests
  • Licensing

Update README

The README needs some more serious text. A HACKME should be provided.

Interactive test

How about some interactive test that allows rotating the camera interactively via keyboard?

ncurses for Linux

Implement ncurses support if ncurses is installed. Else fallback to normal.

This would also work with windows using cygwin.

Add filters for codeChecker, define code style

We can do some very fancy things with this tool.

Some Ideas:

  • newline at the end of every file
  • documentation
  • indentation
  • Copyright header
    • get authors with
      git log FILE
      plus some filters and ensure their names are in the copyright clause
  • static code analysis

Maybe apply some of these rules automatically with the tool? Would need some rewriting. Or maybe suggest changes to programmer.

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.