Commit 0fe90e21 authored by Patrik Huber's avatar Patrik Huber

Updated and added a few doxygen comments

parent 6d4caf9a
......@@ -165,7 +165,7 @@ cv::Mat estimate_affine_camera(std::vector<cv::Vec2f> image_points, std::vector<
*
* Note: Assumes the affine camera matrix only projects from world
* to clip space, because a subsequent window transform is applied.
* #Todo: This is outdated, now that we estimate the matrix from world
* Todo: This is outdated, now that we estimate the matrix from world
* to screen space directly.
*
* @param[in] vertex A vertex in 3D space. vertex[3] = 1.0f.
......
......@@ -50,6 +50,8 @@ std::tuple<std::vector<cv::Vec2f>, std::vector<cv::Vec4f>, std::vector<int>> get
/**
* @brief Definition of the vertex indices that define the right and left model contour.
*
* This class holds definitions for the contour (outline) on the right and left
* side of the reference 3D face model. These can be found in the file
* share/model_contours.json. The Surrey model's boundaries are conveniently
......@@ -99,7 +101,7 @@ struct ModelContour
/**
* Serialises this class using cereal.
*
* @param[in] ar The archive to serialise to (or to serialise from).
* @param[in] archive The archive to serialise to (or to serialise from).
*/
template<class Archive>
void serialize(Archive& archive)
......@@ -109,6 +111,8 @@ struct ModelContour
};
/**
* @brief Defines which 2D landmarks comprise the right and left face contour.
*
* This class holds 2D image contour landmark information. More specifically,
* it defines which 2D landmark IDs correspond to the right contour and which
* to the left. These definitions are loaded from a file, for example from
......
......@@ -58,7 +58,7 @@ struct Frustum
/**
* Serialises this class using cereal.
*
* @param[in] ar The archive to serialise to (or to serialise from).
* @param[in] archive The archive to serialise to (or to serialise from).
*/
template<class Archive>
void serialize(Archive& archive)
......@@ -67,6 +67,11 @@ struct Frustum
};
};
/**
* @brief Type of a camera (projection).
*
* Currently either orthographic or perspective. Used in RenderingParameters.
*/
enum class CameraType
{
Orthographic,
......@@ -89,6 +94,10 @@ enum class CameraType
*
* The rotation values are given in radians and estimated using the RPY convention.
* Yaw is applied first to the model, then pitch, then roll (R * P * Y * vertex).
*
* Todo: This class may need a major overhaul so it supports all our fitting algorithms,
* some of them which use quaternions, others estimate the angles, as well as work with
* both orthographic and perspective projection.
*/
struct RenderingParameters
{
......@@ -110,7 +119,7 @@ struct RenderingParameters
/**
* Serialises this class using cereal.
*
* @param[in] ar The archive to serialise to (or to serialise from).
* @param[in] archive The archive to serialise to (or to serialise from).
*/
template<class Archive>
void serialize(Archive& archive)
......
......@@ -50,7 +50,7 @@ struct Blendshape
/**
* Serialises this class using cereal.
*
* @param[in] ar The archive to serialise to (or to serialise from).
* @param[in] archive The archive to serialise to (or to serialise from).
*/
template<class Archive>
void serialize(Archive& archive)
......
......@@ -55,7 +55,7 @@ namespace detail { cv::Mat interpolate_black_line(cv::Mat isomap); }
* Extracts the texture of the face from the given image
* and stores it as isomap (a rectangular texture map).
*
* Note/#Todo: Only use TextureInterpolation::NearestNeighbour
* Note/Todo: Only use TextureInterpolation::NearestNeighbour
* for the moment, the other methods don't have correct handling of
* the alpha channel (and will most likely throw an exception).
*
......
......@@ -147,11 +147,15 @@ inline bool is_power_of_two(int x)
return !(x & (x - 1));
};
/**
* @brief Represents a texture for rendering.
*
* Represents a texture and mipmap levels for use in the renderer.
* Todo: This whole class needs a major overhaul and documentation.
*/
class Texture
{
public:
// Todo: This whole class needs a major overhaul and documentation.
std::vector<cv::Mat> mipmaps; // make Texture a friend class of renderer, then move this to private?
unsigned char widthLog, heightLog; // log2 of width and height of the base mip-level
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment