Bugzilla – Attachment 193 Details for
Bug 297
ParametrizedLine::intersection doesn't return intersection point
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
This bugzilla service is closed. All entries have been migrated to
https://gitlab.com/libeigen/eigen
[patch]
Adds const specifier
ParametrizedLineIntersectionPoint.patch (text/plain), 3.10 KB, created by
Andy Somerville
on 2011-07-01 03:55:09 UTC
(
hide
)
Description:
Adds const specifier
Filename:
MIME Type:
Creator:
Andy Somerville
Created:
2011-07-01 03:55:09 UTC
Size:
3.10 KB
patch
obsolete
>diff -r 22bbcf9713ee Eigen/src/Geometry/ParametrizedLine.h >--- a/Eigen/src/Geometry/ParametrizedLine.h Tue Jun 14 10:56:47 2011 +0200 >+++ b/Eigen/src/Geometry/ParametrizedLine.h Thu Jun 30 21:53:06 2011 -0400 >@@ -106,8 +106,21 @@ > VectorType projection(const VectorType& p) const > { return origin() + direction().dot(p-origin()) * direction(); } > >+ /** \rreturns the point at parameter t along the line */ >+ VectorType evaluate( Scalar t ) const; >+ >+ /** \rreturns parameter t of the intersection of the line with hyperplane */ > template <int OtherOptions> >- Scalar intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane); >+ Scalar intersectionT(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const; >+ >+ /** \rreturns parameter t of the intersection of the line with hyperplane. (maintained for API compatablity) */ >+ template <int OtherOptions> >+ Scalar intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const; >+ >+ /** \rreturns the intersection point of the line with hyperplane */ >+ template <int OtherOptions> >+ VectorType intersectionPoint(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const; >+ > > /** \returns \c *this with scalar type casted to \a NewScalarType > * >@@ -158,11 +171,39 @@ > /** \returns the parameter value of the intersection between \c *this and the given hyperplane > */ > template <typename _Scalar, int _AmbientDim, int _Options> >+inline typename ParametrizedLine<_Scalar, _AmbientDim,_Options>::VectorType >+ParametrizedLine<_Scalar, _AmbientDim,_Options>::evaluate( _Scalar t ) const >+{ >+ return origin() + (direction()*t); >+} >+ >+/** \returns the parameter value of the intersection between \c *this and the given hyperplane >+ */ >+template <typename _Scalar, int _AmbientDim, int _Options> > template <int OtherOptions> >-inline _Scalar ParametrizedLine<_Scalar, _AmbientDim,_Options>::intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) >+inline _Scalar ParametrizedLine<_Scalar, _AmbientDim,_Options>::intersectionT(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const > { > return -(hyperplane.offset()+hyperplane.normal().dot(origin())) > / hyperplane.normal().dot(direction()); > } > >+/** \returns the parameter value of the intersection between \c *this and the given hyperplane >+ */ >+template <typename _Scalar, int _AmbientDim, int _Options> >+template <int OtherOptions> >+inline _Scalar ParametrizedLine<_Scalar, _AmbientDim,_Options>::intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const >+{ >+ return intersectionT(hyperplane); >+} >+ >+/** \returns the parameter value of the intersection between \c *this and the given hyperplane >+ */ >+template <typename _Scalar, int _AmbientDim, int _Options> >+template <int OtherOptions> >+inline typename ParametrizedLine<_Scalar, _AmbientDim,_Options>::VectorType >+ParametrizedLine<_Scalar, _AmbientDim,_Options>::intersectionPoint(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane)const >+{ >+ return evaluate(intersectionT(hyperplane)); >+} >+ > #endif // EIGEN_PARAMETRIZEDLINE_H
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
jacob.benoit.1
:
review-
Actions:
View
|
Diff
Attachments on
bug 297
:
183
|
184
|
187
|
188
|
193
|
233
|
234
|
235