point/vector: give homog a default dimensionality
This commit is contained in:
parent
d29f2ed235
commit
ba19aebe88
@ -39,7 +39,7 @@ namespace util {
|
||||
|
||||
/// expand point to use homogenous coordinates of a higher dimension.
|
||||
/// ie, fill with (0,..,0,1)
|
||||
template <size_t D>
|
||||
template <size_t D = 4>
|
||||
point<D,T>
|
||||
homog (void) const
|
||||
{
|
||||
|
@ -35,7 +35,8 @@ namespace util {
|
||||
using coord::base<S,T,vector<S,T>>::base;
|
||||
|
||||
// representations
|
||||
template <size_t D> vector<D,T> homog (void) const
|
||||
template <size_t D = 4>
|
||||
vector<D,T> homog (void) const
|
||||
{
|
||||
static_assert (D > S, "reducing size loses data");
|
||||
return (*this).template redim<D> (0.f);
|
||||
|
Loading…
Reference in New Issue
Block a user