Bugzilla – Attachment 183 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]
Implements discussed feature
ParametrizedLineIntersectionPoint.patch (text/plain), 1.23 KB, created by
Andy Somerville
on 2011-06-15 06:32:56 UTC
(
hide
)
Description:
Implements discussed feature
Filename:
MIME Type:
Creator:
Andy Somerville
Created:
2011-06-15 06:32:56 UTC
Size:
1.23 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 00:30:17 2011 -0400 >@@ -108,6 +108,10 @@ > > template <int OtherOptions> > Scalar intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane); >+ >+ template <int OtherOptions> >+ VectorType intersectionPoint(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane); >+ > > /** \returns \c *this with scalar type casted to \a NewScalarType > * >@@ -165,4 +169,16 @@ > / 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 typename ParametrizedLine<_Scalar, _AmbientDim,_Options>::VectorType >+ParametrizedLine<_Scalar, _AmbientDim,_Options>::intersectionPoint(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) >+{ >+ _Scalar t = -(hyperplane.offset()+hyperplane.normal().dot(origin())) >+ / hyperplane.normal().dot(direction()) ; >+ return origin() + (direction()*t); >+} >+ > #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