lux::Context Class Reference

#include <context.h>

List of all members.

Classes

struct  GraphicsState
struct  NamedMaterial
struct  RenderOptions

Public Member Functions

 Context (std::string n="Lux default context")
 ~Context ()
void makemixmaterial (const ParamSet shapeparams, const ParamSet materialparams, boost::shared_ptr< Material > mtl)

Static Public Member Functions

static ContextgetActive ()
static void setActive (Context *c)
static void luxIdentity ()
static void luxTranslate (float dx, float dy, float dz)
static void luxRotate (float angle, float ax, float ay, float az)
static void luxScale (float sx, float sy, float sz)
static void luxLookAt (float ex, float ey, float ez, float lx, float ly, float lz, float ux, float uy, float uz)
static void luxConcatTransform (float transform[16])
static void luxTransform (float transform[16])
static void luxCoordinateSystem (const string &s)
static void luxCoordSysTransform (const string &s)
static void luxPixelFilter (const string &name, const ParamSet &params)
static void luxFilm (const string &type, const ParamSet &params)
static void luxSampler (const string &name, const ParamSet &params)
static void luxAccelerator (const string &name, const ParamSet &params)
static void luxSurfaceIntegrator (const string &name, const ParamSet &params)
static void luxVolumeIntegrator (const string &name, const ParamSet &params)
static void luxCamera (const string &s, const ParamSet &cameraParams)
static void luxWorldBegin ()
static void luxAttributeBegin ()
static void luxAttributeEnd ()
static void luxTransformBegin ()
static void luxTransformEnd ()
static void luxTexture (const string &name, const string &type, const string &texname, const ParamSet &params)
static void luxMaterial (const string &name, const ParamSet &params)
static void luxMakeNamedMaterial (const string &name, const ParamSet &params)
static void luxNamedMaterial (const string &name, const ParamSet &params)
static void luxLightSource (const string &name, const ParamSet &params)
static void luxAreaLightSource (const string &name, const ParamSet &params)
static void luxPortalShape (const string &name, const ParamSet &params)
static void luxShape (const string &name, const ParamSet &params)
static void luxReverseOrientation ()
static void luxVolume (const string &name, const ParamSet &params)
static void luxObjectBegin (const string &name)
static void luxObjectEnd ()
static void luxObjectInstance (const string &name)
static void luxWorldEnd ()
static void luxCleanup ()
static void luxStart ()
static void luxPause ()
static void luxExit ()
static void luxWait ()
static int luxAddThread ()
static void luxRemoveThread ()
static void luxUpdateFramebuffer ()
static unsigned char * luxFramebuffer ()
static void luxUpdateFilmFromNetwork ()
static void luxSetNetworkServerUpdateInterval (int updateInterval)
static int luxGetNetworkServerUpdateInterval ()
static void luxAddServer (const string &name)
static double luxStatistics (const string &statName)
static void luxTransmitFilm (std::basic_ostream< char > &stream)
static void luxEnableDebugMode ()

Private Member Functions

void init ()
void free ()
void identity ()
void translate (float dx, float dy, float dz)
void rotate (float angle, float ax, float ay, float az)
void scale (float sx, float sy, float sz)
void lookAt (float ex, float ey, float ez, float lx, float ly, float lz, float ux, float uy, float uz)
void concatTransform (float transform[16])
void transform (float transform[16])
void coordinateSystem (const string &)
void coordSysTransform (const string &)
void pixelFilter (const string &name, const ParamSet &params)
void film (const string &type, const ParamSet &params)
void sampler (const string &name, const ParamSet &params)
void accelerator (const string &name, const ParamSet &params)
void surfaceIntegrator (const string &name, const ParamSet &params)
void volumeIntegrator (const string &name, const ParamSet &params)
void camera (const string &, const ParamSet &cameraParams)
void worldBegin ()
void attributeBegin ()
void attributeEnd ()
void transformBegin ()
void transformEnd ()
void texture (const string &name, const string &type, const string &texname, const ParamSet &params)
void material (const string &name, const ParamSet &params)
void makenamedmaterial (const string &name, const ParamSet &params)
void namedmaterial (const string &name, const ParamSet &params)
void lightSource (const string &name, const ParamSet &params)
void areaLightSource (const string &name, const ParamSet &params)
void portalShape (const string &name, const ParamSet &params)
void shape (const string &name, const ParamSet &params)
void reverseOrientation ()
void volume (const string &name, const ParamSet &params)
void objectBegin (const string &name)
void objectEnd ()
void objectInstance (const string &name)
void worldEnd ()
void cleanup ()
void start ()
void pause ()
void exit ()
void wait ()
int addThread ()
void removeThread ()
void updateFramebuffer ()
unsigned char * framebuffer ()
void updateFilmFromNetwork ()
void transmitFilm (std::basic_ostream< char > &stream)
double statistics (const string &statName)
void addServer (const string &name)
void enableDebugMode ()

Private Attributes

string name
SceneluxCurrentScene
int currentApiState
Transform curTransform
map< string, TransformnamedCoordinateSystems
RenderOptionsrenderOptions
GraphicsStategraphicsState
vector< NamedMaterialnamedmaterials
vector< GraphicsStatepushedGraphicsStates
vector< TransformpushedTransforms
RenderFarmrenderFarm
boost::mutex renderingMutex

Static Private Attributes

static ContextactiveContext


Detailed Description

Definition at line 38 of file context.h.


Constructor & Destructor Documentation

lux::Context::Context ( std::string  n = "Lux default context"  )  [inline]

Definition at line 41 of file context.h.

References init().

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

Definition at line 45 of file context.h.

References free().


Member Function Documentation

void Context::accelerator ( const string &  name,
const ParamSet params 
) [private]

void Context::addServer ( const string &  name  )  [private]

Definition at line 113 of file context.cpp.

References lux::RenderFarm::connect(), and renderFarm.

Referenced by luxAddServer().

int Context::addThread (  )  [private]

Definition at line 757 of file context.cpp.

References lux::Scene::AddThread(), and luxCurrentScene.

Referenced by luxAddThread().

void Context::areaLightSource ( const string &  name,
const ParamSet params 
) [private]

void Context::attributeBegin (  )  [private]

void Context::attributeEnd (  )  [private]

void Context::camera ( const string &  name,
const ParamSet cameraParams 
) [private]

void Context::cleanup (  )  [private]

void Context::concatTransform ( float  transform[16]  )  [private]

Definition at line 157 of file context.cpp.

References curTransform, renderFarm, lux::RenderFarm::send(), and VERIFY_INITIALIZED.

Referenced by luxConcatTransform().

void Context::coordinateSystem ( const string &  name  )  [private]

void Context::coordSysTransform ( const string &  name  )  [private]

void Context::enableDebugMode (  )  [private]

void Context::exit (  )  [private]

void Context::film ( const string &  type,
const ParamSet params 
) [private]

unsigned char * Context::framebuffer (  )  [private]

Definition at line 770 of file context.cpp.

References lux::Scene::GetFramebuffer(), and luxCurrentScene.

Referenced by luxFramebuffer().

void Context::free (  )  [private]

Definition at line 88 of file context.cpp.

References graphicsState, luxCurrentScene, renderFarm, and renderOptions.

Referenced by cleanup(), and ~Context().

static Context* lux::Context::getActive (  )  [inline, static]

Definition at line 54 of file context.h.

References activeContext.

void Context::identity (  )  [private]

Definition at line 135 of file context.cpp.

References curTransform, renderFarm, lux::RenderFarm::send(), and VERIFY_INITIALIZED.

Referenced by luxIdentity().

void Context::init (  )  [private]

void Context::lightSource ( const string &  name,
const ParamSet params 
) [private]

void Context::lookAt ( float  ex,
float  ey,
float  ez,
float  lx,
float  ly,
float  lz,
float  ux,
float  uy,
float  uz 
) [private]

Definition at line 176 of file context.cpp.

References curTransform, lux::LookAt(), renderFarm, lux::RenderFarm::send(), and VERIFY_INITIALIZED.

Referenced by luxLookAt().

static void lux::Context::luxAccelerator ( const string &  name,
const ParamSet params 
) [inline, static]

Definition at line 75 of file context.h.

References accelerator(), and activeContext.

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxAddServer ( const string &  name  )  [inline, static]

Definition at line 128 of file context.h.

References activeContext, and addServer().

static int lux::Context::luxAddThread (  )  [inline, static]

Definition at line 114 of file context.h.

References activeContext, and addThread().

static void lux::Context::luxAreaLightSource ( const string &  name,
const ParamSet params 
) [inline, static]

Definition at line 89 of file context.h.

References activeContext, and areaLightSource().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxAttributeBegin (  )  [inline, static]

Definition at line 80 of file context.h.

References activeContext, and attributeBegin().

Referenced by objectBegin().

static void lux::Context::luxAttributeEnd (  )  [inline, static]

Definition at line 81 of file context.h.

References activeContext, and attributeEnd().

Referenced by objectEnd().

static void lux::Context::luxCamera ( const string &  s,
const ParamSet cameraParams 
) [inline, static]

Definition at line 78 of file context.h.

References activeContext, and camera().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxCleanup (  )  [inline, static]

Definition at line 103 of file context.h.

References activeContext, and cleanup().

static void lux::Context::luxConcatTransform ( float  transform[16]  )  [inline, static]

Definition at line 68 of file context.h.

References activeContext, and concatTransform().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxCoordinateSystem ( const string &  s  )  [inline, static]

Definition at line 70 of file context.h.

References activeContext, and coordinateSystem().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxCoordSysTransform ( const string &  s  )  [inline, static]

Definition at line 71 of file context.h.

References activeContext, and coordSysTransform().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxEnableDebugMode (  )  [inline, static]

Definition at line 137 of file context.h.

References activeContext, and enableDebugMode().

static void lux::Context::luxExit (  )  [inline, static]

Definition at line 109 of file context.h.

References activeContext, and exit().

static void lux::Context::luxFilm ( const string &  type,
const ParamSet params 
) [inline, static]

Definition at line 73 of file context.h.

References activeContext, and film().

Referenced by lux::NetworkRenderServerThread::run().

static unsigned char* lux::Context::luxFramebuffer (  )  [inline, static]

Definition at line 119 of file context.h.

References activeContext, and framebuffer().

static int lux::Context::luxGetNetworkServerUpdateInterval (  )  [inline, static]

Definition at line 127 of file context.h.

References activeContext, renderFarm, and lux::RenderFarm::serverUpdateInterval.

static void lux::Context::luxIdentity (  )  [inline, static]

Definition at line 63 of file context.h.

References activeContext, and identity().

static void lux::Context::luxLightSource ( const string &  name,
const ParamSet params 
) [inline, static]

Definition at line 88 of file context.h.

References activeContext, and lightSource().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxLookAt ( float  ex,
float  ey,
float  ez,
float  lx,
float  ly,
float  lz,
float  ux,
float  uy,
float  uz 
) [inline, static]

Definition at line 67 of file context.h.

References activeContext, and lookAt().

static void lux::Context::luxMakeNamedMaterial ( const string &  name,
const ParamSet params 
) [inline, static]

Definition at line 86 of file context.h.

References activeContext, and makenamedmaterial().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxMaterial ( const string &  name,
const ParamSet params 
) [inline, static]

Definition at line 85 of file context.h.

References activeContext, and material().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxNamedMaterial ( const string &  name,
const ParamSet params 
) [inline, static]

Definition at line 87 of file context.h.

References activeContext, and namedmaterial().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxObjectBegin ( const string &  name  )  [inline, static]

Definition at line 94 of file context.h.

References activeContext, and objectBegin().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxObjectEnd (  )  [inline, static]

Definition at line 95 of file context.h.

References activeContext, and objectEnd().

static void lux::Context::luxObjectInstance ( const string &  name  )  [inline, static]

Definition at line 96 of file context.h.

References activeContext, and objectInstance().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxPause (  )  [inline, static]

Definition at line 108 of file context.h.

References activeContext, and pause().

static void lux::Context::luxPixelFilter ( const string &  name,
const ParamSet params 
) [inline, static]

Definition at line 72 of file context.h.

References activeContext, and pixelFilter().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxPortalShape ( const string &  name,
const ParamSet params 
) [inline, static]

Definition at line 90 of file context.h.

References activeContext, and portalShape().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxRemoveThread (  )  [inline, static]

Definition at line 115 of file context.h.

References activeContext, and removeThread().

static void lux::Context::luxReverseOrientation (  )  [inline, static]

Definition at line 92 of file context.h.

References activeContext, and reverseOrientation().

static void lux::Context::luxRotate ( float  angle,
float  ax,
float  ay,
float  az 
) [inline, static]

Definition at line 65 of file context.h.

References activeContext, and rotate().

static void lux::Context::luxSampler ( const string &  name,
const ParamSet params 
) [inline, static]

Definition at line 74 of file context.h.

References activeContext, and sampler().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxScale ( float  sx,
float  sy,
float  sz 
) [inline, static]

Definition at line 66 of file context.h.

References activeContext, and scale().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxSetNetworkServerUpdateInterval ( int  updateInterval  )  [inline, static]

Definition at line 126 of file context.h.

References activeContext, renderFarm, and lux::RenderFarm::serverUpdateInterval.

static void lux::Context::luxShape ( const string &  name,
const ParamSet params 
) [inline, static]

Definition at line 91 of file context.h.

References activeContext, and shape().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxStart (  )  [inline, static]

Definition at line 107 of file context.h.

References activeContext, and start().

static double lux::Context::luxStatistics ( const string &  statName  )  [inline, static]

Definition at line 131 of file context.h.

References activeContext, and statistics().

static void lux::Context::luxSurfaceIntegrator ( const string &  name,
const ParamSet params 
) [inline, static]

Definition at line 76 of file context.h.

References activeContext, and surfaceIntegrator().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxTexture ( const string &  name,
const string &  type,
const string &  texname,
const ParamSet params 
) [inline, static]

Definition at line 84 of file context.h.

References activeContext, and texture().

static void lux::Context::luxTransform ( float  transform[16]  )  [inline, static]

Definition at line 69 of file context.h.

References activeContext, and transform().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxTransformBegin (  )  [inline, static]

Definition at line 82 of file context.h.

References activeContext, and transformBegin().

static void lux::Context::luxTransformEnd (  )  [inline, static]

Definition at line 83 of file context.h.

References activeContext, and transformEnd().

static void lux::Context::luxTranslate ( float  dx,
float  dy,
float  dz 
) [inline, static]

Definition at line 64 of file context.h.

References activeContext, and translate().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxTransmitFilm ( std::basic_ostream< char > &  stream  )  [inline, static]

Definition at line 134 of file context.h.

References activeContext, and transmitFilm().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxUpdateFilmFromNetwork (  )  [inline, static]

Definition at line 125 of file context.h.

References activeContext, and updateFilmFromNetwork().

static void lux::Context::luxUpdateFramebuffer (  )  [inline, static]

Definition at line 118 of file context.h.

References activeContext, and updateFramebuffer().

static void lux::Context::luxVolume ( const string &  name,
const ParamSet params 
) [inline, static]

Definition at line 93 of file context.h.

References activeContext, and volume().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxVolumeIntegrator ( const string &  name,
const ParamSet params 
) [inline, static]

Definition at line 77 of file context.h.

References activeContext, and volumeIntegrator().

Referenced by lux::NetworkRenderServerThread::run().

static void lux::Context::luxWait (  )  [inline, static]

Definition at line 111 of file context.h.

References activeContext, and wait().

static void lux::Context::luxWorldBegin (  )  [inline, static]

Definition at line 79 of file context.h.

References activeContext, and worldBegin().

static void lux::Context::luxWorldEnd (  )  [inline, static]

Definition at line 97 of file context.h.

References activeContext, and worldEnd().

void Context::makemixmaterial ( const ParamSet  shapeparams,
const ParamSet  materialparams,
boost::shared_ptr< Material mtl 
)

void Context::makenamedmaterial ( const string &  name,
const ParamSet params 
) [private]

void Context::material ( const string &  name,
const ParamSet params 
) [private]

void Context::namedmaterial ( const string &  name,
const ParamSet params 
) [private]

void Context::objectBegin ( const string &  name  )  [private]

void Context::objectEnd (  )  [private]

void Context::objectInstance ( const string &  name  )  [private]

void Context::pause (  )  [private]

Definition at line 737 of file context.cpp.

References luxCurrentScene, and lux::Scene::Pause().

Referenced by luxPause().

void Context::pixelFilter ( const string &  name,
const ParamSet params 
) [private]

void Context::portalShape ( const string &  name,
const ParamSet params 
) [private]

void Context::removeThread (  )  [private]

Definition at line 761 of file context.cpp.

References luxCurrentScene, and lux::Scene::RemoveThread().

Referenced by luxRemoveThread().

void Context::reverseOrientation (  )  [private]

void Context::rotate ( float  angle,
float  ax,
float  ay,
float  az 
) [private]

Definition at line 166 of file context.cpp.

References curTransform, renderFarm, lux::Rotate(), lux::RenderFarm::send(), and VERIFY_INITIALIZED.

Referenced by luxRotate().

void Context::sampler ( const string &  name,
const ParamSet params 
) [private]

void Context::scale ( float  sx,
float  sy,
float  sz 
) [private]

Definition at line 171 of file context.cpp.

References curTransform, renderFarm, lux::Scale(), lux::RenderFarm::send(), and VERIFY_INITIALIZED.

Referenced by luxScale().

static void lux::Context::setActive ( Context c  )  [inline, static]

Definition at line 57 of file context.h.

References activeContext.

void Context::shape ( const string &  name,
const ParamSet params 
) [private]

void Context::start (  )  [private]

Definition at line 733 of file context.cpp.

References luxCurrentScene, and lux::Scene::Start().

Referenced by luxStart().

double Context::statistics ( const string &  statName  )  [private]

Definition at line 774 of file context.cpp.

References luxCurrentScene, and lux::Scene::Statistics().

Referenced by luxStatistics().

void Context::surfaceIntegrator ( const string &  name,
const ParamSet params 
) [private]

void Context::texture ( const string &  name,
const string &  type,
const string &  texname,
const ParamSet params 
) [private]

void Context::transform ( float  transform[16]  )  [private]

Definition at line 147 of file context.cpp.

References curTransform, renderFarm, lux::RenderFarm::send(), and VERIFY_INITIALIZED.

Referenced by luxTransform().

void Context::transformBegin (  )  [private]

Definition at line 281 of file context.cpp.

References curTransform, pushedTransforms, renderFarm, lux::RenderFarm::send(), and VERIFY_WORLD.

Referenced by luxTransformBegin().

void Context::transformEnd (  )  [private]

void Context::translate ( float  dx,
float  dy,
float  dz 
) [private]

Definition at line 141 of file context.cpp.

References curTransform, renderFarm, lux::RenderFarm::send(), lux::Translate(), and VERIFY_INITIALIZED.

Referenced by luxTranslate().

void Context::transmitFilm ( std::basic_ostream< char > &  stream  )  [private]

void Context::updateFilmFromNetwork (  )  [private]

Definition at line 787 of file context.cpp.

References luxCurrentScene, renderFarm, and lux::RenderFarm::updateFilm().

Referenced by luxUpdateFilmFromNetwork().

void Context::updateFramebuffer (  )  [private]

Definition at line 766 of file context.cpp.

References luxCurrentScene, and lux::Scene::UpdateFramebuffer().

Referenced by luxUpdateFramebuffer().

void Context::volume ( const string &  name,
const ParamSet params 
) [private]

void Context::volumeIntegrator ( const string &  name,
const ParamSet params 
) [private]

void Context::wait (  )  [private]

Definition at line 741 of file context.cpp.

References renderingMutex.

Referenced by luxWait().

void Context::worldBegin (  )  [private]

void Context::worldEnd (  )  [private]


Member Data Documentation

Context * Context::activeContext [static, private]

Definition at line 284 of file context.h.

Referenced by cleanup(), init(), worldBegin(), and worldEnd().

string lux::Context::name [private]

Definition at line 141 of file context.h.

Definition at line 286 of file context.h.

Referenced by camera(), coordinateSystem(), coordSysTransform(), init(), worldBegin(), and worldEnd().

Definition at line 289 of file context.h.

Referenced by init(), makemixmaterial(), makenamedmaterial(), and namedmaterial().

Definition at line 290 of file context.h.

Referenced by attributeBegin(), attributeEnd(), init(), and worldEnd().

Definition at line 291 of file context.h.

Referenced by attributeBegin(), attributeEnd(), init(), transformBegin(), transformEnd(), and worldEnd().

boost::mutex lux::Context::renderingMutex [mutable, private]

Definition at line 295 of file context.h.

Referenced by wait(), and worldEnd().


The documentation for this class was generated from the following files:

Generated on Mon May 18 07:16:17 2009 for lux by  doxygen 1.5.8