Cleanup: fix typos in source code in intern/
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D13532
This commit is contained in:
parent
29ab711efa
commit
86141a75eb
|
@ -41,8 +41,8 @@ class GHOST_Window : public GHOST_IWindow {
|
||||||
* Constructor.
|
* Constructor.
|
||||||
* Creates a new window and opens it.
|
* Creates a new window and opens it.
|
||||||
* To check if the window was created properly, use the getValid() method.
|
* To check if the window was created properly, use the getValid() method.
|
||||||
* \param width: The width the window.
|
* \param width: The width of the window.
|
||||||
* \param height: The height the window.
|
* \param height: The height of the window.
|
||||||
* \param state: The state the window is initially opened with.
|
* \param state: The state the window is initially opened with.
|
||||||
* \param wantStereoVisual: Stereo visual for quad buffered stereo.
|
* \param wantStereoVisual: Stereo visual for quad buffered stereo.
|
||||||
* \param exclusive: Use to show the window ontop and ignore others (used full-screen).
|
* \param exclusive: Use to show the window ontop and ignore others (used full-screen).
|
||||||
|
|
|
@ -196,12 +196,12 @@ void IK_QJacobian::InvertSDLS()
|
||||||
// Compute the dampeds least squeares pseudo inverse of J.
|
// Compute the dampeds least squeares pseudo inverse of J.
|
||||||
//
|
//
|
||||||
// Since J is usually not invertible (most of the times it's not even
|
// Since J is usually not invertible (most of the times it's not even
|
||||||
// square), the psuedo inverse is used. This gives us a least squares
|
// square), the pseudo inverse is used. This gives us a least squares
|
||||||
// solution.
|
// solution.
|
||||||
//
|
//
|
||||||
// This is fine when the J*Jt is of full rank. When J*Jt is near to
|
// This is fine when the J*Jt is of full rank. When J*Jt is near to
|
||||||
// singular the least squares inverse tries to minimize |J(dtheta) - dX)|
|
// singular the least squares inverse tries to minimize |J(dtheta) - dX)|
|
||||||
// and doesn't try to minimize dTheta. This results in eratic changes in
|
// and doesn't try to minimize dTheta. This results in erratic changes in
|
||||||
// angle. The damped least squares minimizes |dtheta| to try and reduce this
|
// angle. The damped least squares minimizes |dtheta| to try and reduce this
|
||||||
// erratic behavior.
|
// erratic behavior.
|
||||||
//
|
//
|
||||||
|
@ -323,7 +323,7 @@ void IK_QJacobian::InvertDLS()
|
||||||
// least squares solution. This is fine when the m_jjt is
|
// least squares solution. This is fine when the m_jjt is
|
||||||
// of full rank. When m_jjt is near to singular the least squares
|
// of full rank. When m_jjt is near to singular the least squares
|
||||||
// inverse tries to minimize |J(dtheta) - dX)| and doesn't
|
// inverse tries to minimize |J(dtheta) - dX)| and doesn't
|
||||||
// try to minimize dTheta. This results in eratic changes in angle.
|
// try to minimize dTheta. This results in erratic changes in angle.
|
||||||
// Damped least squares minimizes |dtheta| to try and reduce this
|
// Damped least squares minimizes |dtheta| to try and reduce this
|
||||||
// erratic behavior.
|
// erratic behavior.
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,7 @@ bool AutoTrack::TrackMarker(Marker* tracked_marker,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store original position befoer tracking, so we can claculate offset later.
|
// Store original position before tracking, so we can claculate offset later.
|
||||||
Vec2f original_center = tracked_marker->center;
|
Vec2f original_center = tracked_marker->center;
|
||||||
|
|
||||||
// Do the tracking!
|
// Do the tracking!
|
||||||
|
|
|
@ -239,7 +239,7 @@
|
||||||
// Check what is the latest C++ specification the compiler supports.
|
// Check what is the latest C++ specification the compiler supports.
|
||||||
//
|
//
|
||||||
// NOTE: Use explicit definition here to avoid expansion-to-defined warning from
|
// NOTE: Use explicit definition here to avoid expansion-to-defined warning from
|
||||||
// being geenrated. While this will most likely a false-positive warning in this
|
// being generated. While this will most likely a false-positive warning in this
|
||||||
// particular case, that warning might be helpful to catch errors elsewhere.
|
// particular case, that warning might be helpful to catch errors elsewhere.
|
||||||
|
|
||||||
// C++11 check.
|
// C++11 check.
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
namespace libmv {
|
namespace libmv {
|
||||||
|
|
||||||
// A vector of elements with fixed lenght and deep copy semantics.
|
// A vector of elements with fixed length and deep copy semantics.
|
||||||
template <typename T, int N>
|
template <typename T, int N>
|
||||||
class Tuple {
|
class Tuple {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace libmv {
|
||||||
// The 2-point algorithm solves for the rotation of the camera with a single
|
// The 2-point algorithm solves for the rotation of the camera with a single
|
||||||
// focal length (4 degrees of freedom).
|
// focal length (4 degrees of freedom).
|
||||||
//
|
//
|
||||||
// Compute from 1 to 3 possible focal lenght for 2 point correspondences.
|
// Compute from 1 to 3 possible focal length for 2 point correspondences.
|
||||||
// Suppose that the cameras share the same optical center and focal lengths:
|
// Suppose that the cameras share the same optical center and focal lengths:
|
||||||
//
|
//
|
||||||
// Image 1 => H*x = x' => Image 2
|
// Image 1 => H*x = x' => Image 2
|
||||||
|
|
|
@ -261,7 +261,7 @@ Mat3 RotationRodrigues(const Vec3& axis);
|
||||||
// positive z-axis, and y is oriented close to up.
|
// positive z-axis, and y is oriented close to up.
|
||||||
Mat3 LookAt(Vec3 center);
|
Mat3 LookAt(Vec3 center);
|
||||||
|
|
||||||
// Return a diagonal matrix from a vector containg the diagonal values.
|
// Return a diagonal matrix from a vector containing the diagonal values.
|
||||||
template <typename TVec>
|
template <typename TVec>
|
||||||
inline Mat Diag(const TVec& x) {
|
inline Mat Diag(const TVec& x) {
|
||||||
return x.asDiagonal();
|
return x.asDiagonal();
|
||||||
|
|
|
@ -50,7 +50,7 @@ int SolveCubicPolynomial(Real a, Real b, Real c, Real* x0, Real* x1, Real* x2) {
|
||||||
Real CQ3 = 2916 * q * q * q;
|
Real CQ3 = 2916 * q * q * q;
|
||||||
|
|
||||||
if (R == 0 && Q == 0) {
|
if (R == 0 && Q == 0) {
|
||||||
// Tripple root in one place.
|
// Triple root in one place.
|
||||||
*x0 = *x1 = *x2 = -a / 3;
|
*x0 = *x1 = *x2 = -a / 3;
|
||||||
return 3;
|
return 3;
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
class MEM_RefCounted {
|
class MEM_RefCounted {
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Constructs a a shared object.
|
* Constructs a shared object.
|
||||||
*/
|
*/
|
||||||
MEM_RefCounted() : m_refCount(1)
|
MEM_RefCounted() : m_refCount(1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -234,7 +234,7 @@
|
||||||
// Check what is the latest C++ specification the compiler supports.
|
// Check what is the latest C++ specification the compiler supports.
|
||||||
//
|
//
|
||||||
// NOTE: Use explicit definition here to avoid expansion-to-defined warning from
|
// NOTE: Use explicit definition here to avoid expansion-to-defined warning from
|
||||||
// being geenrated. While this will most likely a false-positive warning in this
|
// being generated. While this will most likely a false-positive warning in this
|
||||||
// particular case, that warning might be helpful to catch errors elsewhere.
|
// particular case, that warning might be helpful to catch errors elsewhere.
|
||||||
|
|
||||||
// C++11 check.
|
// C++11 check.
|
||||||
|
|
|
@ -119,7 +119,7 @@ vec4 curvemapping_evaluate_premulRGBF(vec4 col)
|
||||||
|
|
||||||
/* Using a triangle distribution which gives a more final uniform noise.
|
/* Using a triangle distribution which gives a more final uniform noise.
|
||||||
* See Banding in Games:A Noisy Rant(revision 5) Mikkel Gjøl, Playdead (slide 27) */
|
* See Banding in Games:A Noisy Rant(revision 5) Mikkel Gjøl, Playdead (slide 27) */
|
||||||
/* GPUs are rounding before writting to framebuffer so we center the distribution around 0.0. */
|
/* GPUs are rounding before writing to framebuffer so we center the distribution around 0.0. */
|
||||||
/* Return triangle noise in [-1..1[ range */
|
/* Return triangle noise in [-1..1[ range */
|
||||||
float dither_random_value(vec2 co)
|
float dither_random_value(vec2 co)
|
||||||
{
|
{
|
||||||
|
|
|
@ -183,7 +183,7 @@ void MeshTopology::setNumFaces(int num_faces)
|
||||||
num_faces_ = num_faces;
|
num_faces_ = num_faces;
|
||||||
|
|
||||||
// NOTE: Extra element to store fake face past the last real one to make it
|
// NOTE: Extra element to store fake face past the last real one to make it
|
||||||
// possible to calculate number of verticies in the last face.
|
// possible to calculate number of vertices in the last face.
|
||||||
faces_first_vertex_index_.resize(num_faces + 1, 0);
|
faces_first_vertex_index_.resize(num_faces + 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@ class MeshTopology {
|
||||||
// Pipeline related.
|
// Pipeline related.
|
||||||
|
|
||||||
// This function is to be called when number of vertices, edges, faces, and
|
// This function is to be called when number of vertices, edges, faces, and
|
||||||
// face-verticies are known.
|
// face-vertices are known.
|
||||||
//
|
//
|
||||||
// Usually is called from the end of topology refiner factory's
|
// Usually is called from the end of topology refiner factory's
|
||||||
// resizeComponentTopology().
|
// resizeComponentTopology().
|
||||||
|
@ -162,7 +162,7 @@ class MeshTopology {
|
||||||
|
|
||||||
int num_faces_;
|
int num_faces_;
|
||||||
|
|
||||||
// Continuous array of all verticies of all faces:
|
// Continuous array of all vertices of all faces:
|
||||||
// [vertex indices of face 0][vertex indices of face 1] .. [vertex indices of face n].
|
// [vertex indices of face 0][vertex indices of face 1] .. [vertex indices of face n].
|
||||||
vector<int> face_vertex_indices_;
|
vector<int> face_vertex_indices_;
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@ typedef struct OpenSubdiv_Converter {
|
||||||
// specified in precalcUVLayer().
|
// specified in precalcUVLayer().
|
||||||
int (*getNumUVCoordinates)(const struct OpenSubdiv_Converter *converter);
|
int (*getNumUVCoordinates)(const struct OpenSubdiv_Converter *converter);
|
||||||
// For the given face index and its corner (known as loop in Blender)
|
// For the given face index and its corner (known as loop in Blender)
|
||||||
// get corrsponding UV coordinate index.
|
// get corresponding UV coordinate index.
|
||||||
int (*getFaceCornerUVIndex)(const struct OpenSubdiv_Converter *converter,
|
int (*getFaceCornerUVIndex)(const struct OpenSubdiv_Converter *converter,
|
||||||
const int face_index,
|
const int face_index,
|
||||||
const int corner_index);
|
const int corner_index);
|
||||||
|
|
|
@ -56,7 +56,7 @@ size_t count_utf_8_from_16(const wchar_t *string16)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (u < 0xE000) {
|
if (u < 0xE000) {
|
||||||
/*illigal*/;
|
/*illegal*/;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
count += 3;
|
count += 3;
|
||||||
|
|
Loading…
Reference in New Issue