Skip to content

Commit

Permalink
Merge pull request BRL-CAD#1 from SP23-CSCE482/danny-render
Browse files Browse the repository at this point in the history
Danny render
  • Loading branch information
zhuodannychen authored Mar 7, 2023
2 parents 4166a48 + 433a04e commit 28ae215
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Binary file modified src/a.out
Binary file not shown.
Binary file removed src/main
Binary file not shown.
14 changes: 9 additions & 5 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,21 @@
// /brlcad/src/gtools/rgen/visualization
// ../../../../../build/bin/mged ../db/moss.g tops
// ../../../../../build/bin/rt ../db/moss.g all.g
// EXAMPLE of running: ./a.out ../db/moss.g

using namespace cv;


int main(int argc, char **argv) {
if (argc == 2) {
const char* filename = argv[1];
std::string filename = argv[1];
std::cout << "Processing file: " << filename << std::endl;
const char* mgedTops = "../../../../../build/bin/mged ../db/moss.g tops";
auto result1 = system(mgedTops);
const char* rtAll = "../../../../../build/bin/rt -C 255/255/255 -s 1024 -c \"set ambSamples=64\" ../db/moss.g all.g";
auto result2 = system(rtAll);

std::string genTops = "../../../../../build/bin/mged " + filename + " tops";
auto result1 = system(genTops.c_str());

std::string renderAll = "../../../../../build/bin/rt -C 255/255/255 -s 1024 -c \"set ambSamples=64\" " + filename + " all.g";
auto result2 = system(renderAll.c_str());
std::cout << "Success\n";
} else {
// To create an image
Expand Down

0 comments on commit 28ae215

Please sign in to comment.