Skip to content

Commit

Permalink
Add note about potential normalization for simple/general quadric
Browse files Browse the repository at this point in the history
  • Loading branch information
sethrj committed Aug 16, 2023
1 parent 40d6d98 commit e90cb4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/orange/surf/GeneralQuadric.hh
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ class GeneralQuadric
//---------------------------------------------------------------------------//
/*!
* Construct with all coefficients.
*
* TODO: normalize?
*/
CELER_FUNCTION GeneralQuadric::GeneralQuadric(Real3 const& abc,
Real3 const& def,
Expand All @@ -132,6 +134,8 @@ CELER_FUNCTION GeneralQuadric::GeneralQuadric(Real3 const& abc,
, i_(ghi[2])
, j_(j)
{
CELER_EXPECT(a_ != 0 || b_ != 0 || c_ != 0 || d_ != 0 || e_ != 0 || f_ != 0
|| g_ != 0 || h_ != 0 || i_ != 0);
}

//---------------------------------------------------------------------------//
Expand Down
2 changes: 2 additions & 0 deletions src/orange/surf/SimpleQuadric.hh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ class SimpleQuadric
* Construct with coefficients.
*
* The quadric is ill-defined if all non-constants are zero.
*
* TODO: normalize?
*/
CELER_FUNCTION
SimpleQuadric::SimpleQuadric(Real3 const& abc, Real3 const& def, real_type g)
Expand Down

0 comments on commit e90cb4c

Please sign in to comment.