lux::RenderFarm Class Reference

#include <renderfarm.h>

Collaboration diagram for lux::RenderFarm:
[legend]

List of all members.

Classes

struct  ExtRenderingServerInfo

Public Member Functions

 RenderFarm ()
 ~RenderFarm ()
bool connect (const string &serverName)
 Connects to a new rendering server.
void disconnectAll ()
void disconnect (const string &serverName)
void send (const std::string &command)
void send (const std::string &command, const std::string &name, const ParamSet &params)
void send (const std::string &command, const std::string &name)
void send (const std::string &command, float x, float y)
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 &params)
void send (const std::string &command, const std::string &name, float a, float b, const std::string &transform)
 Sends immediately all commands in the buffer to the servers.
void flush ()
int getServerCount ()
int getServersStatus (RenderingServerInfo *info, int maxInfoCount)
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 Member Functions

void disconnect (const ExtRenderingServerInfo &serverInfo)
void sendFile (std::string file)

Static Private Member Functions

static void decodeServerName (const string &serverName, string &name, string &port)

Private Attributes

boost::mutex serverListMutex
std::vector
< ExtRenderingServerInfo
serverInfoList
std::stringstream netBuffer
FilmUpdaterThreadfilmUpdateThread

Detailed Description

Definition at line 67 of file renderfarm.h.


Constructor & Destructor Documentation

lux::RenderFarm::RenderFarm (  )  [inline]

Definition at line 69 of file renderfarm.h.

lux::RenderFarm::~RenderFarm (  )  [inline]

Definition at line 70 of file renderfarm.h.

References filmUpdateThread.


Member Function Documentation

bool RenderFarm::connect ( const string &  serverName  ) 

Connects to a new rendering server.

Definition at line 108 of file renderfarm.cpp.

References decodeServerName(), flush(), LUX_ERROR, LUX_INFO, LUX_NOERROR, LUX_SYSTEM, luxError, netBuffer, serverInfoList, and serverListMutex.

Referenced by lux::Context::addServer().

void RenderFarm::decodeServerName ( const string &  serverName,
string &  name,
string &  port 
) [static, private]

Definition at line 94 of file renderfarm.cpp.

Referenced by connect(), and disconnect().

void RenderFarm::disconnect ( const ExtRenderingServerInfo serverInfo  )  [private]
void RenderFarm::disconnect ( const string &  serverName  ) 

Definition at line 188 of file renderfarm.cpp.

References decodeServerName(), serverInfoList, and serverListMutex.

Referenced by disconnectAll(), and lux::Context::removeServer().

void RenderFarm::disconnectAll (  ) 

Definition at line 180 of file renderfarm.cpp.

References disconnect(), serverInfoList, and serverListMutex.

Referenced by lux::Context::exit(), and lux::Context::worldEnd().

void RenderFarm::flush (  ) 
int lux::RenderFarm::getServerCount (  )  [inline]

Definition at line 94 of file renderfarm.h.

References serverInfoList.

Referenced by lux::Context::getServerCount(), and lux::Context::worldEnd().

int RenderFarm::getServersStatus ( RenderingServerInfo info,
int  maxInfoCount 
)
void RenderFarm::send ( const std::string &  command,
const std::string &  name,
float  a,
float  b,
const std::string &  transform 
)

Sends immediately all commands in the buffer to the servers.

Definition at line 491 of file renderfarm.cpp.

References LUX_ERROR, LUX_SYSTEM, luxError, and netBuffer.

void RenderFarm::send ( const std::string &  command,
const string &  name,
const string &  type,
const string &  texname,
const ParamSet params 
)

Definition at line 473 of file renderfarm.cpp.

References LUX_ERROR, LUX_SYSTEM, luxError, netBuffer, and sendFile().

void RenderFarm::send ( const std::string &  command,
float  tr[16] 
)

Definition at line 462 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 453 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 444 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 436 of file renderfarm.cpp.

References LUX_ERROR, LUX_SYSTEM, luxError, and netBuffer.

void lux::RenderFarm::send ( const std::string &  command,
float  x,
float  y 
)
void RenderFarm::send ( const std::string &  command,
const std::string &  name 
)

Definition at line 420 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 396 of file renderfarm.cpp.

References LUX_ERROR, LUX_SYSTEM, luxError, netBuffer, and sendFile().

void RenderFarm::send ( const std::string &  command  ) 
void RenderFarm::sendFile ( std::string  file  )  [private]

Definition at line 352 of file renderfarm.cpp.

References LUX_ERROR, LUX_SYSTEM, luxError, and netBuffer.

Referenced by send().

void RenderFarm::startFilmUpdater ( Scene scene  ) 
void RenderFarm::stopFilmUpdater (  ) 

Gets the films from the network, and merge them to the film given in parameter.

Definition at line 81 of file renderfarm.cpp.

References filmUpdateThread, and lux::FilmUpdaterThread::interrupt().

Referenced by lux::Context::exit(), lux::Context::removeServer(), and lux::Context::worldEnd().

void RenderFarm::updateFilm ( Scene scene  ) 

Member Data Documentation

Definition at line 136 of file renderfarm.h.

Referenced by startFilmUpdater(), stopFilmUpdater(), and ~RenderFarm().

std::stringstream lux::RenderFarm::netBuffer [private]

Definition at line 133 of file renderfarm.h.

Referenced by connect(), flush(), send(), and sendFile().

boost::mutex lux::RenderFarm::serverListMutex [private]

Definition at line 130 of file renderfarm.h.

Referenced by connect(), disconnect(), disconnectAll(), flush(), and updateFilm().


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.2-20100208