Giter VIP home page Giter VIP logo

saverio976 / raytracer Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 0.0 123.33 MB

Raytracer made from sctratch with basic compatibility for .obj | School Project

Home Page: https://saverio976.github.io/Raytracer/

License: MIT License

CMake 10.01% C++ 89.91% Shell 0.08%
ambient-light cone cylinder mirror obj plane point-light raytracer raytracer-in-cpp raytracing refraction sphere spot-light torus transparency triangle

raytracer's Introduction


hayo


I do things because why not



some projects

Techno Link Description
bash, neovim, vim, linux repo personal dotfiles
c repo annimation using pixels (in 1st year at EPITECH
c++ repo , site a Raytracer from scratch
lua, neovim, mpv repo music/video in neovim (parser around mpv)
python, regex repo , norma2 check the epitech C coding style
python repo chat with people in terminal
python, pytorch repo launch program by voice
c repo , site the best RPG ever made (in 1st year at EPITECH

lists of repository I contributed to

raytracer's People

Contributors

amaz31 avatar bahmez avatar saverio976 avatar simonvermeulen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

raytracer's Issues

SphereEntity - compilation error

Couldn't open in PluginHandler: ./EntitiesPlugins/raytracer-plugins-entity-sphere.so: undefined symbol: _ZTVN9RayTracer8Entities9Transform9TransformE

[Camera/Image] Pixelthread et imagePipeLine ont aucune information sur le rayon

Il faudrait qu'on leur passe et qu'on calcul le point de départ et la direction (peut-être normalisé ?)

Suggestions :

  • créer une méchode dans ICamera qui genere les rayons pour qu'on suite ImagePipeLine le prend en paramètre
  • le faire la génération des rayons dans le ImagePipeLine
    (La première méthode pour moi est mieux)

[Architecture] Raytracer

- IPrimitive
	-> enlever les box

- Color
	-> variable mutex private
	-> operator [](const Enum &type)
		-> thread safe
	-> toute les opérations
		-> thread safe

- SceneLoader
	-> constructor (const string &filePath)
	-> subscribe("onChange", callback(configuration))
	-> update()

- EntityFactory
	-> register(const string &name, unique_ptr<PluginHandler>)
	-> get(const string &name, IConfig) : IEntity
	-> static getInstance() : EntityFactory

	-> static private variable d'un unique_ptr de EntityFactory

Enum EntityType {
	Light,
	Camera,
	Primitive
};

- PluginHandler
	-> getType : Enum EntityType
	-> getEntity(IConfig) : IEntity

- IEntityCreator
	-> create(IConfig) : std::unique_ptr<IEntity>

extern C {
	Enum EntityType getType(void);
	IEntityCreator *getEntityCreator(void);
	void deleteEntityCreator(IEntityCreator *creator);
};

- PluginLoader
	-> constructor (const string &directory)
	-> load()

(la function renders de scene est appelé lui même dans un autre thread et pas dans le thread principal pour qu'on
puisse stopper l'action de rendering)
- Scene
	-> operator()
	-> renders() [check si la function isReady renvoie false] 
	-> const &list<const Image &> getImages() const
	-> isReady() : bool

	private:
	-> list<std::unique_ptr<ICamera>>
	-> variable displayable
	-> variable mutex
	-> variable thread

- Displayable
	-> const list<std::unique_ptr<ILight>> &getLightList() const
	-> const list<std::unique_ptr<IPrimitive>> &getPrimitiveList() const
	-> list<std::unique_ptr<ILight>> &getLightList()
	-> list<std::unique_ptr<IPrimitive>> &getPrimitiveList()

	private:
	-> list<std::unique_ptr<ILight>>
	-> list<std::unique_ptr<IPrimitive>>


- ICamera !!
	-> render(const Displayable &displayable) : const &Image
	-> const &Image getImage() const
	
	-> list<std::unique_ptr<IFilter>>
	-> variable Image

- IFilter
	-> apply(Image &image)

- FilterHandler
	-> getFilter(IConfig) : IFilter

- IFilterCreator
	-> create(IConfig) : std::unique_ptr<IFilter>

extern C {
	IFilterCreator *getFilterCreator(void);
	void deleteFilterCreator(IFilterCreator *creator);
};

- FilterLoader
	-> constructor (const string &directory)
	-> load()

- FilterFactory
	-> register(const string &name, unique_ptr<FilterHandler>)
	-> get(const string &name, IConfig) : IFilter
	-> static getInstance() : FilterFactory

	-> static private variable d'un unique_ptr de FilterFactory


- PixelThread
	-> constructor(const Displayable &displayable, Color &color)
	-> operator()

- ImagePipeLine
	-> constructor (Image &image, const Displayable &displayable)
	-> generate(maxThread = .., int cluster = 1)
	-> apply(Filter)

- Image
	-> constructor (const Vector2i &size)
	-> convertToPPM
	-> convertToSfTexture
	-> operator[] : PixelLine

	-> list<Pixel>

- PixelLine
	-> constructor (list<Pixel> &list, int y)
	-> operator[] : &Color

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.