Bugzilla – Attachment 187 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]
Candidate to address comments
ParametrizedLineIntersectionPoint.patch (text/plain), 2.97 KB, created by
Andy Somerville
on 2011-06-15 19:17:56 UTC
(
hide
)
Description:
Candidate to address comments
Filename:
MIME Type:
Creator:
Andy Somerville
Created:
2011-06-15 19:17:56 UTC
Size:
2.97 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 Wed Jun 15 13:15:29 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 ); >+ >+ /** \rreturns parameter t of the intersection of the line with hyperplane */ >+ template <int OtherOptions> >+ VectorType intersectionT(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane); >+ >+ /** \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); >+ >+ /** \rreturns the intersection point of the line with hyperplane */ >+ template <int OtherOptions> >+ VectorType intersectionPoint(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane); >+ > > /** \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>::evalutate( _Scalar t ) >+{ >+ 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) > { > 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) >+{ >+ 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) >+{ >+ return evalutate(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
Actions:
View
|
Diff
Attachments on
bug 297
:
183
|
184
|
187
|
188
|
193
|
233
|
234
|
235