merge
commit
ee7c65215a
|
@ -590,7 +590,7 @@ WARN_LOGFILE =
|
|||
# directories like "/usr/src/myproject". Separate the files or directories
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# then for each documented function all documented
|
||||
|
|
|
@ -197,6 +197,14 @@ $\text{\$}$ rpmbuild -bb mitsuba-$\code{\MitsubaVersion}$/data/linux/fedora/mits
|
|||
\end{shell}
|
||||
After this command finishes, its output can be found in the directory \code{rpmbuild/RPMS}.
|
||||
\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.
|
||||
|
||||
The Arch Way is to use the Aur software repository.
|
||||
|
|
|
@ -1,12 +1,30 @@
|
|||
\section{Development Guide}
|
||||
\part{Development guide}
|
||||
This chapter and the subsequent ones will provide an overview
|
||||
of the the coding conventions and general architecture of Mitsuba.
|
||||
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
|
||||
section is only relevant if you plan to submit patches, which should
|
||||
go into the main codebase.
|
||||
section is only relevant if you plan to submit patches that are meant
|
||||
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,
|
||||
which expand to \emph{four} spaces. Please make sure that you configure your editor
|
||||
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
|
||||
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.
|
||||
|
||||
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.
|
||||
The only way they can be deallocated is using the built-in reference
|
||||
counting. This is done using the \code{ref<>} template, e.g.
|
||||
|
|
|
@ -1,10 +1,19 @@
|
|||
/**
|
||||
\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
|
||||
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
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
\section{Introduction}
|
||||
\part{Using Mitsuba}
|
||||
\textbf{Disclaimer:} This is manual documents the usage, file format, and
|
||||
internal design of the Mitsuba rendering system. It is currently a work
|
||||
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
|
||||
(\url{www.pbrt.org}), from which it derives much inspiration.
|
||||
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
|
||||
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
|
||||
Public License (Version 3) as provided by the Free Software Foundation.
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@
|
|||
\include{format}
|
||||
\IfFileExists{plugins_generated.tex}{\include{plugins_generated}}{}
|
||||
%\include{import}
|
||||
%\include{development}
|
||||
\include{development}
|
||||
%\include{integrator}
|
||||
%\include{parallelization}
|
||||
\include{python}
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
\label{sec:python}
|
||||
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
|
||||
used for simple automation tasks. To access the API, start your Python
|
||||
interpreter and run
|
||||
used for simple automation purposes. To access the API, start your Python
|
||||
interpreter and enter
|
||||
\begin{python}
|
||||
import mitsuba
|
||||
\end{python}
|
||||
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.
|
||||
On Windows and non-packaged Linux builds, you must update the extension
|
||||
search path before the \code{import} command is issued:
|
||||
Menu}$\to$\emph{Command-line access}'' menu item from within Mitsuba.
|
||||
On Windows and non-packaged Linux builds, you may have to update the extension
|
||||
search path before issuing the \code{import} command:
|
||||
\begin{python}
|
||||
import sys
|
||||
|
||||
|
@ -20,4 +20,23 @@ sys.path.append('dist/python')
|
|||
|
||||
import mitsuba
|
||||
\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}
|
||||
|
||||
|
||||
|
|
|
@ -24,12 +24,15 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/**
|
||||
* Specialized sampler implementation used to seed MLT-style algorithm. Allows
|
||||
* to query for the current sample index, which can later be used to rewind
|
||||
* \brief Specialized sampler implementation used to seed MLT-style algorithm.
|
||||
*
|
||||
* 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
|
||||
* approximately proportional to their contribution without actually having
|
||||
* to store millions of path. Note that `rewinding' is naive -- it just
|
||||
* resets & regenerates the whole random number sequence, which might be slow.
|
||||
*
|
||||
* \ingroup libbidir
|
||||
*/
|
||||
class MTS_EXPORT_BIDIR ReplayableSampler : public Sampler {
|
||||
public:
|
||||
|
|
|
@ -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
|
||||
|
||||
/**
|
||||
* \brief This macro must be used in the declaration of
|
||||
* all classes derived from \ref Object.
|
||||
* \brief This macro must be used in the initial definition in
|
||||
* 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() \
|
||||
virtual const Class *getClass() const; \
|
||||
|
@ -137,6 +160,17 @@ public: \
|
|||
|
||||
/**
|
||||
* \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 abstract \c true if the class contains pure virtual methods
|
||||
* \param super Name of the parent class
|
||||
|
@ -148,8 +182,13 @@ public: \
|
|||
}
|
||||
|
||||
/**
|
||||
* \brief Creates basic RTTI support for a class. Assumes that
|
||||
* the class can be instantiated by name.
|
||||
* \brief Creates basic RTTI support for a class. To be used when the class
|
||||
* 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 abstract \c true if the class contains pure virtual methods
|
||||
* \param super Name of the parent class
|
||||
|
@ -164,8 +203,13 @@ public: \
|
|||
}
|
||||
|
||||
/**
|
||||
* \brief Creates basic RTTI support for a class. Assumes that
|
||||
* the class can be unserialized from a binary data stream.
|
||||
* \brief Creates basic RTTI support for a class. To be used when the class
|
||||
* 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 abstract \c true if the class contains pure virtual methods
|
||||
* \param super Name of the parent class
|
||||
|
@ -180,9 +224,14 @@ public: \
|
|||
}
|
||||
|
||||
/**
|
||||
* \brief Creates basic RTTI support for a class. Assumes that
|
||||
* the class can be unserialized from a binary data stream as well
|
||||
* as instantiated by name.
|
||||
* \brief Creates basic RTTI support for a class. To be used when the class
|
||||
* can be unserialized from a binary data stream as well as instantiated
|
||||
* 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 abstract \c true if the class contains pure virtual methods
|
||||
* \param super Name of the parent class
|
||||
|
|
|
@ -54,12 +54,13 @@ MTS_NAMESPACE_BEGIN
|
|||
/*! \addtogroup libcore */
|
||||
/*! @{ */
|
||||
|
||||
/// Assert that a condition is true (to be used \a inside of classes that derive from \ref Object)
|
||||
#define Assert(cond) do { \
|
||||
if (!(cond)) Log(EError, "Assertion \"%s\" failed in %s:%i", \
|
||||
#cond, __FILE__, __LINE__); \
|
||||
} 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 { \
|
||||
if (!(cond)) SLog(EError, "Assertion \"%s\" failed in %s:%i", \
|
||||
#cond, __FILE__, __LINE__); \
|
||||
|
@ -152,6 +153,9 @@ public:
|
|||
/// Remove an appender from this logger
|
||||
void removeAppender(Appender *appender);
|
||||
|
||||
/// Remove all appenders from this logger
|
||||
void clearAppenders();
|
||||
|
||||
/// Return the number of registered appenders
|
||||
inline size_t getAppenderCount() const { return m_appenders.size(); }
|
||||
|
||||
|
|
|
@ -140,15 +140,15 @@
|
|||
|
||||
MTS_NAMESPACE_BEGIN
|
||||
#if defined(__OSX__)
|
||||
extern void __ubi_autorelease_init();
|
||||
extern void __ubi_autorelease_shutdown();
|
||||
extern void __ubi_autorelease_begin();
|
||||
extern void __ubi_autorelease_end();
|
||||
extern std::string __ubi_bundlepath();
|
||||
extern void __ubi_chdir_to_bundlepath();
|
||||
extern void __ubi_init_cocoa();
|
||||
#define MTS_AUTORELEASE_BEGIN() __ubi_autorelease_begin();
|
||||
#define MTS_AUTORELEASE_END() __ubi_autorelease_end();
|
||||
extern void __mts_autorelease_init();
|
||||
extern void __mts_autorelease_shutdown();
|
||||
extern void __mts_autorelease_begin();
|
||||
extern void __mts_autorelease_end();
|
||||
extern std::string __mts_bundlepath();
|
||||
extern void __mts_chdir_to_bundlepath();
|
||||
extern void __mts_init_cocoa();
|
||||
#define MTS_AUTORELEASE_BEGIN() __mts_autorelease_begin();
|
||||
#define MTS_AUTORELEASE_END() __mts_autorelease_end();
|
||||
#define MTS_AMBIGUOUS_SIZE_T 1
|
||||
#else
|
||||
#define MTS_AUTORELEASE_BEGIN()
|
||||
|
|
|
@ -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, ...);
|
||||
|
||||
/**
|
||||
* 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 precise When set to true, a higher-precision string representation
|
||||
* is generated.
|
||||
|
@ -104,9 +104,10 @@ extern MTS_EXPORT_CORE std::string getHostName();
|
|||
extern MTS_EXPORT_CORE std::string getFQDN();
|
||||
|
||||
/**
|
||||
* Enable floating point exceptions (to catch NaNs, overflows,
|
||||
* arithmetic with infinity). On Intel processors, this applies
|
||||
* to both x87 and SSE2 math
|
||||
* \brief Enable floating point exceptions (to catch NaNs, overflows,
|
||||
* arithmetic with infinity).
|
||||
*
|
||||
* On Intel processors, this applies to both x87 and SSE2 math
|
||||
*
|
||||
* \return \c true if floating point exceptions were active
|
||||
* before calling the function
|
||||
|
@ -114,7 +115,7 @@ extern MTS_EXPORT_CORE std::string getFQDN();
|
|||
extern MTS_EXPORT_CORE bool enableFPExceptions();
|
||||
|
||||
/**
|
||||
* Disable floating point exceptions
|
||||
* \brief Disable floating point exceptions
|
||||
*
|
||||
* \return \c true if floating point exceptions were active
|
||||
* 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
|
||||
* "The Art of Computer Programming, Volume 3: Sorting and Searching"
|
||||
* (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);
|
||||
|
||||
/**
|
||||
* Calculate the radical inverse function
|
||||
* \brief Calculate the radical inverse function
|
||||
*
|
||||
* (Implementation based on "Instant Radiosity" by Alexander Keller
|
||||
* in Computer Graphics Proceedings, Annual Conference Series,
|
||||
* 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);
|
||||
|
||||
/**
|
||||
* Incrementally calculate the radical inverse function
|
||||
* \brief Incrementally calculate the radical inverse function
|
||||
*
|
||||
* (Implementation based on "Instant Radiosity" by Alexander Keller
|
||||
* in Computer Graphics Proceedings, Annual Conference Series,
|
||||
* 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
|
||||
*
|
||||
* \param cosThetaI
|
||||
|
@ -443,7 +448,7 @@ extern MTS_EXPORT_CORE Float fresnelDielectric(Float cosThetaI,
|
|||
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.
|
||||
*
|
||||
* \param cosThetaI
|
||||
|
@ -457,7 +462,7 @@ extern MTS_EXPORT_CORE Float fresnel(Float cosThetaI, Float extIOR,
|
|||
Float intIOR);
|
||||
|
||||
/**
|
||||
* Calculates the unpolarized fresnel reflection coefficient on
|
||||
* \brief Calculates the unpolarized fresnel reflection coefficient on
|
||||
* an interface to a conductor.
|
||||
*
|
||||
* \param cosThetaI
|
||||
|
|
|
@ -22,13 +22,13 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/**
|
||||
* Current release of Mitsuba
|
||||
* \brief Current release of Mitsuba
|
||||
* \ingroup libcore
|
||||
*/
|
||||
#define MTS_VERSION "0.3.0"
|
||||
|
||||
/**
|
||||
* Year of the current release
|
||||
* \brief Year of the current release
|
||||
* \ingroup libcore
|
||||
*/
|
||||
#define MTS_YEAR "2011"
|
||||
|
|
|
@ -34,6 +34,7 @@ MTS_NAMESPACE_BEGIN
|
|||
* \brief Constant spectrum-valued texture
|
||||
*
|
||||
* Includes a \ref Shader implementation for hardware rendering
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW ConstantSpectrumTexture : public Texture {
|
||||
public:
|
||||
|
@ -82,6 +83,7 @@ protected:
|
|||
* \brief Constant float-valued texture
|
||||
*
|
||||
* Includes a \ref Shader implementation for hardware rendering
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW ConstantFloatTexture : public Texture {
|
||||
public:
|
||||
|
@ -130,6 +132,7 @@ protected:
|
|||
* \brief Componentwise addition of two textures
|
||||
*
|
||||
* Includes a \ref Shader implementation for hardware rendering
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW SpectrumAdditionTexture : public Texture {
|
||||
public:
|
||||
|
@ -181,6 +184,7 @@ protected:
|
|||
* \brief Componentwise subtraction of two textures
|
||||
*
|
||||
* Includes a \ref Shader implementation for hardware rendering
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW SpectrumSubtractionTexture : public Texture {
|
||||
public:
|
||||
|
@ -232,6 +236,7 @@ protected:
|
|||
* \brief Componentwise product of two textures
|
||||
*
|
||||
* Includes a \ref Shader implementation for hardware rendering
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW SpectrumProductTexture : public Texture {
|
||||
public:
|
||||
|
|
|
@ -28,6 +28,7 @@ class Renderer;
|
|||
|
||||
/** \brief The device event structure encapsulates event
|
||||
* information such as mouse movement or key presses
|
||||
* \ingroup libhw
|
||||
*/
|
||||
struct MTS_EXPORT_HW DeviceEvent {
|
||||
public:
|
||||
|
@ -114,6 +115,7 @@ private:
|
|||
};
|
||||
|
||||
/** \brief Abstract device event callback
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW DeviceEventListener {
|
||||
public:
|
||||
|
@ -128,6 +130,7 @@ protected:
|
|||
};
|
||||
|
||||
/** \brief An abstract drawing device
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW Device : public Object {
|
||||
public:
|
||||
|
|
|
@ -28,6 +28,7 @@ MTS_NAMESPACE_BEGIN
|
|||
*
|
||||
* A FreeType2-based generation tool is located in the directory
|
||||
* 'tools/linux/fontgen'. Only Latin-1 is supported at the moment.
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW Font : public Object {
|
||||
public:
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/** \brief OpenGL-based GPUGeometry implementation
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW GLGeometry : public GPUGeometry {
|
||||
friend class GLRenderer;
|
||||
|
|
|
@ -26,6 +26,7 @@ MTS_NAMESPACE_BEGIN
|
|||
|
||||
/** \brief OpenGL shader class -- responsible from compiling
|
||||
* and linking GLSL fragments
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW GLProgram : public GPUProgram {
|
||||
public:
|
||||
|
|
|
@ -46,6 +46,7 @@ MTS_NAMESPACE_BEGIN
|
|||
|
||||
/**
|
||||
* \brief OpenGL implementation of the \ref Renderer interface
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW GLRenderer : public Renderer {
|
||||
public:
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/** \brief OpenGL-based GPUSync implementation
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW GLSync : public GPUSync {
|
||||
public:
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/** \brief OpenGL-based GPUTexture implementation
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW GLTexture : public GPUTexture {
|
||||
public:
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/** \brief X Windows OpenGL-capable (GLX) device
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW GLXDevice : public X11Device {
|
||||
public:
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/** \brief GLX (XFree86) renderer
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW GLXRenderer : public GLRenderer {
|
||||
public:
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/** \brief Abstract geometry storage on a graphics card
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW GPUGeometry : public Object {
|
||||
public:
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/** \brief Abstract shader program (for fragment/vertex shading)
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW GPUProgram : public Object {
|
||||
public:
|
||||
|
|
|
@ -25,6 +25,7 @@ MTS_NAMESPACE_BEGIN
|
|||
|
||||
/** \brief Abstract GPU synchronization object implementing
|
||||
* a memory fence operation.
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW GPUSync : public Object {
|
||||
public:
|
||||
|
|
|
@ -26,6 +26,7 @@ MTS_NAMESPACE_BEGIN
|
|||
|
||||
/** \brief A data structure for 1/2/3D and cube texture mapping. Also
|
||||
* has optional render-to-texture functionality.
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW GPUTexture : public Object {
|
||||
public:
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/** \brief A MacOS X (NSGL) OpenGL Renderer
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW NSGLRenderer : public GLRenderer {
|
||||
public:
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/** \brief A MacOS X (NSGL) windowing environment session
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW NSGLSession : public Session {
|
||||
public:
|
||||
|
|
|
@ -33,7 +33,8 @@ class Bitmap;
|
|||
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 {
|
||||
public:
|
||||
|
@ -71,6 +72,7 @@ protected:
|
|||
};
|
||||
|
||||
/** \brief Abstract renderer implementation
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW Renderer : public Object {
|
||||
public:
|
||||
|
|
|
@ -26,6 +26,7 @@ MTS_NAMESPACE_BEGIN
|
|||
class Device;
|
||||
|
||||
/** \brief Abstract windowing environment session
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW Session : public Object {
|
||||
friend class Device;
|
||||
|
|
|
@ -30,6 +30,8 @@ MTS_NAMESPACE_BEGIN
|
|||
*
|
||||
* This class makes it possible to rapidly prototype simple OpenGL
|
||||
* applications, which can be started using the 'mtsutil' launcher.
|
||||
*
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW Viewer : public Utility, public DeviceEventListener {
|
||||
public:
|
||||
|
|
|
@ -36,6 +36,8 @@ MTS_NAMESPACE_BEGIN
|
|||
* properties using uniforms, in which case already existing code
|
||||
* can be reused and we get something more like lower case n squared
|
||||
* (where lower n is the number of material types).
|
||||
*
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW VPLShaderManager : public Object {
|
||||
public:
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/** \brief Windows (WGL) device implementation
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW WGLDevice : public Device {
|
||||
public:
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/** \brief Windows (WGL) renderer implementation
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW WGLRenderer : public GLRenderer {
|
||||
public:
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/** \brief Windows (WGL) windowing environment session
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW WGLSession : public Session {
|
||||
friend class WGLDevice;
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/** \brief X Window System (X11R6) device / software surface
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW X11Device : public Device {
|
||||
friend class X11Session;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/** \brief X Window System (X11R6) session
|
||||
* \ingroup libhw
|
||||
*/
|
||||
class MTS_EXPORT_HW X11Session : public Session {
|
||||
friend class X11Device;
|
||||
|
|
|
@ -33,6 +33,7 @@ MTS_NAMESPACE_BEGIN
|
|||
*
|
||||
* \sa BSDF::f()
|
||||
* \sa BSDF::sample()
|
||||
* \ingroup librender
|
||||
*/
|
||||
struct MTS_EXPORT_RENDER BSDFQueryRecord {
|
||||
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.
|
||||
* 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
|
||||
* pick and choose individual components of multi-lobed BSDFs based on their
|
||||
* properties and component indices. This selection is done using a
|
||||
*
|
||||
* \ref BSDFQueryRecord.
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER BSDF : public ConfigurableObject, public HWResource {
|
||||
public:
|
||||
|
|
|
@ -26,6 +26,8 @@ MTS_NAMESPACE_BEGIN
|
|||
/** \brief Abstract camera base class. A camera turns a sample on
|
||||
* the image plane into a 3D ray. It uses two supporting child
|
||||
* objects: a \re Sampler and a \ref Film instance.
|
||||
*
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER Camera : public ConfigurableObject {
|
||||
public:
|
||||
|
@ -201,7 +203,13 @@ protected:
|
|||
Float m_shutterOpen, m_shutterClose, m_shutterOpenTime;
|
||||
ref<Medium> m_medium;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Projective camera base class
|
||||
*
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER ProjectiveCamera : public Camera {
|
||||
public:
|
||||
/// Return the projection transformation
|
||||
|
@ -237,8 +245,12 @@ protected:
|
|||
};
|
||||
|
||||
/**
|
||||
* Base class of all pinhole cameras. Provides solid angle computation
|
||||
* routines useful for importance-based integrators.
|
||||
* \brief Base class of all perspective cameras
|
||||
*
|
||||
* Provides solid angle computation routines useful
|
||||
* for importance-based integrators.
|
||||
*
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER PerspectiveCamera : public ProjectiveCamera {
|
||||
public:
|
||||
|
|
|
@ -26,6 +26,7 @@ MTS_NAMESPACE_BEGIN
|
|||
/**
|
||||
* \brief Specifies the transported quantity when
|
||||
* sampling or evaluating a scattering function
|
||||
* \ingroup librender
|
||||
*/
|
||||
enum ETransportQuantity {
|
||||
ERadiance = 1,
|
||||
|
@ -34,6 +35,7 @@ enum ETransportQuantity {
|
|||
/**
|
||||
* \brief Specifies the measure associated with
|
||||
* a scattering function
|
||||
* \ingroup librender
|
||||
*/
|
||||
enum EMeasure {
|
||||
ESolidAngle = 1,
|
||||
|
|
|
@ -29,6 +29,7 @@ MTS_NAMESPACE_BEGIN
|
|||
|
||||
/** \brief Abstract Film base class - used to store samples
|
||||
* generated by the Integrator.
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER Film : public ConfigurableObject {
|
||||
public:
|
||||
|
|
|
@ -25,9 +25,11 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/**
|
||||
* Process for parallel photon map construction. Given a number and
|
||||
* type (surface/caustic/volume) of photons, it distributes the work
|
||||
* over an arbitrary number of machines.
|
||||
* \brief Process for parallel photon map construction
|
||||
*
|
||||
* 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 {
|
||||
public:
|
||||
|
|
|
@ -681,6 +681,7 @@ MTS_NAMESPACE_BEGIN
|
|||
* in parallel.
|
||||
*
|
||||
* \author Wenzel Jakob
|
||||
* \ingroup librender
|
||||
*/
|
||||
template <typename AABBType, typename TreeConstructionHeuristic, typename Derived>
|
||||
class GenericKDTree : public KDTreeBase<AABBType> {
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
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
|
||||
* the resulting information in a rectangular region of an image. Such
|
||||
* 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
|
||||
* filters, while at the same time placing significantly different amounts
|
||||
* of samples into nearby pixels.
|
||||
*
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER ImageBlock : public WorkResult {
|
||||
public:
|
||||
|
|
|
@ -28,6 +28,8 @@ MTS_NAMESPACE_BEGIN
|
|||
* the subclass) on the pixels of an image where work on adjacent pixels
|
||||
* is independent. For preview purposes, a spiraling pattern of square
|
||||
* pixel blocks is generated.
|
||||
*
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER BlockedImageProcess : public ParallelProcess {
|
||||
public:
|
||||
|
|
|
@ -33,6 +33,8 @@ MTS_NAMESPACE_BEGIN
|
|||
* rasterization that directly operates on the camera's film and has
|
||||
* no global knowledge about radiance within the scene. Other possibilities
|
||||
* are sampling- or particle tracing-based integrators.
|
||||
*
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER Integrator : public NetworkedObject {
|
||||
public:
|
||||
|
@ -109,6 +111,7 @@ protected:
|
|||
|
||||
/**
|
||||
* \brief Radiance query record data structure used by \ref SampleIntegrator
|
||||
* \ingroup librender
|
||||
*/
|
||||
struct MTS_EXPORT_RENDER RadianceQueryRecord {
|
||||
public:
|
||||
|
@ -278,6 +281,7 @@ public:
|
|||
|
||||
/** \brief Abstract base class, which describes integrators
|
||||
* capable of computing samples of the scene's radiance function.
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER SampleIntegrator : public Integrator {
|
||||
public:
|
||||
|
@ -402,6 +406,7 @@ protected:
|
|||
* \brief Base class of all recursive Monte Carlo integrators, which compute
|
||||
* unbiased solutions to the rendering equation (and optionally
|
||||
* the radiative transfer equation).
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER MonteCarloIntegrator : public SampleIntegrator {
|
||||
public:
|
||||
|
|
|
@ -38,6 +38,7 @@ typedef Spectrum TranslationalGradient[3];
|
|||
* (Proceedings of SCCG 2005)
|
||||
*
|
||||
* \author Wenzel Jakob
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER HemisphereSampler : public Object {
|
||||
public:
|
||||
|
@ -140,6 +141,7 @@ private:
|
|||
* by E. Tabellion and A. Lamorlette (SIGGRAPH 2004)
|
||||
*
|
||||
* \author Wenzel Jakob
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER IrradianceCache : public SerializableObject {
|
||||
public:
|
||||
|
|
|
@ -27,6 +27,7 @@ MTS_NAMESPACE_BEGIN
|
|||
/**
|
||||
* \brief Data structure used by the direct illumination / shadow ray
|
||||
* sampling methods in the class \ref Luminaire.
|
||||
* \ingroup librender
|
||||
*/
|
||||
struct MTS_EXPORT_RENDER LuminaireSamplingRecord {
|
||||
public:
|
||||
|
@ -66,6 +67,7 @@ public:
|
|||
/**
|
||||
* \brief Data structure used to record information associated with
|
||||
* emission sampling in the class \ref Luminaire.
|
||||
* \ingroup librender
|
||||
*/
|
||||
struct MTS_EXPORT_RENDER EmissionRecord {
|
||||
public:
|
||||
|
@ -119,6 +121,7 @@ public:
|
|||
/**
|
||||
* \brief Abstract implementation of a luminaire. Supports emission and
|
||||
* direct illumination sampling strategies, and computes related probabilities.
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER Luminaire : public ConfigurableObject, public HWResource {
|
||||
public:
|
||||
|
|
|
@ -28,6 +28,7 @@ MTS_NAMESPACE_BEGIN
|
|||
* integral of the RTE
|
||||
*
|
||||
* \sa Medium::sampleDistance()
|
||||
* \ingroup librender
|
||||
*/
|
||||
struct MTS_EXPORT_RENDER MediumSamplingRecord {
|
||||
public:
|
||||
|
@ -89,6 +90,7 @@ public:
|
|||
};
|
||||
|
||||
/** \brief Abstract participating medium
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER Medium : public NetworkedObject {
|
||||
public:
|
||||
|
|
|
@ -26,6 +26,7 @@ MTS_NAMESPACE_BEGIN
|
|||
#define MIPMAP_LUTSIZE 128
|
||||
|
||||
/** \brief Isotropic/anisotropic EWA mip-map texture map class based on PBRT
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER MIPMap : public Object {
|
||||
public:
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
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 {
|
||||
public:
|
||||
|
|
|
@ -27,6 +27,7 @@ MTS_NAMESPACE_BEGIN
|
|||
* \brief Contains a few useful noise functions
|
||||
*
|
||||
* The implementations in this class are based on PBRT
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER Noise {
|
||||
public:
|
||||
|
|
|
@ -38,6 +38,8 @@ MTS_NAMESPACE_BEGIN
|
|||
* of \ref ParticleTracer with overridden functions
|
||||
* \ref ParticleTracer::handleSurfaceInteraction and
|
||||
* \ref ParticleTracer::handleMediumInteraction.
|
||||
*
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER ParticleProcess : public ParallelProcess {
|
||||
public:
|
||||
|
@ -119,6 +121,8 @@ protected:
|
|||
*
|
||||
* Traces particles and performs a customizable action every time a
|
||||
* surface or volume interaction occurs.
|
||||
*
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER ParticleTracer : public WorkProcessor {
|
||||
public:
|
||||
|
|
|
@ -27,6 +27,8 @@ MTS_NAMESPACE_BEGIN
|
|||
/**
|
||||
* \brief Data structure, which contains information
|
||||
* required to sample or query a phase function.
|
||||
*
|
||||
* \ingroup librender
|
||||
*/
|
||||
struct MTS_EXPORT_RENDER PhaseFunctionQueryRecord {
|
||||
/**
|
||||
|
@ -97,6 +99,7 @@ struct MTS_EXPORT_RENDER PhaseFunctionQueryRecord {
|
|||
};
|
||||
|
||||
/** \brief Abstract phase function.
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER PhaseFunction : public ConfigurableObject {
|
||||
public:
|
||||
|
|
|
@ -28,6 +28,8 @@ MTS_NAMESPACE_BEGIN
|
|||
*
|
||||
* Requires 24 bytes when Mitsuba is compiled with single precision
|
||||
* and RGB-based color spectra.
|
||||
*
|
||||
* \ingroup librender
|
||||
*/
|
||||
struct MTS_EXPORT_RENDER Photon {
|
||||
friend class PhotonMap;
|
||||
|
|
|
@ -39,6 +39,7 @@ MTS_NAMESPACE_BEGIN
|
|||
* estimate. The bug has been fixed in this re-implementation.
|
||||
*
|
||||
* \author Wenzel Jakob
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER PhotonMap : public SerializableObject {
|
||||
public:
|
||||
|
|
|
@ -27,6 +27,7 @@ MTS_NAMESPACE_BEGIN
|
|||
* Preview worker - can be used to render a quick preview of a scene
|
||||
* (illuminated by a VPL). The implementation uses coherent ray tracing
|
||||
* when compiled in single precision and SSE is available.
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER PreviewWorker : public WorkProcessor {
|
||||
public:
|
||||
|
|
|
@ -28,6 +28,8 @@ MTS_NAMESPACE_BEGIN
|
|||
*
|
||||
* An example usage is in \ref ParticleProcess, where this class specifies
|
||||
* sequences of particles to be traced.
|
||||
*
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER RangeWorkUnit : public WorkUnit {
|
||||
public:
|
||||
|
|
|
@ -27,6 +27,7 @@ MTS_NAMESPACE_BEGIN
|
|||
* \brief Work unit that specifies a rectangular region in an image.
|
||||
*
|
||||
* Used for instance in \ref BlockedImageProcess
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER RectangularWorkUnit : public WorkUnit {
|
||||
public:
|
||||
|
|
|
@ -29,6 +29,7 @@ MTS_NAMESPACE_BEGIN
|
|||
* Render job - coordinates the process of rendering a single
|
||||
* image. Implemented as a thread so that multiple jobs can
|
||||
* be executed concurrently.
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER RenderJob : public Thread {
|
||||
public:
|
||||
|
|
|
@ -32,6 +32,7 @@ MTS_NAMESPACE_BEGIN
|
|||
* then rendered in parallel.
|
||||
*
|
||||
* \sa SampleIntegrator
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER BlockedRenderProcess : public BlockedImageProcess {
|
||||
public:
|
||||
|
|
|
@ -27,6 +27,7 @@ MTS_NAMESPACE_BEGIN
|
|||
/**
|
||||
* \brief Abstract render listener - can be used to react to
|
||||
* progress messages (e.g. in a GUI)
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER RenderListener : public Object {
|
||||
public:
|
||||
|
@ -55,6 +56,7 @@ protected:
|
|||
* Render queue - used to keep track of a number of scenes
|
||||
* that are simultaneously being rendered. Also distributes
|
||||
* events regarding these scenes to registered listeners.
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER RenderQueue : public Object {
|
||||
public:
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/**
|
||||
* Abstract image reconstruction filter
|
||||
* \brief Abstract image reconstruction filter
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER ReconstructionFilter : public ConfigurableObject {
|
||||
public:
|
||||
|
@ -58,11 +59,16 @@ protected:
|
|||
Properties m_properties;
|
||||
};
|
||||
|
||||
/**
|
||||
* Tabulates expensive-to-evaluate filters so that they become
|
||||
* simple array lookups. Only works for symmetric filters!
|
||||
*/
|
||||
/// Filter resolution for \ref TabulatedFilter
|
||||
#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 {
|
||||
public:
|
||||
/// Tabulate a reconstruction filter
|
||||
|
|
|
@ -31,6 +31,7 @@ MTS_NAMESPACE_BEGIN
|
|||
/**
|
||||
* \brief Implements the surface area heuristic for use
|
||||
* by the \ref GenericKDTree construction algorithm.
|
||||
* \ingroup librender
|
||||
*/
|
||||
class SurfaceAreaHeuristic {
|
||||
public:
|
||||
|
@ -94,6 +95,7 @@ private:
|
|||
* Havran's PhD thesis "Heuristic Ray Shooting Algorithms".
|
||||
*
|
||||
* \author Wenzel Jakob
|
||||
* \ingroup librender
|
||||
*/
|
||||
template <typename Derived>
|
||||
class SAHKDTree3D : public GenericKDTree<AABB, SurfaceAreaHeuristic, Derived> {
|
||||
|
|
|
@ -58,6 +58,8 @@ MTS_NAMESPACE_BEGIN
|
|||
* stratify over all of the rays that are ultimately generated, and the
|
||||
* \ref next1DArray() and \ref next2DArray() methods allow to do this.
|
||||
* See the file \c direct.cpp for an example.
|
||||
*
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER Sampler : public ConfigurableObject {
|
||||
public:
|
||||
|
|
|
@ -42,6 +42,7 @@ MTS_NAMESPACE_BEGIN
|
|||
* Holds information on surfaces, luminaires and participating media and
|
||||
* coordinates rendering jobs. This class also provides useful query routines
|
||||
* that are mostly used by the \ref Integrator implementations.
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER Scene : public NetworkedObject {
|
||||
public:
|
||||
|
|
|
@ -34,7 +34,10 @@ XERCES_CPP_NAMESPACE_END
|
|||
XERCES_CPP_NAMESPACE_USE
|
||||
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 {
|
||||
public:
|
||||
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
|
||||
* SAX interface Xerces-C++.
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER SceneHandler : public HandlerBase {
|
||||
public:
|
||||
|
|
|
@ -47,6 +47,8 @@ public:
|
|||
*
|
||||
* Subclasses can implement one of various things, such as a BSDF,
|
||||
* a light source, or a texture.
|
||||
*
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER Shader : public Object {
|
||||
public:
|
||||
|
|
|
@ -28,6 +28,7 @@ MTS_NAMESPACE_BEGIN
|
|||
|
||||
/** \brief Data record, which holds sampling-related information
|
||||
* for a shape.
|
||||
* \ingroup librender
|
||||
*/
|
||||
struct MTS_EXPORT_RENDER ShapeSamplingRecord {
|
||||
public:
|
||||
|
@ -53,6 +54,7 @@ public:
|
|||
|
||||
/** \brief Container for all information related to
|
||||
* a surface intersection
|
||||
* \ingroup librender
|
||||
*/
|
||||
struct MTS_EXPORT_RENDER Intersection {
|
||||
public:
|
||||
|
@ -173,6 +175,7 @@ public:
|
|||
};
|
||||
|
||||
/** \brief Abstract base class of all shapes
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER Shape : public ConfigurableObject {
|
||||
public:
|
||||
|
|
|
@ -62,6 +62,7 @@ typedef const Shape * ConstShapePtr;
|
|||
* tends to be quite a bit slower.
|
||||
*
|
||||
* \sa GenericKDTree
|
||||
* \ingroup librender
|
||||
*/
|
||||
|
||||
class MTS_EXPORT_RENDER ShapeKDTree : public SAHKDTree3D<ShapeKDTree> {
|
||||
|
|
|
@ -26,7 +26,10 @@
|
|||
|
||||
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 {
|
||||
public:
|
||||
/// Called whenever an image block is acquired
|
||||
|
@ -52,7 +55,8 @@ protected:
|
|||
* Aug 25, 2005
|
||||
* RayTracer.java
|
||||
* Copyright 2005 Program of Computer Graphics, Cornell University
|
||||
*/
|
||||
* \ingroup librender
|
||||
*/
|
||||
|
||||
class MTS_EXPORT_RENDER Spiral : public Object {
|
||||
public:
|
||||
|
|
|
@ -31,6 +31,8 @@ MTS_NAMESPACE_BEGIN
|
|||
* completely up to the implementation. It might for instance
|
||||
* recursively trace rays or perform lookups into a precomputed
|
||||
* point cloud radiance representation.
|
||||
*
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER Subsurface : public NetworkedObject {
|
||||
public:
|
||||
|
|
|
@ -40,6 +40,7 @@ MTS_NAMESPACE_BEGIN
|
|||
* declared using the MTS_DECLARE_TEST() macro are executed. Finally,
|
||||
* the shutdown() method is called. See the files in 'mitsuba/src/tests'
|
||||
* for examples.
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER TestCase : public Utility {
|
||||
public:
|
||||
|
@ -123,6 +124,7 @@ protected:
|
|||
* 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,
|
||||
* which can later be printed using <tt>printSummary()</tt>.
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER TestSupervisor : public Object {
|
||||
public:
|
||||
|
|
|
@ -28,6 +28,7 @@ MTS_NAMESPACE_BEGIN
|
|||
/**
|
||||
* \brief Base class of all textures. Computes values for an arbitrary surface
|
||||
* point. \ref Texture2D is a specialization to UV-based textures.
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER Texture : public ConfigurableObject, public HWResource {
|
||||
public:
|
||||
|
@ -63,6 +64,10 @@ protected:
|
|||
virtual ~Texture();
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Base class of all 2D textures
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER Texture2D : public Texture {
|
||||
public:
|
||||
/// Return the texture value at \a its
|
||||
|
|
|
@ -25,7 +25,10 @@ MTS_NAMESPACE_BEGIN
|
|||
|
||||
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 {
|
||||
template<typename T> friend class AnimationTrack;
|
||||
public:
|
||||
|
@ -63,7 +66,10 @@ protected:
|
|||
std::vector<Float> m_times;
|
||||
};
|
||||
|
||||
/// Parameterizable animation track
|
||||
/**
|
||||
* \brief Parameterizable animation track
|
||||
* \ingroup librender
|
||||
*/
|
||||
template <typename T> class AnimationTrack : public AbstractAnimationTrack {
|
||||
public:
|
||||
typedef T value_type;
|
||||
|
@ -155,7 +161,10 @@ template<> void AnimationTrack<Quaternion>::serialize(Stream *stream, const Quat
|
|||
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 {
|
||||
public:
|
||||
/// Create a new animated transform
|
||||
|
|
|
@ -30,6 +30,7 @@ static const uint32_t KNoTriangleFlag = 0xFFFFFFFF;
|
|||
* Pre-computed triangle representation using Ingo Wald's TriAccel layout.
|
||||
* 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.
|
||||
* \ingroup librender
|
||||
*/
|
||||
struct TriAccel {
|
||||
uint32_t k;
|
||||
|
|
|
@ -28,6 +28,10 @@ namespace fs = boost::filesystem;
|
|||
|
||||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/**
|
||||
* \brief Simple tangent space storage for surfaces
|
||||
* \ingroup librender
|
||||
*/
|
||||
struct TangentSpace {
|
||||
/// Position partials wrt. the UV parameterization
|
||||
Vector dpdu;
|
||||
|
@ -45,6 +49,7 @@ struct TangentSpace {
|
|||
};
|
||||
|
||||
/** \brief Abstract triangle mesh base class
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER TriMesh : public Shape {
|
||||
public:
|
||||
|
|
|
@ -26,6 +26,7 @@ MTS_NAMESPACE_BEGIN
|
|||
/** \brief Abstract utility class -- can be used to implement
|
||||
* loadable utility plugins that perform various actions. They
|
||||
* can be started using the 'mtsutil' launcher.
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER Utility : public Object {
|
||||
public:
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
MTS_NAMESPACE_BEGIN
|
||||
|
||||
/**
|
||||
* Generalized source of volumetric information
|
||||
* \brief Generalized source of volumetric information
|
||||
* \ingroup librender
|
||||
*/
|
||||
class MTS_EXPORT_RENDER VolumeDataSource : public ConfigurableObject {
|
||||
public:
|
||||
|
|
|
@ -31,6 +31,7 @@ enum EVPLType {
|
|||
/**
|
||||
* Support routines for rendering algorithms based on VPLs (virtual
|
||||
* point lights)
|
||||
* \ingroup librender
|
||||
*/
|
||||
struct VPL {
|
||||
inline VPL(EVPLType type, const Spectrum &P)
|
||||
|
|
|
@ -20,7 +20,7 @@ FileResolver::FileResolver() {
|
|||
}
|
||||
#elif defined(__OSX__)
|
||||
MTS_AUTORELEASE_BEGIN()
|
||||
addPath(__ubi_bundlepath());
|
||||
addPath(__mts_bundlepath());
|
||||
MTS_AUTORELEASE_END()
|
||||
#elif defined(WIN32)
|
||||
char lpFilename[1024];
|
||||
|
|
|
@ -33,7 +33,7 @@ Logger::Logger(ELogLevel level)
|
|||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ void Logger::log(ELogLevel level, const Class *theClass,
|
|||
m_mutex->lock();
|
||||
if (level >= EWarn)
|
||||
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_mutex->unlock();
|
||||
} else {
|
||||
|
@ -141,7 +141,7 @@ void Logger::log(ELogLevel level, const Class *theClass,
|
|||
void Logger::logProgress(Float progress, const std::string &name,
|
||||
const std::string &formatted, const std::string &eta, const void *ptr) {
|
||||
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(
|
||||
progress, name, formatted, eta, ptr);
|
||||
m_mutex->unlock();
|
||||
|
@ -162,6 +162,14 @@ void Logger::removeAppender(Appender *appender) {
|
|||
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() {
|
||||
Logger *logger = new Logger(EInfo);
|
||||
ref<Appender> appender = new StreamAppender(&std::cout);
|
||||
|
|
|
@ -260,7 +260,7 @@ std::string Thread::toString() const {
|
|||
|
||||
void Thread::staticInitialization() {
|
||||
#if defined(__OSX__)
|
||||
__ubi_autorelease_init();
|
||||
__mts_autorelease_init();
|
||||
#endif
|
||||
|
||||
m_self = new ThreadLocal<Thread>();
|
||||
|
@ -298,7 +298,7 @@ void Thread::staticShutdown() {
|
|||
m_idMutex = NULL;
|
||||
#endif
|
||||
#if defined(__OSX__)
|
||||
__ubi_autorelease_shutdown();
|
||||
__mts_autorelease_shutdown();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -159,25 +159,30 @@ void mts_log(ELogLevel level, const std::string &msg) {
|
|||
bp::object extract_stack(traceback.attr("extract_stack"));
|
||||
bp::object stack = extract_stack();
|
||||
bp::object top(stack[bp::len(stack)-1]);
|
||||
std::string module = bp::extract<std::string>(top[2]);
|
||||
Thread::getThread()->getLogger()->log(level,
|
||||
NULL, bp::extract<const char *>(top[0]),
|
||||
bp::extract<int>(top[1]), "%s(): %s",
|
||||
(const char *) bp::extract<const char *>(top[2]),
|
||||
bp::extract<int>(top[1]), "%s%s: %s",
|
||||
module.c_str(), module[0] == '<' ? "" : "()",
|
||||
msg.c_str());
|
||||
}
|
||||
|
||||
class AppenderWrapper : public Appender, public bp::wrapper<Appender> {
|
||||
class AppenderWrapper : public Appender {
|
||||
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) {
|
||||
get_override("append")(level, text);
|
||||
bp::call_method<void>(m_self, "append", level, text);
|
||||
}
|
||||
|
||||
void logProgress(Float progress, const std::string &name,
|
||||
const std::string &formatted, const std::string &eta,
|
||||
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:
|
||||
PyObject *m_self;
|
||||
|
@ -221,7 +226,8 @@ void export_core() {
|
|||
bp::class_<Object, ref<Object>, boost::noncopyable>("Object", bp::no_init)
|
||||
.def("getRefCount", &Object::getRefCount)
|
||||
.def("__str__", &Object::toString);
|
||||
|
||||
bp::register_ptr_to_python<Object*>();
|
||||
|
||||
BP_CLASS(Stream, Object, bp::no_init)
|
||||
.def("setByteOrder", &Stream::setByteOrder)
|
||||
.def("getByteOrder", &Stream::getByteOrder)
|
||||
|
@ -341,13 +347,14 @@ void export_core() {
|
|||
.def("getErrorLevel", &Logger::getErrorLevel)
|
||||
.def("addAppender", &Logger::addAppender)
|
||||
.def("removeAppender", &Logger::removeAppender)
|
||||
.def("clearAppenders", &Logger::clearAppenders)
|
||||
.def("getAppenderCount", &Logger::getAppenderCount)
|
||||
.def("getAppender", logger_get_appender, BP_RETURN_VALUE)
|
||||
.def("getWarningCount", &Logger::getWarningCount);
|
||||
|
||||
BP_CLASS(InstanceManager, Object, bp::init<>())
|
||||
.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)
|
||||
.def("eval", &ContinuousSpectrum::eval)
|
||||
|
@ -550,6 +557,27 @@ void export_core() {
|
|||
BP_IMPLEMENT_POINT_OPS(Point3, Float, 3);
|
||||
BP_IMPLEMENT_POINT_OPS(Point4, Float, 3);
|
||||
|
||||
Float (*dot2)(const Vector2 &, const Vector2 &) = ˙
|
||||
Float (*dot3)(const Vector3 &, const Vector3 &) = ˙
|
||||
Float (*dot4)(const Vector4 &, const Vector4 &) = ˙
|
||||
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 &) = ✗
|
||||
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("Point") = bp::scope().attr("Point3");
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#define BP_WRAPPED_CLASS(Name, Wrapper, Base, Init) \
|
||||
bp::class_<Name, ref<Wrapper>, bp::bases<Base>, boost::noncopyable> Name ##_class(#Name, Init); \
|
||||
bp::register_ptr_to_python<Name*>(); \
|
||||
bp::implicitly_convertible<ref<Wrapper>, ref<Name> >(); \
|
||||
Name ##_class
|
||||
|
||||
#define BP_IMPLEMENT_VECTOR_OPS(Name, Scalar, Size) \
|
||||
|
|
|
@ -167,7 +167,7 @@ int main(int argc, char *argv[]) {
|
|||
/* Create a log file inside the application bundle */
|
||||
MTS_AUTORELEASE_BEGIN()
|
||||
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()
|
||||
#else
|
||||
/* Create a log file inside the current working directory */
|
||||
|
|
Loading…
Reference in New Issue