#include <renderfarm.h>
Public Member Functions | |
RenderFarm () | |
~RenderFarm () | |
bool | connect (const string &serverName) |
Connects to a new rendering server. | |
void | disconnectAll () |
void | send (const std::string &command) |
void | send (const std::string &command, const std::string &name, const ParamSet ¶ms) |
void | send (const std::string &command, const std::string &name) |
void | send (const std::string &command, float x, float y, float z) |
void | send (const std::string &command, float a, float x, float y, float z) |
void | send (const std::string &command, float ex, float ey, float ez, float lx, float ly, float lz, float ux, float uy, float uz) |
void | send (const std::string &command, float tr[16]) |
void | send (const std::string &command, const string &name, const string &type, const string &texname, const ParamSet ¶ms) |
Sends immediately all commands in the buffer to the servers. | |
void | flush () |
int | getServerCount () |
void | startFilmUpdater (Scene *scene) |
void | stopFilmUpdater () |
Gets the films from the network, and merge them to the film given in parameter. | |
void | updateFilm (Scene *scene) |
Public Attributes | |
int | serverUpdateInterval |
Private Attributes | |
std::vector< std::string > | serverList |
std::stringstream | netBuffer |
FilmUpdaterThread * | filmUpdateThread |
Definition at line 68 of file renderfarm.h.
lux::RenderFarm::RenderFarm | ( | ) | [inline] |
Definition at line 70 of file renderfarm.h.
lux::RenderFarm::~RenderFarm | ( | ) | [inline] |
bool RenderFarm::connect | ( | const string & | serverName | ) |
Connects to a new rendering server.
Definition at line 88 of file renderfarm.cpp.
References LUX_ERROR, LUX_INFO, LUX_NOERROR, LUX_SYSTEM, luxError, and serverList.
Referenced by lux::Context::addServer().
void RenderFarm::disconnectAll | ( | ) |
Definition at line 136 of file renderfarm.cpp.
References LUX_ERROR, LUX_INFO, LUX_NOERROR, LUX_SYSTEM, luxError, and serverList.
Referenced by lux::Context::exit().
void RenderFarm::flush | ( | ) |
Definition at line 153 of file renderfarm.cpp.
References LUX_ERROR, LUX_INFO, LUX_NOERROR, LUX_SYSTEM, luxError, netBuffer, and serverList.
Referenced by lux::Context::worldEnd().
int lux::RenderFarm::getServerCount | ( | ) | [inline] |
Definition at line 92 of file renderfarm.h.
References serverList.
Referenced by lux::Context::worldEnd().
void RenderFarm::send | ( | const std::string & | command, | |
const string & | name, | |||
const string & | type, | |||
const string & | texname, | |||
const ParamSet & | params | |||
) |
Sends immediately all commands in the buffer to the servers.
Definition at line 317 of file renderfarm.cpp.
References lux::ParamSet::FindOneString(), LUX_ERROR, LUX_SYSTEM, luxError, and netBuffer.
void RenderFarm::send | ( | const std::string & | command, | |
float | tr[16] | |||
) |
Definition at line 301 of file renderfarm.cpp.
References LUX_ERROR, LUX_SYSTEM, luxError, and netBuffer.
void RenderFarm::send | ( | const std::string & | command, | |
float | ex, | |||
float | ey, | |||
float | ez, | |||
float | lx, | |||
float | ly, | |||
float | lz, | |||
float | ux, | |||
float | uy, | |||
float | uz | |||
) |
Definition at line 287 of file renderfarm.cpp.
References LUX_ERROR, LUX_SYSTEM, luxError, and netBuffer.
void RenderFarm::send | ( | const std::string & | command, | |
float | a, | |||
float | x, | |||
float | y, | |||
float | z | |||
) |
Definition at line 273 of file renderfarm.cpp.
References LUX_ERROR, LUX_SYSTEM, luxError, and netBuffer.
void RenderFarm::send | ( | const std::string & | command, | |
float | x, | |||
float | y, | |||
float | z | |||
) |
Definition at line 260 of file renderfarm.cpp.
References LUX_ERROR, LUX_SYSTEM, luxError, and netBuffer.
void RenderFarm::send | ( | const std::string & | command, | |
const std::string & | name | |||
) |
Definition at line 247 of file renderfarm.cpp.
References LUX_ERROR, LUX_SYSTEM, luxError, and netBuffer.
void RenderFarm::send | ( | const std::string & | command, | |
const std::string & | name, | |||
const ParamSet & | params | |||
) |
Definition at line 231 of file renderfarm.cpp.
References LUX_ERROR, LUX_SYSTEM, luxError, and netBuffer.
void RenderFarm::send | ( | const std::string & | command | ) |
Definition at line 213 of file renderfarm.cpp.
References netBuffer.
Referenced by lux::Context::accelerator(), lux::Context::areaLightSource(), lux::Context::attributeBegin(), lux::Context::attributeEnd(), lux::Context::camera(), lux::Context::cleanup(), lux::Context::concatTransform(), lux::Context::coordinateSystem(), lux::Context::coordSysTransform(), lux::Context::film(), lux::Context::identity(), lux::Context::lightSource(), lux::Context::lookAt(), lux::Context::makenamedmaterial(), lux::Context::material(), lux::Context::namedmaterial(), lux::Context::objectBegin(), lux::Context::objectEnd(), lux::Context::objectInstance(), lux::Context::pixelFilter(), lux::Context::portalShape(), lux::Context::reverseOrientation(), lux::Context::rotate(), lux::Context::sampler(), lux::Context::scale(), lux::Context::shape(), lux::Context::surfaceIntegrator(), lux::Context::texture(), lux::Context::transform(), lux::Context::transformBegin(), lux::Context::transformEnd(), lux::Context::translate(), lux::Context::volume(), lux::Context::volumeIntegrator(), lux::Context::worldBegin(), and lux::Context::worldEnd().
void RenderFarm::startFilmUpdater | ( | Scene * | scene | ) |
Definition at line 74 of file renderfarm.cpp.
References filmUpdateThread, lux::FilmUpdaterThread::thread, and lux::FilmUpdaterThread::updateFilm().
Referenced by lux::Context::worldEnd().
void RenderFarm::stopFilmUpdater | ( | ) |
Gets the films from the network, and merge them to the film given in parameter.
Definition at line 80 of file renderfarm.cpp.
References filmUpdateThread, and lux::FilmUpdaterThread::interrupt().
Referenced by lux::Context::exit(), and lux::Context::worldEnd().
void RenderFarm::updateFilm | ( | Scene * | scene | ) |
Definition at line 181 of file renderfarm.cpp.
References lux::Scene::camera, lux::Camera::film, LUX_ERROR, LUX_INFO, LUX_NOERROR, LUX_SYSTEM, luxError, serverList, and lux::FlexImageFilm::UpdateFilm().
Referenced by lux::Context::exit(), lux::FilmUpdaterThread::updateFilm(), and lux::Context::updateFilmFromNetwork().
Definition at line 109 of file renderfarm.h.
Referenced by startFilmUpdater(), stopFilmUpdater(), and ~RenderFarm().
std::stringstream lux::RenderFarm::netBuffer [private] |
std::vector<std::string> lux::RenderFarm::serverList [private] |
Definition at line 105 of file renderfarm.h.
Referenced by connect(), disconnectAll(), flush(), getServerCount(), and updateFilm().
Definition at line 102 of file renderfarm.h.
Referenced by lux::Context::luxGetNetworkServerUpdateInterval(), lux::Context::luxSetNetworkServerUpdateInterval(), and lux::FilmUpdaterThread::updateFilm().