metadata
Wenzel Jakob 2011-08-19 18:35:44 -04:00
commit ee7c65215a
87 changed files with 386 additions and 88 deletions

View File

@ -590,7 +590,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories # directories like "/usr/src/myproject". Separate the files or directories
# with spaces. # with spaces.
INPUT = include/mitsuba/core include/mitsuba/render doc/doxyfiles INPUT = include/mitsuba/core include/mitsuba/render include/mitsuba/hw include/mitsuba/bidir doc/doxyfiles
# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
@ -718,7 +718,7 @@ INLINE_SOURCES = NO
# doxygen to hide any special comment blocks from generated source code # doxygen to hide any special comment blocks from generated source code
# fragments. Normal C and C++ comments will always remain visible. # fragments. Normal C and C++ comments will always remain visible.
STRIP_CODE_COMMENTS = YES STRIP_CODE_COMMENTS = NO
# If the REFERENCED_BY_RELATION tag is set to YES # If the REFERENCED_BY_RELATION tag is set to YES
# then for each documented function all documented # then for each documented function all documented

View File

@ -197,6 +197,14 @@ $\text{\$}$ rpmbuild -bb mitsuba-$\code{\MitsubaVersion}$/data/linux/fedora/mits
\end{shell} \end{shell}
After this command finishes, its output can be found in the directory \code{rpmbuild/RPMS}. After this command finishes, its output can be found in the directory \code{rpmbuild/RPMS}.
\subsection{Building on Arch Linux} \subsection{Building on Arch Linux}
You'll first need to install a number of dependencies.
First, run
\begin{shell}
$\text{\$}$ sudo pacman -S gcc xerces-c glew openexr boost libpng libjpeg qt scons mercurial python
\end{shell}
There are two ways to install Mitsuba on Archlinux, the Arch way, and the other way. There are two ways to install Mitsuba on Archlinux, the Arch way, and the other way.
The Arch Way is to use the Aur software repository. The Arch Way is to use the Aur software repository.

View File

@ -1,12 +1,30 @@
\section{Development Guide} \part{Development guide}
This chapter and the subsequent ones will provide an overview This chapter and the subsequent ones will provide an overview
of the the coding conventions and general architecture of Mitsuba. of the the coding conventions and general architecture of Mitsuba.
You should only read them if if you wish to interface with the API You should only read them if if you wish to interface with the API
in some way (e.g. by developing your own plugins). The coding style in some way (e.g. by developing your own plugins). The coding style
section is only relevant if you plan to submit patches, which should section is only relevant if you plan to submit patches that are meant
go into the main codebase. to become part of the main codebase.
\subsection{Coding style} \section{Code structure}
Mitsuba is split into four basic support libraries:
\begin{itemize}
\item The core library (\code{libcore}) implements basic functionality such as
cross-platform file and bitmap I/O, data structures, scheduling, as well as logging and plugin management.
\item The rendering library (\code{librender}) contains abstractions
needed to load and represent scenes containing light sources, shapes, materials, and participating media.
\item The hardware acceleration library (\code{libhw})
implements a cross-platform display library, an object-oriented OpenGL
wrapper, as well as support for rendering interactive previews of scenes.
\item Finally, the bidirectional library (\code{libbidir})
contains a support layer that is used to implement bidirectional rendering algorithms such as
Bidirectional Path Tracing and Metropolis Light Transport.
\end{itemize}
A detailed reference of these APIs is available at
\url{http://www.mitsuba-renderer.org/api}. The next sections
present a few basic examples to get familiar with them.
\section{Coding style}
\paragraph{Indentation:} The Mitsuba codebase uses tabs for indentation, \paragraph{Indentation:} The Mitsuba codebase uses tabs for indentation,
which expand to \emph{four} spaces. Please make sure that you configure your editor which expand to \emph{four} spaces. Please make sure that you configure your editor
this way, otherwise the source code layout will look garbled. this way, otherwise the source code layout will look garbled.
@ -74,10 +92,10 @@ However, anything pertaining to the API should go into the header file.
\paragraph{Boost:} Use the boost libraries whenever this helps to save \paragraph{Boost:} Use the boost libraries whenever this helps to save
time or write more compact code. time or write more compact code.
\paragraph{Classes vs structures:}In Mitsuba, classes \emph{always} go onto the heap, \paragraph{Classes vs structures:}In Mitsuba, classes usually go onto the heap,
whereas structures may be allocated both on the stack and the heap. whereas structures may be allocated both on the stack and the heap.
Classes that derive from \code{Object} usually implement a protected virtual Classes that derive from \code{Object} implement a protected virtual
deconstructor, which explicitly prevents them from being allocated on the stack. deconstructor, which explicitly prevents them from being allocated on the stack.
The only way they can be deallocated is using the built-in reference The only way they can be deallocated is using the built-in reference
counting. This is done using the \code{ref<>} template, e.g. counting. This is done using the \code{ref<>} template, e.g.

View File

@ -1,10 +1,19 @@
/** /**
\defgroup libcore Core library \defgroup libcore Core library
This module contains the core support API of Mitsuba This library contains the core support API of Mitsuba
*/ */
/** /**
\defgroup librender Render library \defgroup librender Render library
This module contains the rendering-related API of Mitsuba This library contains the rendering-related API of Mitsuba
*/
/**
\defgroup libhw Hardware acceleration library
This library contains the hardware acceleration API of Mitsuba
*/
/**
\defgroup libbidir Bidirectional support library
This library contains a support layer used to develop bidirectional
rendering techniques.
*/ */
/** /**
\defgroup libpython Python bindings \defgroup libpython Python bindings

View File

@ -1,9 +1,9 @@
\section{Introduction} \part{Using Mitsuba}
\textbf{Disclaimer:} This is manual documents the usage, file format, and \textbf{Disclaimer:} This is manual documents the usage, file format, and
internal design of the Mitsuba rendering system. It is currently a work internal design of the Mitsuba rendering system. It is currently a work
in progress, hence some parts may still be incomplete or missing. in progress, hence some parts may still be incomplete or missing.
\subsection{About Mitsuba} \section{About Mitsuba}
Mitsuba is a research-oriented rendering system in the style of PBRT Mitsuba is a research-oriented rendering system in the style of PBRT
(\url{www.pbrt.org}), from which it derives much inspiration. (\url{www.pbrt.org}), from which it derives much inspiration.
It is written in portable C++, implements unbiased as well It is written in portable C++, implements unbiased as well
@ -55,7 +55,7 @@ viewpoint has been found, it is straightforward to perform renderings using any
implemented rendering techniques, while tweaking their parameters to find the most suitable implemented rendering techniques, while tweaking their parameters to find the most suitable
settings. Experimental integration into Blender 2.5 is also available. settings. Experimental integration into Blender 2.5 is also available.
\subsection{License} \section{License}
Mitsuba is free software and can be redistributed and modified under the terms of the GNU General Mitsuba is free software and can be redistributed and modified under the terms of the GNU General
Public License (Version 3) as provided by the Free Software Foundation. Public License (Version 3) as provided by the Free Software Foundation.

View File

@ -155,7 +155,7 @@
\include{format} \include{format}
\IfFileExists{plugins_generated.tex}{\include{plugins_generated}}{} \IfFileExists{plugins_generated.tex}{\include{plugins_generated}}{}
%\include{import} %\include{import}
%\include{development} \include{development}
%\include{integrator} %\include{integrator}
%\include{parallelization} %\include{parallelization}
\include{python} \include{python}

View File

@ -2,15 +2,15 @@
\label{sec:python} \label{sec:python}
A recent feature of Mitsuba is a simple Python interface to the renderer API. A recent feature of Mitsuba is a simple Python interface to the renderer API.
While the interface is still limited at this point, it can already be While the interface is still limited at this point, it can already be
used for simple automation tasks. To access the API, start your Python used for simple automation purposes. To access the API, start your Python
interpreter and run interpreter and enter
\begin{python} \begin{python}
import mitsuba import mitsuba
\end{python} \end{python}
For this to work on MacOS X, you will first have to run the ``\emph{Apple For this to work on MacOS X, you will first have to run the ``\emph{Apple
Menu}$\to$\emph{Command-line Access}'' menu item from within Mitsuba. Menu}$\to$\emph{Command-line access}'' menu item from within Mitsuba.
On Windows and non-packaged Linux builds, you must update the extension On Windows and non-packaged Linux builds, you may have to update the extension
search path before the \code{import} command is issued: search path before issuing the \code{import} command:
\begin{python} \begin{python}
import sys import sys
@ -20,4 +20,23 @@ sys.path.append('dist/python')
import mitsuba import mitsuba
\end{python} \end{python}
For an overview of the currently exposed API subset, refer
to the following page: \url{http://www.mitsuba-renderer.org/api/group__libpython.html}.
\subsection{Fundamentals}
All
Where applicable, the Python wrapper supports operator overloading,
default arguments, and
\begin{python}
import mitsuba
from mitsuba.core import *
myVector = normalize(Vector(1.0, 2.0, 3.0))
print(myVector * 2)
Log(EInfo, "" +)
\end{python}

View File

@ -24,12 +24,15 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** /**
* Specialized sampler implementation used to seed MLT-style algorithm. Allows * \brief Specialized sampler implementation used to seed MLT-style algorithm.
* to query for the current sample index, which can later be used to rewind *
* Allows to query for the current sample index, which can later be used to rewind
* back to this state. In the case of MLT, this makes it possible to sample paths * back to this state. In the case of MLT, this makes it possible to sample paths
* approximately proportional to their contribution without actually having * approximately proportional to their contribution without actually having
* to store millions of path. Note that `rewinding' is naive -- it just * to store millions of path. Note that `rewinding' is naive -- it just
* resets & regenerates the whole random number sequence, which might be slow. * resets & regenerates the whole random number sequence, which might be slow.
*
* \ingroup libbidir
*/ */
class MTS_EXPORT_BIDIR ReplayableSampler : public Sampler { class MTS_EXPORT_BIDIR ReplayableSampler : public Sampler {
public: public:

View File

@ -124,11 +124,34 @@ private:
/*! @{ */ /*! @{ */
/**
* \brief Return the \ref Class object corresponding to a named class.
*
* Call the Macro without quotes, e.g. \c MTS_CLASS(SerializableObject)
*/
#define MTS_CLASS(x) x::m_theClass #define MTS_CLASS(x) x::m_theClass
/** /**
* \brief This macro must be used in the declaration of * \brief This macro must be used in the initial definition in
* all classes derived from \ref Object. * classes that derive from \ref Object.
*
* This is needed for the basic RTTI support provided by Mitsuba objects.
* For instance, a class definition might look like the following:
*
* \code
* class MyObject : public Object {
* public:
* MyObject();
*
* /// Important: declare RTTI data structures
* MTS_DECLARE_CLASS()
* protected:
* /// Important: needs to declare a protected virtual destructor
* virtual ~MyObject();
*
* };
* \endcode
*
*/ */
#define MTS_DECLARE_CLASS() \ #define MTS_DECLARE_CLASS() \
virtual const Class *getClass() const; \ virtual const Class *getClass() const; \
@ -137,6 +160,17 @@ public: \
/** /**
* \brief Creates basic RTTI support for a class * \brief Creates basic RTTI support for a class
*
* This macro or one of its variants should be invoked in the main
* implementation \c .cpp file of any class that derives from \ref Object.
* This is needed for the basic RTTI support provided by Mitsuba objects.
* For instance, the corresponding piece for the example shown in the
* documentation of \ref MTS_DECLARE_CLASS might look like this:
*
* \code
* MTS_IMPLEMENT_CLASS(MyObject, false, Object)
* \endcode
*
* \param name Name of the class * \param name Name of the class
* \param abstract \c true if the class contains pure virtual methods * \param abstract \c true if the class contains pure virtual methods
* \param super Name of the parent class * \param super Name of the parent class
@ -148,8 +182,13 @@ public: \
} }
/** /**
* \brief Creates basic RTTI support for a class. Assumes that * \brief Creates basic RTTI support for a class. To be used when the class
* the class can be instantiated by name. * has a \a simple constructor (i.e. one wich does not take any arguments)
*
* This macro or one of its variants should be invoked in the main
* implementation \c .cpp file of any class that derives from \ref Object.
* This is needed for the basic RTTI support provided by Mitsuba objects.
*
* \param name Name of the class * \param name Name of the class
* \param abstract \c true if the class contains pure virtual methods * \param abstract \c true if the class contains pure virtual methods
* \param super Name of the parent class * \param super Name of the parent class
@ -164,8 +203,13 @@ public: \
} }
/** /**
* \brief Creates basic RTTI support for a class. Assumes that * \brief Creates basic RTTI support for a class. To be used when the class
* the class can be unserialized from a binary data stream. * can be unserialized from a binary data stream.
*
* This macro or one of its variants should be invoked in the main
* implementation \c .cpp file of any class that derives from \ref Object.
* This is needed for the basic RTTI support provided by Mitsuba objects.
*
* \param name Name of the class * \param name Name of the class
* \param abstract \c true if the class contains pure virtual methods * \param abstract \c true if the class contains pure virtual methods
* \param super Name of the parent class * \param super Name of the parent class
@ -180,9 +224,14 @@ public: \
} }
/** /**
* \brief Creates basic RTTI support for a class. Assumes that * \brief Creates basic RTTI support for a class. To be used when the class
* the class can be unserialized from a binary data stream as well * can be unserialized from a binary data stream as well as instantiated
* as instantiated by name. * by a constructor that does not take any arguments.
*
* This macro or one of its variants should be invoked in the main
* implementation \c .cpp file of any class that derives from \ref Object.
* This is needed for the basic RTTI support provided by Mitsuba objects.
*
* \param name Name of the class * \param name Name of the class
* \param abstract \c true if the class contains pure virtual methods * \param abstract \c true if the class contains pure virtual methods
* \param super Name of the parent class * \param super Name of the parent class

View File

@ -54,12 +54,13 @@ MTS_NAMESPACE_BEGIN
/*! \addtogroup libcore */ /*! \addtogroup libcore */
/*! @{ */ /*! @{ */
/// Assert that a condition is true (to be used \a inside of classes that derive from \ref Object)
#define Assert(cond) do { \ #define Assert(cond) do { \
if (!(cond)) Log(EError, "Assertion \"%s\" failed in %s:%i", \ if (!(cond)) Log(EError, "Assertion \"%s\" failed in %s:%i", \
#cond, __FILE__, __LINE__); \ #cond, __FILE__, __LINE__); \
} while (0) } while (0)
/// ``Static'' assertion (to be used outside of classes that derive from Object) /// ``Static'' assertion (to be used \a outside of classes that derive from \ref Object)
#define SAssert(cond) do { \ #define SAssert(cond) do { \
if (!(cond)) SLog(EError, "Assertion \"%s\" failed in %s:%i", \ if (!(cond)) SLog(EError, "Assertion \"%s\" failed in %s:%i", \
#cond, __FILE__, __LINE__); \ #cond, __FILE__, __LINE__); \
@ -152,6 +153,9 @@ public:
/// Remove an appender from this logger /// Remove an appender from this logger
void removeAppender(Appender *appender); void removeAppender(Appender *appender);
/// Remove all appenders from this logger
void clearAppenders();
/// Return the number of registered appenders /// Return the number of registered appenders
inline size_t getAppenderCount() const { return m_appenders.size(); } inline size_t getAppenderCount() const { return m_appenders.size(); }

View File

@ -140,15 +140,15 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
#if defined(__OSX__) #if defined(__OSX__)
extern void __ubi_autorelease_init(); extern void __mts_autorelease_init();
extern void __ubi_autorelease_shutdown(); extern void __mts_autorelease_shutdown();
extern void __ubi_autorelease_begin(); extern void __mts_autorelease_begin();
extern void __ubi_autorelease_end(); extern void __mts_autorelease_end();
extern std::string __ubi_bundlepath(); extern std::string __mts_bundlepath();
extern void __ubi_chdir_to_bundlepath(); extern void __mts_chdir_to_bundlepath();
extern void __ubi_init_cocoa(); extern void __mts_init_cocoa();
#define MTS_AUTORELEASE_BEGIN() __ubi_autorelease_begin(); #define MTS_AUTORELEASE_BEGIN() __mts_autorelease_begin();
#define MTS_AUTORELEASE_END() __ubi_autorelease_end(); #define MTS_AUTORELEASE_END() __mts_autorelease_end();
#define MTS_AMBIGUOUS_SIZE_T 1 #define MTS_AMBIGUOUS_SIZE_T 1
#else #else
#define MTS_AUTORELEASE_BEGIN() #define MTS_AUTORELEASE_BEGIN()

View File

@ -49,7 +49,7 @@ extern MTS_EXPORT_CORE std::string indent(const std::string &string, int amount=
extern MTS_EXPORT_CORE std::string formatString(const char *pFmt, ...); extern MTS_EXPORT_CORE std::string formatString(const char *pFmt, ...);
/** /**
* Convert a time difference (in ms) to a string representation * \brief Convert a time difference (in ms) to a string representation
* \param time Time value in milliseconds * \param time Time value in milliseconds
* \param precise When set to true, a higher-precision string representation * \param precise When set to true, a higher-precision string representation
* is generated. * is generated.
@ -104,9 +104,10 @@ extern MTS_EXPORT_CORE std::string getHostName();
extern MTS_EXPORT_CORE std::string getFQDN(); extern MTS_EXPORT_CORE std::string getFQDN();
/** /**
* Enable floating point exceptions (to catch NaNs, overflows, * \brief Enable floating point exceptions (to catch NaNs, overflows,
* arithmetic with infinity). On Intel processors, this applies * arithmetic with infinity).
* to both x87 and SSE2 math *
* On Intel processors, this applies to both x87 and SSE2 math
* *
* \return \c true if floating point exceptions were active * \return \c true if floating point exceptions were active
* before calling the function * before calling the function
@ -114,7 +115,7 @@ extern MTS_EXPORT_CORE std::string getFQDN();
extern MTS_EXPORT_CORE bool enableFPExceptions(); extern MTS_EXPORT_CORE bool enableFPExceptions();
/** /**
* Disable floating point exceptions * \brief Disable floating point exceptions
* *
* \return \c true if floating point exceptions were active * \return \c true if floating point exceptions were active
* before calling the function * before calling the function
@ -149,6 +150,8 @@ template<typename T> inline T endianness_swap(T value) {
} }
/** /**
* \brief Apply an arbitrary permutation to an array in linear time
*
* This algorithm is based on Donald Knuth's book * This algorithm is based on Donald Knuth's book
* "The Art of Computer Programming, Volume 3: Sorting and Searching" * "The Art of Computer Programming, Volume 3: Sorting and Searching"
* (1st edition, section 5.2, page 595) * (1st edition, section 5.2, page 595)
@ -276,7 +279,8 @@ extern MTS_EXPORT_CORE bool solveQuadratic(Float a, Float b,
Float c, Float &x0, Float &x1); Float c, Float &x0, Float &x1);
/** /**
* Calculate the radical inverse function * \brief Calculate the radical inverse function
*
* (Implementation based on "Instant Radiosity" by Alexander Keller * (Implementation based on "Instant Radiosity" by Alexander Keller
* in Computer Graphics Proceedings, Annual Conference Series, * in Computer Graphics Proceedings, Annual Conference Series,
* SIGGRAPH 97, pp. 49-56. * SIGGRAPH 97, pp. 49-56.
@ -284,7 +288,8 @@ extern MTS_EXPORT_CORE bool solveQuadratic(Float a, Float b,
extern MTS_EXPORT_CORE Float radicalInverse(int b, size_t i); extern MTS_EXPORT_CORE Float radicalInverse(int b, size_t i);
/** /**
* Incrementally calculate the radical inverse function * \brief Incrementally calculate the radical inverse function
*
* (Implementation based on "Instant Radiosity" by Alexander Keller * (Implementation based on "Instant Radiosity" by Alexander Keller
* in Computer Graphics Proceedings, Annual Conference Series, * in Computer Graphics Proceedings, Annual Conference Series,
* SIGGRAPH 97, pp. 49-56. * SIGGRAPH 97, pp. 49-56.
@ -427,7 +432,7 @@ extern MTS_EXPORT_CORE Point2 squareToStdNormal(const Point2 &sample);
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
/** /**
* Calculates the unpolarized fresnel reflection coefficient for a * \brief Calculates the unpolarized fresnel reflection coefficient for a
* dielectric material * dielectric material
* *
* \param cosThetaI * \param cosThetaI
@ -443,7 +448,7 @@ extern MTS_EXPORT_CORE Float fresnelDielectric(Float cosThetaI,
Float cosThetaT, Float etaI, Float etaT); Float cosThetaT, Float etaI, Float etaT);
/** /**
* Calculates the unpolarized fresnel reflection coefficient for a * \brief Calculates the unpolarized fresnel reflection coefficient for a
* dielectric material. Handles incidence from either sides. * dielectric material. Handles incidence from either sides.
* *
* \param cosThetaI * \param cosThetaI
@ -457,7 +462,7 @@ extern MTS_EXPORT_CORE Float fresnel(Float cosThetaI, Float extIOR,
Float intIOR); Float intIOR);
/** /**
* Calculates the unpolarized fresnel reflection coefficient on * \brief Calculates the unpolarized fresnel reflection coefficient on
* an interface to a conductor. * an interface to a conductor.
* *
* \param cosThetaI * \param cosThetaI

View File

@ -22,13 +22,13 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** /**
* Current release of Mitsuba * \brief Current release of Mitsuba
* \ingroup libcore * \ingroup libcore
*/ */
#define MTS_VERSION "0.3.0" #define MTS_VERSION "0.3.0"
/** /**
* Year of the current release * \brief Year of the current release
* \ingroup libcore * \ingroup libcore
*/ */
#define MTS_YEAR "2011" #define MTS_YEAR "2011"

View File

@ -34,6 +34,7 @@ MTS_NAMESPACE_BEGIN
* \brief Constant spectrum-valued texture * \brief Constant spectrum-valued texture
* *
* Includes a \ref Shader implementation for hardware rendering * Includes a \ref Shader implementation for hardware rendering
* \ingroup libhw
*/ */
class MTS_EXPORT_HW ConstantSpectrumTexture : public Texture { class MTS_EXPORT_HW ConstantSpectrumTexture : public Texture {
public: public:
@ -82,6 +83,7 @@ protected:
* \brief Constant float-valued texture * \brief Constant float-valued texture
* *
* Includes a \ref Shader implementation for hardware rendering * Includes a \ref Shader implementation for hardware rendering
* \ingroup libhw
*/ */
class MTS_EXPORT_HW ConstantFloatTexture : public Texture { class MTS_EXPORT_HW ConstantFloatTexture : public Texture {
public: public:
@ -130,6 +132,7 @@ protected:
* \brief Componentwise addition of two textures * \brief Componentwise addition of two textures
* *
* Includes a \ref Shader implementation for hardware rendering * Includes a \ref Shader implementation for hardware rendering
* \ingroup libhw
*/ */
class MTS_EXPORT_HW SpectrumAdditionTexture : public Texture { class MTS_EXPORT_HW SpectrumAdditionTexture : public Texture {
public: public:
@ -181,6 +184,7 @@ protected:
* \brief Componentwise subtraction of two textures * \brief Componentwise subtraction of two textures
* *
* Includes a \ref Shader implementation for hardware rendering * Includes a \ref Shader implementation for hardware rendering
* \ingroup libhw
*/ */
class MTS_EXPORT_HW SpectrumSubtractionTexture : public Texture { class MTS_EXPORT_HW SpectrumSubtractionTexture : public Texture {
public: public:
@ -232,6 +236,7 @@ protected:
* \brief Componentwise product of two textures * \brief Componentwise product of two textures
* *
* Includes a \ref Shader implementation for hardware rendering * Includes a \ref Shader implementation for hardware rendering
* \ingroup libhw
*/ */
class MTS_EXPORT_HW SpectrumProductTexture : public Texture { class MTS_EXPORT_HW SpectrumProductTexture : public Texture {
public: public:

View File

@ -28,6 +28,7 @@ class Renderer;
/** \brief The device event structure encapsulates event /** \brief The device event structure encapsulates event
* information such as mouse movement or key presses * information such as mouse movement or key presses
* \ingroup libhw
*/ */
struct MTS_EXPORT_HW DeviceEvent { struct MTS_EXPORT_HW DeviceEvent {
public: public:
@ -114,6 +115,7 @@ private:
}; };
/** \brief Abstract device event callback /** \brief Abstract device event callback
* \ingroup libhw
*/ */
class MTS_EXPORT_HW DeviceEventListener { class MTS_EXPORT_HW DeviceEventListener {
public: public:
@ -128,6 +130,7 @@ protected:
}; };
/** \brief An abstract drawing device /** \brief An abstract drawing device
* \ingroup libhw
*/ */
class MTS_EXPORT_HW Device : public Object { class MTS_EXPORT_HW Device : public Object {
public: public:

View File

@ -28,6 +28,7 @@ MTS_NAMESPACE_BEGIN
* *
* A FreeType2-based generation tool is located in the directory * A FreeType2-based generation tool is located in the directory
* 'tools/linux/fontgen'. Only Latin-1 is supported at the moment. * 'tools/linux/fontgen'. Only Latin-1 is supported at the moment.
* \ingroup libhw
*/ */
class MTS_EXPORT_HW Font : public Object { class MTS_EXPORT_HW Font : public Object {
public: public:

View File

@ -25,6 +25,7 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** \brief OpenGL-based GPUGeometry implementation /** \brief OpenGL-based GPUGeometry implementation
* \ingroup libhw
*/ */
class MTS_EXPORT_HW GLGeometry : public GPUGeometry { class MTS_EXPORT_HW GLGeometry : public GPUGeometry {
friend class GLRenderer; friend class GLRenderer;

View File

@ -26,6 +26,7 @@ MTS_NAMESPACE_BEGIN
/** \brief OpenGL shader class -- responsible from compiling /** \brief OpenGL shader class -- responsible from compiling
* and linking GLSL fragments * and linking GLSL fragments
* \ingroup libhw
*/ */
class MTS_EXPORT_HW GLProgram : public GPUProgram { class MTS_EXPORT_HW GLProgram : public GPUProgram {
public: public:

View File

@ -46,6 +46,7 @@ MTS_NAMESPACE_BEGIN
/** /**
* \brief OpenGL implementation of the \ref Renderer interface * \brief OpenGL implementation of the \ref Renderer interface
* \ingroup libhw
*/ */
class MTS_EXPORT_HW GLRenderer : public Renderer { class MTS_EXPORT_HW GLRenderer : public Renderer {
public: public:

View File

@ -25,6 +25,7 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** \brief OpenGL-based GPUSync implementation /** \brief OpenGL-based GPUSync implementation
* \ingroup libhw
*/ */
class MTS_EXPORT_HW GLSync : public GPUSync { class MTS_EXPORT_HW GLSync : public GPUSync {
public: public:

View File

@ -25,6 +25,7 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** \brief OpenGL-based GPUTexture implementation /** \brief OpenGL-based GPUTexture implementation
* \ingroup libhw
*/ */
class MTS_EXPORT_HW GLTexture : public GPUTexture { class MTS_EXPORT_HW GLTexture : public GPUTexture {
public: public:

View File

@ -24,6 +24,7 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** \brief X Windows OpenGL-capable (GLX) device /** \brief X Windows OpenGL-capable (GLX) device
* \ingroup libhw
*/ */
class MTS_EXPORT_HW GLXDevice : public X11Device { class MTS_EXPORT_HW GLXDevice : public X11Device {
public: public:

View File

@ -25,6 +25,7 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** \brief GLX (XFree86) renderer /** \brief GLX (XFree86) renderer
* \ingroup libhw
*/ */
class MTS_EXPORT_HW GLXRenderer : public GLRenderer { class MTS_EXPORT_HW GLXRenderer : public GLRenderer {
public: public:

View File

@ -24,6 +24,7 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** \brief Abstract geometry storage on a graphics card /** \brief Abstract geometry storage on a graphics card
* \ingroup libhw
*/ */
class MTS_EXPORT_HW GPUGeometry : public Object { class MTS_EXPORT_HW GPUGeometry : public Object {
public: public:

View File

@ -24,6 +24,7 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** \brief Abstract shader program (for fragment/vertex shading) /** \brief Abstract shader program (for fragment/vertex shading)
* \ingroup libhw
*/ */
class MTS_EXPORT_HW GPUProgram : public Object { class MTS_EXPORT_HW GPUProgram : public Object {
public: public:

View File

@ -25,6 +25,7 @@ MTS_NAMESPACE_BEGIN
/** \brief Abstract GPU synchronization object implementing /** \brief Abstract GPU synchronization object implementing
* a memory fence operation. * a memory fence operation.
* \ingroup libhw
*/ */
class MTS_EXPORT_HW GPUSync : public Object { class MTS_EXPORT_HW GPUSync : public Object {
public: public:

View File

@ -26,6 +26,7 @@ MTS_NAMESPACE_BEGIN
/** \brief A data structure for 1/2/3D and cube texture mapping. Also /** \brief A data structure for 1/2/3D and cube texture mapping. Also
* has optional render-to-texture functionality. * has optional render-to-texture functionality.
* \ingroup libhw
*/ */
class MTS_EXPORT_HW GPUTexture : public Object { class MTS_EXPORT_HW GPUTexture : public Object {
public: public:

View File

@ -29,6 +29,7 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** \brief A MacOS X (NSGL) OpenGL Renderer /** \brief A MacOS X (NSGL) OpenGL Renderer
* \ingroup libhw
*/ */
class MTS_EXPORT_HW NSGLRenderer : public GLRenderer { class MTS_EXPORT_HW NSGLRenderer : public GLRenderer {
public: public:

View File

@ -24,6 +24,7 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** \brief A MacOS X (NSGL) windowing environment session /** \brief A MacOS X (NSGL) windowing environment session
* \ingroup libhw
*/ */
class MTS_EXPORT_HW NSGLSession : public Session { class MTS_EXPORT_HW NSGLSession : public Session {
public: public:

View File

@ -33,7 +33,8 @@ class Bitmap;
class Font; class Font;
/** /**
* Helper class, which documents the capabilities of a renderer implementation * \brief Helper class, which documents the capabilities of a renderer implementation
* \ingroup libhw
*/ */
class MTS_EXPORT_HW RendererCapabilities : public Object { class MTS_EXPORT_HW RendererCapabilities : public Object {
public: public:
@ -71,6 +72,7 @@ protected:
}; };
/** \brief Abstract renderer implementation /** \brief Abstract renderer implementation
* \ingroup libhw
*/ */
class MTS_EXPORT_HW Renderer : public Object { class MTS_EXPORT_HW Renderer : public Object {
public: public:

View File

@ -26,6 +26,7 @@ MTS_NAMESPACE_BEGIN
class Device; class Device;
/** \brief Abstract windowing environment session /** \brief Abstract windowing environment session
* \ingroup libhw
*/ */
class MTS_EXPORT_HW Session : public Object { class MTS_EXPORT_HW Session : public Object {
friend class Device; friend class Device;

View File

@ -30,6 +30,8 @@ MTS_NAMESPACE_BEGIN
* *
* This class makes it possible to rapidly prototype simple OpenGL * This class makes it possible to rapidly prototype simple OpenGL
* applications, which can be started using the 'mtsutil' launcher. * applications, which can be started using the 'mtsutil' launcher.
*
* \ingroup libhw
*/ */
class MTS_EXPORT_HW Viewer : public Utility, public DeviceEventListener { class MTS_EXPORT_HW Viewer : public Utility, public DeviceEventListener {
public: public:

View File

@ -36,6 +36,8 @@ MTS_NAMESPACE_BEGIN
* properties using uniforms, in which case already existing code * properties using uniforms, in which case already existing code
* can be reused and we get something more like lower case n squared * can be reused and we get something more like lower case n squared
* (where lower n is the number of material types). * (where lower n is the number of material types).
*
* \ingroup libhw
*/ */
class MTS_EXPORT_HW VPLShaderManager : public Object { class MTS_EXPORT_HW VPLShaderManager : public Object {
public: public:

View File

@ -25,6 +25,7 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** \brief Windows (WGL) device implementation /** \brief Windows (WGL) device implementation
* \ingroup libhw
*/ */
class MTS_EXPORT_HW WGLDevice : public Device { class MTS_EXPORT_HW WGLDevice : public Device {
public: public:

View File

@ -25,6 +25,7 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** \brief Windows (WGL) renderer implementation /** \brief Windows (WGL) renderer implementation
* \ingroup libhw
*/ */
class MTS_EXPORT_HW WGLRenderer : public GLRenderer { class MTS_EXPORT_HW WGLRenderer : public GLRenderer {
public: public:

View File

@ -24,6 +24,7 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** \brief Windows (WGL) windowing environment session /** \brief Windows (WGL) windowing environment session
* \ingroup libhw
*/ */
class MTS_EXPORT_HW WGLSession : public Session { class MTS_EXPORT_HW WGLSession : public Session {
friend class WGLDevice; friend class WGLDevice;

View File

@ -25,6 +25,7 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** \brief X Window System (X11R6) device / software surface /** \brief X Window System (X11R6) device / software surface
* \ingroup libhw
*/ */
class MTS_EXPORT_HW X11Device : public Device { class MTS_EXPORT_HW X11Device : public Device {
friend class X11Session; friend class X11Session;

View File

@ -26,6 +26,7 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** \brief X Window System (X11R6) session /** \brief X Window System (X11R6) session
* \ingroup libhw
*/ */
class MTS_EXPORT_HW X11Session : public Session { class MTS_EXPORT_HW X11Session : public Session {
friend class X11Device; friend class X11Device;

View File

@ -33,6 +33,7 @@ MTS_NAMESPACE_BEGIN
* *
* \sa BSDF::f() * \sa BSDF::f()
* \sa BSDF::sample() * \sa BSDF::sample()
* \ingroup librender
*/ */
struct MTS_EXPORT_RENDER BSDFQueryRecord { struct MTS_EXPORT_RENDER BSDFQueryRecord {
public: public:
@ -179,7 +180,7 @@ public:
/** /**
* \brief Abstract BSDF base-class. * \brief Abstract %BSDF base-class.
* *
* This class implements an abstract interface to all BSDF plugins in Mitsuba. * This class implements an abstract interface to all BSDF plugins in Mitsuba.
* It exposes functions for evaluating and sampling the model, and it allows * It exposes functions for evaluating and sampling the model, and it allows
@ -191,7 +192,9 @@ public:
* this class can sample and evaluate a complete BSDF, but it also allows to * this class can sample and evaluate a complete BSDF, but it also allows to
* pick and choose individual components of multi-lobed BSDFs based on their * pick and choose individual components of multi-lobed BSDFs based on their
* properties and component indices. This selection is done using a * properties and component indices. This selection is done using a
*
* \ref BSDFQueryRecord. * \ref BSDFQueryRecord.
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER BSDF : public ConfigurableObject, public HWResource { class MTS_EXPORT_RENDER BSDF : public ConfigurableObject, public HWResource {
public: public:

View File

@ -26,6 +26,8 @@ MTS_NAMESPACE_BEGIN
/** \brief Abstract camera base class. A camera turns a sample on /** \brief Abstract camera base class. A camera turns a sample on
* the image plane into a 3D ray. It uses two supporting child * the image plane into a 3D ray. It uses two supporting child
* objects: a \re Sampler and a \ref Film instance. * objects: a \re Sampler and a \ref Film instance.
*
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER Camera : public ConfigurableObject { class MTS_EXPORT_RENDER Camera : public ConfigurableObject {
public: public:
@ -201,7 +203,13 @@ protected:
Float m_shutterOpen, m_shutterClose, m_shutterOpenTime; Float m_shutterOpen, m_shutterClose, m_shutterOpenTime;
ref<Medium> m_medium; ref<Medium> m_medium;
}; };
/**
* Projective camera base class
*
* \ingroup librender
*/
class MTS_EXPORT_RENDER ProjectiveCamera : public Camera { class MTS_EXPORT_RENDER ProjectiveCamera : public Camera {
public: public:
/// Return the projection transformation /// Return the projection transformation
@ -237,8 +245,12 @@ protected:
}; };
/** /**
* Base class of all pinhole cameras. Provides solid angle computation * \brief Base class of all perspective cameras
* routines useful for importance-based integrators. *
* Provides solid angle computation routines useful
* for importance-based integrators.
*
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER PerspectiveCamera : public ProjectiveCamera { class MTS_EXPORT_RENDER PerspectiveCamera : public ProjectiveCamera {
public: public:

View File

@ -26,6 +26,7 @@ MTS_NAMESPACE_BEGIN
/** /**
* \brief Specifies the transported quantity when * \brief Specifies the transported quantity when
* sampling or evaluating a scattering function * sampling or evaluating a scattering function
* \ingroup librender
*/ */
enum ETransportQuantity { enum ETransportQuantity {
ERadiance = 1, ERadiance = 1,
@ -34,6 +35,7 @@ enum ETransportQuantity {
/** /**
* \brief Specifies the measure associated with * \brief Specifies the measure associated with
* a scattering function * a scattering function
* \ingroup librender
*/ */
enum EMeasure { enum EMeasure {
ESolidAngle = 1, ESolidAngle = 1,

View File

@ -29,6 +29,7 @@ MTS_NAMESPACE_BEGIN
/** \brief Abstract Film base class - used to store samples /** \brief Abstract Film base class - used to store samples
* generated by the Integrator. * generated by the Integrator.
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER Film : public ConfigurableObject { class MTS_EXPORT_RENDER Film : public ConfigurableObject {
public: public:

View File

@ -25,9 +25,11 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** /**
* Process for parallel photon map construction. Given a number and * \brief Process for parallel photon map construction
* type (surface/caustic/volume) of photons, it distributes the work *
* over an arbitrary number of machines. * Given a number and type (surface/caustic/volume) of photons, this
* class distributes the work over an arbitrary number of machines.
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER GatherPhotonProcess : public ParticleProcess { class MTS_EXPORT_RENDER GatherPhotonProcess : public ParticleProcess {
public: public:

View File

@ -681,6 +681,7 @@ MTS_NAMESPACE_BEGIN
* in parallel. * in parallel.
* *
* \author Wenzel Jakob * \author Wenzel Jakob
* \ingroup librender
*/ */
template <typename AABBType, typename TreeConstructionHeuristic, typename Derived> template <typename AABBType, typename TreeConstructionHeuristic, typename Derived>
class GenericKDTree : public KDTreeBase<AABBType> { class GenericKDTree : public KDTreeBase<AABBType> {

View File

@ -25,6 +25,8 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** /**
* \brief Storage for an image sub-block (a.k.a render bucket)
*
* This class is used by image-based parallel processes and encapsulates * This class is used by image-based parallel processes and encapsulates
* the resulting information in a rectangular region of an image. Such * the resulting information in a rectangular region of an image. Such
* blocks may also include a border storing contributions that are slightly * blocks may also include a border storing contributions that are slightly
@ -34,6 +36,8 @@ MTS_NAMESPACE_BEGIN
* This is important to avoid bias when using large-extent reconstruction * This is important to avoid bias when using large-extent reconstruction
* filters, while at the same time placing significantly different amounts * filters, while at the same time placing significantly different amounts
* of samples into nearby pixels. * of samples into nearby pixels.
*
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER ImageBlock : public WorkResult { class MTS_EXPORT_RENDER ImageBlock : public WorkResult {
public: public:

View File

@ -28,6 +28,8 @@ MTS_NAMESPACE_BEGIN
* the subclass) on the pixels of an image where work on adjacent pixels * the subclass) on the pixels of an image where work on adjacent pixels
* is independent. For preview purposes, a spiraling pattern of square * is independent. For preview purposes, a spiraling pattern of square
* pixel blocks is generated. * pixel blocks is generated.
*
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER BlockedImageProcess : public ParallelProcess { class MTS_EXPORT_RENDER BlockedImageProcess : public ParallelProcess {
public: public:

View File

@ -33,6 +33,8 @@ MTS_NAMESPACE_BEGIN
* rasterization that directly operates on the camera's film and has * rasterization that directly operates on the camera's film and has
* no global knowledge about radiance within the scene. Other possibilities * no global knowledge about radiance within the scene. Other possibilities
* are sampling- or particle tracing-based integrators. * are sampling- or particle tracing-based integrators.
*
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER Integrator : public NetworkedObject { class MTS_EXPORT_RENDER Integrator : public NetworkedObject {
public: public:
@ -109,6 +111,7 @@ protected:
/** /**
* \brief Radiance query record data structure used by \ref SampleIntegrator * \brief Radiance query record data structure used by \ref SampleIntegrator
* \ingroup librender
*/ */
struct MTS_EXPORT_RENDER RadianceQueryRecord { struct MTS_EXPORT_RENDER RadianceQueryRecord {
public: public:
@ -278,6 +281,7 @@ public:
/** \brief Abstract base class, which describes integrators /** \brief Abstract base class, which describes integrators
* capable of computing samples of the scene's radiance function. * capable of computing samples of the scene's radiance function.
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER SampleIntegrator : public Integrator { class MTS_EXPORT_RENDER SampleIntegrator : public Integrator {
public: public:
@ -402,6 +406,7 @@ protected:
* \brief Base class of all recursive Monte Carlo integrators, which compute * \brief Base class of all recursive Monte Carlo integrators, which compute
* unbiased solutions to the rendering equation (and optionally * unbiased solutions to the rendering equation (and optionally
* the radiative transfer equation). * the radiative transfer equation).
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER MonteCarloIntegrator : public SampleIntegrator { class MTS_EXPORT_RENDER MonteCarloIntegrator : public SampleIntegrator {
public: public:

View File

@ -38,6 +38,7 @@ typedef Spectrum TranslationalGradient[3];
* (Proceedings of SCCG 2005) * (Proceedings of SCCG 2005)
* *
* \author Wenzel Jakob * \author Wenzel Jakob
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER HemisphereSampler : public Object { class MTS_EXPORT_RENDER HemisphereSampler : public Object {
public: public:
@ -140,6 +141,7 @@ private:
* by E. Tabellion and A. Lamorlette (SIGGRAPH 2004) * by E. Tabellion and A. Lamorlette (SIGGRAPH 2004)
* *
* \author Wenzel Jakob * \author Wenzel Jakob
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER IrradianceCache : public SerializableObject { class MTS_EXPORT_RENDER IrradianceCache : public SerializableObject {
public: public:

View File

@ -27,6 +27,7 @@ MTS_NAMESPACE_BEGIN
/** /**
* \brief Data structure used by the direct illumination / shadow ray * \brief Data structure used by the direct illumination / shadow ray
* sampling methods in the class \ref Luminaire. * sampling methods in the class \ref Luminaire.
* \ingroup librender
*/ */
struct MTS_EXPORT_RENDER LuminaireSamplingRecord { struct MTS_EXPORT_RENDER LuminaireSamplingRecord {
public: public:
@ -66,6 +67,7 @@ public:
/** /**
* \brief Data structure used to record information associated with * \brief Data structure used to record information associated with
* emission sampling in the class \ref Luminaire. * emission sampling in the class \ref Luminaire.
* \ingroup librender
*/ */
struct MTS_EXPORT_RENDER EmissionRecord { struct MTS_EXPORT_RENDER EmissionRecord {
public: public:
@ -119,6 +121,7 @@ public:
/** /**
* \brief Abstract implementation of a luminaire. Supports emission and * \brief Abstract implementation of a luminaire. Supports emission and
* direct illumination sampling strategies, and computes related probabilities. * direct illumination sampling strategies, and computes related probabilities.
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER Luminaire : public ConfigurableObject, public HWResource { class MTS_EXPORT_RENDER Luminaire : public ConfigurableObject, public HWResource {
public: public:

View File

@ -28,6 +28,7 @@ MTS_NAMESPACE_BEGIN
* integral of the RTE * integral of the RTE
* *
* \sa Medium::sampleDistance() * \sa Medium::sampleDistance()
* \ingroup librender
*/ */
struct MTS_EXPORT_RENDER MediumSamplingRecord { struct MTS_EXPORT_RENDER MediumSamplingRecord {
public: public:
@ -89,6 +90,7 @@ public:
}; };
/** \brief Abstract participating medium /** \brief Abstract participating medium
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER Medium : public NetworkedObject { class MTS_EXPORT_RENDER Medium : public NetworkedObject {
public: public:

View File

@ -26,6 +26,7 @@ MTS_NAMESPACE_BEGIN
#define MIPMAP_LUTSIZE 128 #define MIPMAP_LUTSIZE 128
/** \brief Isotropic/anisotropic EWA mip-map texture map class based on PBRT /** \brief Isotropic/anisotropic EWA mip-map texture map class based on PBRT
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER MIPMap : public Object { class MTS_EXPORT_RENDER MIPMap : public Object {
public: public:

View File

@ -25,7 +25,8 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** /**
* Sparse mipmap data structure based on an adaptive octree representation * \brief Sparse mipmap data structure based on an adaptive octree representation
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER SparseMipmap3D : public SerializableObject { class MTS_EXPORT_RENDER SparseMipmap3D : public SerializableObject {
public: public:

View File

@ -27,6 +27,7 @@ MTS_NAMESPACE_BEGIN
* \brief Contains a few useful noise functions * \brief Contains a few useful noise functions
* *
* The implementations in this class are based on PBRT * The implementations in this class are based on PBRT
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER Noise { class MTS_EXPORT_RENDER Noise {
public: public:

View File

@ -38,6 +38,8 @@ MTS_NAMESPACE_BEGIN
* of \ref ParticleTracer with overridden functions * of \ref ParticleTracer with overridden functions
* \ref ParticleTracer::handleSurfaceInteraction and * \ref ParticleTracer::handleSurfaceInteraction and
* \ref ParticleTracer::handleMediumInteraction. * \ref ParticleTracer::handleMediumInteraction.
*
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER ParticleProcess : public ParallelProcess { class MTS_EXPORT_RENDER ParticleProcess : public ParallelProcess {
public: public:
@ -119,6 +121,8 @@ protected:
* *
* Traces particles and performs a customizable action every time a * Traces particles and performs a customizable action every time a
* surface or volume interaction occurs. * surface or volume interaction occurs.
*
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER ParticleTracer : public WorkProcessor { class MTS_EXPORT_RENDER ParticleTracer : public WorkProcessor {
public: public:

View File

@ -27,6 +27,8 @@ MTS_NAMESPACE_BEGIN
/** /**
* \brief Data structure, which contains information * \brief Data structure, which contains information
* required to sample or query a phase function. * required to sample or query a phase function.
*
* \ingroup librender
*/ */
struct MTS_EXPORT_RENDER PhaseFunctionQueryRecord { struct MTS_EXPORT_RENDER PhaseFunctionQueryRecord {
/** /**
@ -97,6 +99,7 @@ struct MTS_EXPORT_RENDER PhaseFunctionQueryRecord {
}; };
/** \brief Abstract phase function. /** \brief Abstract phase function.
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER PhaseFunction : public ConfigurableObject { class MTS_EXPORT_RENDER PhaseFunction : public ConfigurableObject {
public: public:

View File

@ -28,6 +28,8 @@ MTS_NAMESPACE_BEGIN
* *
* Requires 24 bytes when Mitsuba is compiled with single precision * Requires 24 bytes when Mitsuba is compiled with single precision
* and RGB-based color spectra. * and RGB-based color spectra.
*
* \ingroup librender
*/ */
struct MTS_EXPORT_RENDER Photon { struct MTS_EXPORT_RENDER Photon {
friend class PhotonMap; friend class PhotonMap;

View File

@ -39,6 +39,7 @@ MTS_NAMESPACE_BEGIN
* estimate. The bug has been fixed in this re-implementation. * estimate. The bug has been fixed in this re-implementation.
* *
* \author Wenzel Jakob * \author Wenzel Jakob
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER PhotonMap : public SerializableObject { class MTS_EXPORT_RENDER PhotonMap : public SerializableObject {
public: public:

View File

@ -27,6 +27,7 @@ MTS_NAMESPACE_BEGIN
* Preview worker - can be used to render a quick preview of a scene * Preview worker - can be used to render a quick preview of a scene
* (illuminated by a VPL). The implementation uses coherent ray tracing * (illuminated by a VPL). The implementation uses coherent ray tracing
* when compiled in single precision and SSE is available. * when compiled in single precision and SSE is available.
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER PreviewWorker : public WorkProcessor { class MTS_EXPORT_RENDER PreviewWorker : public WorkProcessor {
public: public:

View File

@ -28,6 +28,8 @@ MTS_NAMESPACE_BEGIN
* *
* An example usage is in \ref ParticleProcess, where this class specifies * An example usage is in \ref ParticleProcess, where this class specifies
* sequences of particles to be traced. * sequences of particles to be traced.
*
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER RangeWorkUnit : public WorkUnit { class MTS_EXPORT_RENDER RangeWorkUnit : public WorkUnit {
public: public:

View File

@ -27,6 +27,7 @@ MTS_NAMESPACE_BEGIN
* \brief Work unit that specifies a rectangular region in an image. * \brief Work unit that specifies a rectangular region in an image.
* *
* Used for instance in \ref BlockedImageProcess * Used for instance in \ref BlockedImageProcess
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER RectangularWorkUnit : public WorkUnit { class MTS_EXPORT_RENDER RectangularWorkUnit : public WorkUnit {
public: public:

View File

@ -29,6 +29,7 @@ MTS_NAMESPACE_BEGIN
* Render job - coordinates the process of rendering a single * Render job - coordinates the process of rendering a single
* image. Implemented as a thread so that multiple jobs can * image. Implemented as a thread so that multiple jobs can
* be executed concurrently. * be executed concurrently.
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER RenderJob : public Thread { class MTS_EXPORT_RENDER RenderJob : public Thread {
public: public:

View File

@ -32,6 +32,7 @@ MTS_NAMESPACE_BEGIN
* then rendered in parallel. * then rendered in parallel.
* *
* \sa SampleIntegrator * \sa SampleIntegrator
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER BlockedRenderProcess : public BlockedImageProcess { class MTS_EXPORT_RENDER BlockedRenderProcess : public BlockedImageProcess {
public: public:

View File

@ -27,6 +27,7 @@ MTS_NAMESPACE_BEGIN
/** /**
* \brief Abstract render listener - can be used to react to * \brief Abstract render listener - can be used to react to
* progress messages (e.g. in a GUI) * progress messages (e.g. in a GUI)
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER RenderListener : public Object { class MTS_EXPORT_RENDER RenderListener : public Object {
public: public:
@ -55,6 +56,7 @@ protected:
* Render queue - used to keep track of a number of scenes * Render queue - used to keep track of a number of scenes
* that are simultaneously being rendered. Also distributes * that are simultaneously being rendered. Also distributes
* events regarding these scenes to registered listeners. * events regarding these scenes to registered listeners.
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER RenderQueue : public Object { class MTS_EXPORT_RENDER RenderQueue : public Object {
public: public:

View File

@ -25,7 +25,8 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** /**
* Abstract image reconstruction filter * \brief Abstract image reconstruction filter
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER ReconstructionFilter : public ConfigurableObject { class MTS_EXPORT_RENDER ReconstructionFilter : public ConfigurableObject {
public: public:
@ -58,11 +59,16 @@ protected:
Properties m_properties; Properties m_properties;
}; };
/** /// Filter resolution for \ref TabulatedFilter
* Tabulates expensive-to-evaluate filters so that they become
* simple array lookups. Only works for symmetric filters!
*/
#define FILTER_RESOLUTION 15 #define FILTER_RESOLUTION 15
/**
* \brief Tabulates expensive-to-evaluate filters so that they become
* simple array lookups.
*
* Only works for symmetric filters!
* \ingroup librender
*/
class TabulatedFilter : public Object { class TabulatedFilter : public Object {
public: public:
/// Tabulate a reconstruction filter /// Tabulate a reconstruction filter

View File

@ -31,6 +31,7 @@ MTS_NAMESPACE_BEGIN
/** /**
* \brief Implements the surface area heuristic for use * \brief Implements the surface area heuristic for use
* by the \ref GenericKDTree construction algorithm. * by the \ref GenericKDTree construction algorithm.
* \ingroup librender
*/ */
class SurfaceAreaHeuristic { class SurfaceAreaHeuristic {
public: public:
@ -94,6 +95,7 @@ private:
* Havran's PhD thesis "Heuristic Ray Shooting Algorithms". * Havran's PhD thesis "Heuristic Ray Shooting Algorithms".
* *
* \author Wenzel Jakob * \author Wenzel Jakob
* \ingroup librender
*/ */
template <typename Derived> template <typename Derived>
class SAHKDTree3D : public GenericKDTree<AABB, SurfaceAreaHeuristic, Derived> { class SAHKDTree3D : public GenericKDTree<AABB, SurfaceAreaHeuristic, Derived> {

View File

@ -58,6 +58,8 @@ MTS_NAMESPACE_BEGIN
* stratify over all of the rays that are ultimately generated, and the * stratify over all of the rays that are ultimately generated, and the
* \ref next1DArray() and \ref next2DArray() methods allow to do this. * \ref next1DArray() and \ref next2DArray() methods allow to do this.
* See the file \c direct.cpp for an example. * See the file \c direct.cpp for an example.
*
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER Sampler : public ConfigurableObject { class MTS_EXPORT_RENDER Sampler : public ConfigurableObject {
public: public:

View File

@ -42,6 +42,7 @@ MTS_NAMESPACE_BEGIN
* Holds information on surfaces, luminaires and participating media and * Holds information on surfaces, luminaires and participating media and
* coordinates rendering jobs. This class also provides useful query routines * coordinates rendering jobs. This class also provides useful query routines
* that are mostly used by the \ref Integrator implementations. * that are mostly used by the \ref Integrator implementations.
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER Scene : public NetworkedObject { class MTS_EXPORT_RENDER Scene : public NetworkedObject {
public: public:

View File

@ -34,7 +34,10 @@ XERCES_CPP_NAMESPACE_END
XERCES_CPP_NAMESPACE_USE XERCES_CPP_NAMESPACE_USE
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/// \brief This exception is thrown when attempting to load an outdated file /**
* \brief This exception is thrown when attempting to load an outdated file
* \ingroup librender
*/
class VersionException : public std::runtime_error { class VersionException : public std::runtime_error {
public: public:
inline VersionException(const std::string &str, const Version &version) inline VersionException(const std::string &str, const Version &version)
@ -48,6 +51,7 @@ private:
/** /**
* \brief XML parser for Mitsuba scene files. To be used with the * \brief XML parser for Mitsuba scene files. To be used with the
* SAX interface Xerces-C++. * SAX interface Xerces-C++.
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER SceneHandler : public HandlerBase { class MTS_EXPORT_RENDER SceneHandler : public HandlerBase {
public: public:

View File

@ -47,6 +47,8 @@ public:
* *
* Subclasses can implement one of various things, such as a BSDF, * Subclasses can implement one of various things, such as a BSDF,
* a light source, or a texture. * a light source, or a texture.
*
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER Shader : public Object { class MTS_EXPORT_RENDER Shader : public Object {
public: public:

View File

@ -28,6 +28,7 @@ MTS_NAMESPACE_BEGIN
/** \brief Data record, which holds sampling-related information /** \brief Data record, which holds sampling-related information
* for a shape. * for a shape.
* \ingroup librender
*/ */
struct MTS_EXPORT_RENDER ShapeSamplingRecord { struct MTS_EXPORT_RENDER ShapeSamplingRecord {
public: public:
@ -53,6 +54,7 @@ public:
/** \brief Container for all information related to /** \brief Container for all information related to
* a surface intersection * a surface intersection
* \ingroup librender
*/ */
struct MTS_EXPORT_RENDER Intersection { struct MTS_EXPORT_RENDER Intersection {
public: public:
@ -173,6 +175,7 @@ public:
}; };
/** \brief Abstract base class of all shapes /** \brief Abstract base class of all shapes
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER Shape : public ConfigurableObject { class MTS_EXPORT_RENDER Shape : public ConfigurableObject {
public: public:

View File

@ -62,6 +62,7 @@ typedef const Shape * ConstShapePtr;
* tends to be quite a bit slower. * tends to be quite a bit slower.
* *
* \sa GenericKDTree * \sa GenericKDTree
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER ShapeKDTree : public SAHKDTree3D<ShapeKDTree> { class MTS_EXPORT_RENDER ShapeKDTree : public SAHKDTree3D<ShapeKDTree> {

View File

@ -26,7 +26,10 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/// Block listener callback for use with the Spiral class /**
* \brief Block listener callback for use with the \ref Spiral class
* \ingroup librender
*/
class MTS_EXPORT_RENDER BlockListener { class MTS_EXPORT_RENDER BlockListener {
public: public:
/// Called whenever an image block is acquired /// Called whenever an image block is acquired
@ -52,7 +55,8 @@ protected:
* Aug 25, 2005 * Aug 25, 2005
* RayTracer.java * RayTracer.java
* Copyright 2005 Program of Computer Graphics, Cornell University * Copyright 2005 Program of Computer Graphics, Cornell University
*/ * \ingroup librender
*/
class MTS_EXPORT_RENDER Spiral : public Object { class MTS_EXPORT_RENDER Spiral : public Object {
public: public:

View File

@ -31,6 +31,8 @@ MTS_NAMESPACE_BEGIN
* completely up to the implementation. It might for instance * completely up to the implementation. It might for instance
* recursively trace rays or perform lookups into a precomputed * recursively trace rays or perform lookups into a precomputed
* point cloud radiance representation. * point cloud radiance representation.
*
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER Subsurface : public NetworkedObject { class MTS_EXPORT_RENDER Subsurface : public NetworkedObject {
public: public:

View File

@ -40,6 +40,7 @@ MTS_NAMESPACE_BEGIN
* declared using the MTS_DECLARE_TEST() macro are executed. Finally, * declared using the MTS_DECLARE_TEST() macro are executed. Finally,
* the shutdown() method is called. See the files in 'mitsuba/src/tests' * the shutdown() method is called. See the files in 'mitsuba/src/tests'
* for examples. * for examples.
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER TestCase : public Utility { class MTS_EXPORT_RENDER TestCase : public Utility {
public: public:
@ -123,6 +124,7 @@ protected:
* the actual generated results and a user-specified type of test is executed * the actual generated results and a user-specified type of test is executed
* to decide between equality or inequality. Any problems are kept in a log, * to decide between equality or inequality. Any problems are kept in a log,
* which can later be printed using <tt>printSummary()</tt>. * which can later be printed using <tt>printSummary()</tt>.
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER TestSupervisor : public Object { class MTS_EXPORT_RENDER TestSupervisor : public Object {
public: public:

View File

@ -28,6 +28,7 @@ MTS_NAMESPACE_BEGIN
/** /**
* \brief Base class of all textures. Computes values for an arbitrary surface * \brief Base class of all textures. Computes values for an arbitrary surface
* point. \ref Texture2D is a specialization to UV-based textures. * point. \ref Texture2D is a specialization to UV-based textures.
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER Texture : public ConfigurableObject, public HWResource { class MTS_EXPORT_RENDER Texture : public ConfigurableObject, public HWResource {
public: public:
@ -63,6 +64,10 @@ protected:
virtual ~Texture(); virtual ~Texture();
}; };
/**
* \brief Base class of all 2D textures
* \ingroup librender
*/
class MTS_EXPORT_RENDER Texture2D : public Texture { class MTS_EXPORT_RENDER Texture2D : public Texture {
public: public:
/// Return the texture value at \a its /// Return the texture value at \a its

View File

@ -25,7 +25,10 @@ MTS_NAMESPACE_BEGIN
template <typename T> class AnimationTrack; template <typename T> class AnimationTrack;
/// Base class of animation tracks /**
* \brief Base class of animation tracks
* \ingroup librender
*/
class MTS_EXPORT_RENDER AbstractAnimationTrack : public Object { class MTS_EXPORT_RENDER AbstractAnimationTrack : public Object {
template<typename T> friend class AnimationTrack; template<typename T> friend class AnimationTrack;
public: public:
@ -63,7 +66,10 @@ protected:
std::vector<Float> m_times; std::vector<Float> m_times;
}; };
/// Parameterizable animation track /**
* \brief Parameterizable animation track
* \ingroup librender
*/
template <typename T> class AnimationTrack : public AbstractAnimationTrack { template <typename T> class AnimationTrack : public AbstractAnimationTrack {
public: public:
typedef T value_type; typedef T value_type;
@ -155,7 +161,10 @@ template<> void AnimationTrack<Quaternion>::serialize(Stream *stream, const Quat
value.serialize(stream); value.serialize(stream);
} }
/// Animated transformation with an underlying keyframe representation /**
* \brief Animated transformation with an underlying keyframe representation
* \ingroup librender
*/
class MTS_EXPORT_RENDER AnimatedTransform : public Object { class MTS_EXPORT_RENDER AnimatedTransform : public Object {
public: public:
/// Create a new animated transform /// Create a new animated transform

View File

@ -30,6 +30,7 @@ static const uint32_t KNoTriangleFlag = 0xFFFFFFFF;
* Pre-computed triangle representation using Ingo Wald's TriAccel layout. * Pre-computed triangle representation using Ingo Wald's TriAccel layout.
* Fits into three 16-byte cache lines if single precision floats are used. * Fits into three 16-byte cache lines if single precision floats are used.
* The k parameter is also used for classification during kd-tree construction. * The k parameter is also used for classification during kd-tree construction.
* \ingroup librender
*/ */
struct TriAccel { struct TriAccel {
uint32_t k; uint32_t k;

View File

@ -28,6 +28,10 @@ namespace fs = boost::filesystem;
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/**
* \brief Simple tangent space storage for surfaces
* \ingroup librender
*/
struct TangentSpace { struct TangentSpace {
/// Position partials wrt. the UV parameterization /// Position partials wrt. the UV parameterization
Vector dpdu; Vector dpdu;
@ -45,6 +49,7 @@ struct TangentSpace {
}; };
/** \brief Abstract triangle mesh base class /** \brief Abstract triangle mesh base class
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER TriMesh : public Shape { class MTS_EXPORT_RENDER TriMesh : public Shape {
public: public:

View File

@ -26,6 +26,7 @@ MTS_NAMESPACE_BEGIN
/** \brief Abstract utility class -- can be used to implement /** \brief Abstract utility class -- can be used to implement
* loadable utility plugins that perform various actions. They * loadable utility plugins that perform various actions. They
* can be started using the 'mtsutil' launcher. * can be started using the 'mtsutil' launcher.
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER Utility : public Object { class MTS_EXPORT_RENDER Utility : public Object {
public: public:

View File

@ -25,7 +25,8 @@
MTS_NAMESPACE_BEGIN MTS_NAMESPACE_BEGIN
/** /**
* Generalized source of volumetric information * \brief Generalized source of volumetric information
* \ingroup librender
*/ */
class MTS_EXPORT_RENDER VolumeDataSource : public ConfigurableObject { class MTS_EXPORT_RENDER VolumeDataSource : public ConfigurableObject {
public: public:

View File

@ -31,6 +31,7 @@ enum EVPLType {
/** /**
* Support routines for rendering algorithms based on VPLs (virtual * Support routines for rendering algorithms based on VPLs (virtual
* point lights) * point lights)
* \ingroup librender
*/ */
struct VPL { struct VPL {
inline VPL(EVPLType type, const Spectrum &P) inline VPL(EVPLType type, const Spectrum &P)

View File

@ -20,7 +20,7 @@ FileResolver::FileResolver() {
} }
#elif defined(__OSX__) #elif defined(__OSX__)
MTS_AUTORELEASE_BEGIN() MTS_AUTORELEASE_BEGIN()
addPath(__ubi_bundlepath()); addPath(__mts_bundlepath());
MTS_AUTORELEASE_END() MTS_AUTORELEASE_END()
#elif defined(WIN32) #elif defined(WIN32)
char lpFilename[1024]; char lpFilename[1024];

View File

@ -33,7 +33,7 @@ Logger::Logger(ELogLevel level)
} }
Logger::~Logger() { Logger::~Logger() {
for (unsigned int i=0; i<m_appenders.size(); ++i) for (size_t i=0; i<m_appenders.size(); ++i)
m_appenders[i]->decRef(); m_appenders[i]->decRef();
} }
@ -99,7 +99,7 @@ void Logger::log(ELogLevel level, const Class *theClass,
m_mutex->lock(); m_mutex->lock();
if (level >= EWarn) if (level >= EWarn)
m_warningCount++; m_warningCount++;
for (unsigned int i=0; i<m_appenders.size(); ++i) for (size_t i=0; i<m_appenders.size(); ++i)
m_appenders[i]->append(level, text); m_appenders[i]->append(level, text);
m_mutex->unlock(); m_mutex->unlock();
} else { } else {
@ -141,7 +141,7 @@ void Logger::log(ELogLevel level, const Class *theClass,
void Logger::logProgress(Float progress, const std::string &name, void Logger::logProgress(Float progress, const std::string &name,
const std::string &formatted, const std::string &eta, const void *ptr) { const std::string &formatted, const std::string &eta, const void *ptr) {
m_mutex->lock(); m_mutex->lock();
for (unsigned int i=0; i<m_appenders.size(); ++i) for (size_t i=0; i<m_appenders.size(); ++i)
m_appenders[i]->logProgress( m_appenders[i]->logProgress(
progress, name, formatted, eta, ptr); progress, name, formatted, eta, ptr);
m_mutex->unlock(); m_mutex->unlock();
@ -162,6 +162,14 @@ void Logger::removeAppender(Appender *appender) {
appender->decRef(); appender->decRef();
} }
void Logger::clearAppenders() {
m_mutex->lock();
for (size_t i=0; i<m_appenders.size(); ++i)
m_appenders[i]->decRef();
m_appenders.clear();
m_mutex->unlock();
}
void Logger::staticInitialization() { void Logger::staticInitialization() {
Logger *logger = new Logger(EInfo); Logger *logger = new Logger(EInfo);
ref<Appender> appender = new StreamAppender(&std::cout); ref<Appender> appender = new StreamAppender(&std::cout);

View File

@ -260,7 +260,7 @@ std::string Thread::toString() const {
void Thread::staticInitialization() { void Thread::staticInitialization() {
#if defined(__OSX__) #if defined(__OSX__)
__ubi_autorelease_init(); __mts_autorelease_init();
#endif #endif
m_self = new ThreadLocal<Thread>(); m_self = new ThreadLocal<Thread>();
@ -298,7 +298,7 @@ void Thread::staticShutdown() {
m_idMutex = NULL; m_idMutex = NULL;
#endif #endif
#if defined(__OSX__) #if defined(__OSX__)
__ubi_autorelease_shutdown(); __mts_autorelease_shutdown();
#endif #endif
} }

View File

@ -159,25 +159,30 @@ void mts_log(ELogLevel level, const std::string &msg) {
bp::object extract_stack(traceback.attr("extract_stack")); bp::object extract_stack(traceback.attr("extract_stack"));
bp::object stack = extract_stack(); bp::object stack = extract_stack();
bp::object top(stack[bp::len(stack)-1]); bp::object top(stack[bp::len(stack)-1]);
std::string module = bp::extract<std::string>(top[2]);
Thread::getThread()->getLogger()->log(level, Thread::getThread()->getLogger()->log(level,
NULL, bp::extract<const char *>(top[0]), NULL, bp::extract<const char *>(top[0]),
bp::extract<int>(top[1]), "%s(): %s", bp::extract<int>(top[1]), "%s%s: %s",
(const char *) bp::extract<const char *>(top[2]), module.c_str(), module[0] == '<' ? "" : "()",
msg.c_str()); msg.c_str());
} }
class AppenderWrapper : public Appender, public bp::wrapper<Appender> { class AppenderWrapper : public Appender {
public: public:
AppenderWrapper(PyObject *self) : m_self(self) { } AppenderWrapper(PyObject *self) : m_self(self) { Py_INCREF(m_self); }
void append(ELogLevel level, const std::string &text) { void append(ELogLevel level, const std::string &text) {
get_override("append")(level, text); bp::call_method<void>(m_self, "append", level, text);
} }
void logProgress(Float progress, const std::string &name, void logProgress(Float progress, const std::string &name,
const std::string &formatted, const std::string &eta, const std::string &formatted, const std::string &eta,
const void *ptr) { const void *ptr) {
get_override("logProgress")(progress, name, formatted, eta); bp::call_method<void>(m_self, "logProgress", name, formatted, eta);
}
virtual ~AppenderWrapper() {
Py_DECREF(m_self);
} }
private: private:
PyObject *m_self; PyObject *m_self;
@ -221,7 +226,8 @@ void export_core() {
bp::class_<Object, ref<Object>, boost::noncopyable>("Object", bp::no_init) bp::class_<Object, ref<Object>, boost::noncopyable>("Object", bp::no_init)
.def("getRefCount", &Object::getRefCount) .def("getRefCount", &Object::getRefCount)
.def("__str__", &Object::toString); .def("__str__", &Object::toString);
bp::register_ptr_to_python<Object*>();
BP_CLASS(Stream, Object, bp::no_init) BP_CLASS(Stream, Object, bp::no_init)
.def("setByteOrder", &Stream::setByteOrder) .def("setByteOrder", &Stream::setByteOrder)
.def("getByteOrder", &Stream::getByteOrder) .def("getByteOrder", &Stream::getByteOrder)
@ -341,13 +347,14 @@ void export_core() {
.def("getErrorLevel", &Logger::getErrorLevel) .def("getErrorLevel", &Logger::getErrorLevel)
.def("addAppender", &Logger::addAppender) .def("addAppender", &Logger::addAppender)
.def("removeAppender", &Logger::removeAppender) .def("removeAppender", &Logger::removeAppender)
.def("clearAppenders", &Logger::clearAppenders)
.def("getAppenderCount", &Logger::getAppenderCount) .def("getAppenderCount", &Logger::getAppenderCount)
.def("getAppender", logger_get_appender, BP_RETURN_VALUE) .def("getAppender", logger_get_appender, BP_RETURN_VALUE)
.def("getWarningCount", &Logger::getWarningCount); .def("getWarningCount", &Logger::getWarningCount);
BP_CLASS(InstanceManager, Object, bp::init<>()) BP_CLASS(InstanceManager, Object, bp::init<>())
.def("serialize", &InstanceManager::serialize) .def("serialize", &InstanceManager::serialize)
.def("getInstance", &instance_manager_getinstance); .def("getInstance", &instance_manager_getinstance, BP_RETURN_VALUE);
bp::class_<ContinuousSpectrum, boost::noncopyable>("ContinuousSpectrum", bp::no_init) bp::class_<ContinuousSpectrum, boost::noncopyable>("ContinuousSpectrum", bp::no_init)
.def("eval", &ContinuousSpectrum::eval) .def("eval", &ContinuousSpectrum::eval)
@ -550,6 +557,27 @@ void export_core() {
BP_IMPLEMENT_POINT_OPS(Point3, Float, 3); BP_IMPLEMENT_POINT_OPS(Point3, Float, 3);
BP_IMPLEMENT_POINT_OPS(Point4, Float, 3); BP_IMPLEMENT_POINT_OPS(Point4, Float, 3);
Float (*dot2)(const Vector2 &, const Vector2 &) = &dot;
Float (*dot3)(const Vector3 &, const Vector3 &) = &dot;
Float (*dot4)(const Vector4 &, const Vector4 &) = &dot;
Float (*absDot2)(const Vector2 &, const Vector2 &) = &absDot;
Float (*absDot3)(const Vector3 &, const Vector3 &) = &absDot;
Float (*absDot4)(const Vector4 &, const Vector4 &) = &absDot;
Vector2 (*normalize2)(const Vector2 &) = &normalize;
Vector3 (*normalize3)(const Vector3 &) = &normalize;
Vector4 (*normalize4)(const Vector4 &) = &normalize;
Vector3 (*cross3)(const Vector3 &, const Vector3 &) = &cross;
bp::def("dot", dot2);
bp::def("dot", dot3);
bp::def("dot", dot4);
bp::def("absDot", absDot2);
bp::def("absDot", absDot3);
bp::def("absDot", absDot4);
bp::def("normalize", normalize2);
bp::def("normalize", normalize3);
bp::def("normalize", normalize4);
bp::def("cross", cross3);
bp::scope().attr("Vector") = bp::scope().attr("Vector3"); bp::scope().attr("Vector") = bp::scope().attr("Vector3");
bp::scope().attr("Point") = bp::scope().attr("Point3"); bp::scope().attr("Point") = bp::scope().attr("Point3");

View File

@ -34,6 +34,7 @@
#define BP_WRAPPED_CLASS(Name, Wrapper, Base, Init) \ #define BP_WRAPPED_CLASS(Name, Wrapper, Base, Init) \
bp::class_<Name, ref<Wrapper>, bp::bases<Base>, boost::noncopyable> Name ##_class(#Name, Init); \ bp::class_<Name, ref<Wrapper>, bp::bases<Base>, boost::noncopyable> Name ##_class(#Name, Init); \
bp::register_ptr_to_python<Name*>(); \ bp::register_ptr_to_python<Name*>(); \
bp::implicitly_convertible<ref<Wrapper>, ref<Name> >(); \
Name ##_class Name ##_class
#define BP_IMPLEMENT_VECTOR_OPS(Name, Scalar, Size) \ #define BP_IMPLEMENT_VECTOR_OPS(Name, Scalar, Size) \

View File

@ -167,7 +167,7 @@ int main(int argc, char *argv[]) {
/* Create a log file inside the application bundle */ /* Create a log file inside the application bundle */
MTS_AUTORELEASE_BEGIN() MTS_AUTORELEASE_BEGIN()
logger->addAppender(new StreamAppender(formatString("%s/mitsuba.%s.log", logger->addAppender(new StreamAppender(formatString("%s/mitsuba.%s.log",
__ubi_bundlepath().c_str(), getHostName().c_str()))); __mts_bundlepath().c_str(), getHostName().c_str())));
MTS_AUTORELEASE_END() MTS_AUTORELEASE_END()
#else #else
/* Create a log file inside the current working directory */ /* Create a log file inside the current working directory */