LightmapCamera Class Reference

To render lightmaps, a planar version of the mesh is "unwrapped" in uv space (existing uv coordinates are used for this) To quickly find triangle intersections, vertical lines are traced on each vertex position to create 'slabs', and each slab contains a list of ordered lines that cross it. More...

#include <eccamera.h>

Inheritance diagram for LightmapCamera:

EclipseObject

List of all members.

Public Member Functions

 LightmapCamera (Film *a_pFilm, Mesh *a_pMesh)
 Constructor.
virtual PYOBJECT PyAsString ()
 Python text representation method This function must be implemented by all children.

Static Public Member Functions

static bool PyTypeCheck (PYOBJECT a_pObject)
 Python type check Verifies that the provided python object encapsulates a camera object.

Protected Member Functions

virtual void DeleteObject ()
 Child message hook for reference-count based destruction.


Detailed Description

To render lightmaps, a planar version of the mesh is "unwrapped" in uv space (existing uv coordinates are used for this) To quickly find triangle intersections, vertical lines are traced on each vertex position to create 'slabs', and each slab contains a list of ordered lines that cross it.

Defines a special purpose camera for rendering lightmaps.

It is assumed that all mappings form a convex hull, and there is no uv overlapping.

To query this map, two binary search operations are needed: One to find the right slab, and another one to find the right edge (basically, a trapezoidal map) To deduct a position in 3D space from the planar uv space of the triangle, the barycentric components of the intersected triangle are used. To this end, each triangle pre-calculates its transposed barycentric matrix, so finding a 3D point is quick and efficient. For more information on this, read [1] and [2]

References:

[1] Berg, M. et.al. Computational Geometry. pg. 121 and following. [2] Mobius, August. F. Der Barycentrische Calcul. 1827.

Author:
Dan Torres 1/13/2009

Definition at line 59 of file eccamera.h.


Constructor & Destructor Documentation

LightmapCamera::LightmapCamera ( Film a_pFilm,
Mesh a_pMesh 
)

Constructor.

Parameters:
a_pFilm Film used for rendering with this camera
a_pMesh Mesh to render lightmaps for


Member Function Documentation

virtual void LightmapCamera::DeleteObject (  )  [protected, virtual]

Child message hook for reference-count based destruction.

The child class is responsible for deleting any instance to which this this function is called.

Reimplemented from EclipseObject.

virtual PYOBJECT LightmapCamera::PyAsString (  )  [virtual]

Python text representation method This function must be implemented by all children.

Returns:
A python string object with a description of ourselves

Reimplemented from EclipseObject.

static bool LightmapCamera::PyTypeCheck ( PYOBJECT  a_pObject  )  [static]

Python type check Verifies that the provided python object encapsulates a camera object.

Returns:
True if the provided object type is the same as ours

Reimplemented from EclipseObject.


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

Generated on Tue Jan 20 17:57:57 2009 for EclipseRay by  doxygen 1.5.7.1