Skip to content

pixxon/ORSI-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ORSI-utils

Helper library for ORSI.


libEvaluator

  1. If you don't have CMake installed with a C++ compiler you should do it now!
  2. Download or clone the repository then navigate to the build directory.
cmake .
make all -j4
  1. Copy the libEvaluator to the desired location with the required header math_evaluator.h found in include.
    Reference main.cpp:
#include "math_evaluator.h"

#include <iostream>

int main()
{
  MathEvaluator evaluator("x+2");
  std::cout << evaluator.calculate(3) << std::endl;
  return 0;
}
  1. Compile your code and link the lib.
g++ main.cpp -L . -l Evaluator
  1. Run your code!
./a.out
5

libBMPWriter

  1. (not needed if done already) If you don't have CMake installed with a C++ compiler you should do it now!
  2. (not needed if done already) Download or clone the repository then navigate to the build directory.
cmake .
make all -j4
  1. Copy the libBMPWriter to the desired location with the required header bmp_image.h found in include.
    Reference main.cpp:
#include "bmp_image.h"

#include <fstream>

int main()
{
	BMPImage image(640, 480);
	
	for(uint32_t ColIndex = 100; ColIndex < 300; ColIndex++)
	{
		for(uint32_t RowIndex = 250; RowIndex < 300; RowIndex++)
		{
			image.setColor(ColIndex, RowIndex, Color(255, 0, 0));
		}
		for(uint32_t RowIndex = 30; RowIndex < 80; RowIndex++)
		{
			image.setColor(ColIndex, RowIndex, Color(0, 255, 0));
		}
	}
	
	std::ofstream out("output.bmp");
	out << image;
	out.close();
  
  return 0;
}
  1. Compile your code and link the lib.
g++ main.cpp -L . -l BMPWriter
  1. Run your code!
./a.out
5

About

Helper library for ORSI.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published