Re: [eigen] OpenGL support

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


For the record I've just updated this module with support for:

class Transform (3D, Affine, AffineCompact, Projective via
glLoadMatrix, glMultMatrix)
class Translation (2D and 3D, via glTranslate)
class UniformScaling (3D, via glScale)

glGet(GLenum pname, DenseBase<Derived>) to read vector and matrices from OpenGL.


and more importantly I've implemented true unit tests, so now it
should be reliable :)

gael

On Thu, Jul 22, 2010 at 4:45 PM, Gael Guennebaud
<gael.guennebaud@xxxxxxxxx> wrote:
> Hi,
>
> I've just adapted and pushed some old code I had to pass Eigen's
> objects to OpenGL, like:
>
> Vector3f a, b;
>
> glVertex(0.5*(a + b));
>
> without having to bother about the dimension, scalar type, whether I
> should evaluate the expression or not, degree versus radian, row major
> versus column major, etc., etc.
>
> Currently supported functions:
>
> glVertex, glNormal, glColor, glTexCoord (for 2D, 3D, 4D and int,
> short, float and double)
>
> glTranslate( a 2D or 3D vector expression )
> glScale( a 2D or 3D vector expression )
>
> glRotate( Rotation2D or AngleAxis or Quaternion )
>
> glLoadMatrix( 4x4 expression of float or double which can be row or
> column major )
> glMultMatrix( 4x4 expression of float or double which can be row or
> column major )
>
> Feel free to improve it and send patch ;) (e.g., it would be welcome
> to support Eigen::Translation, Eigen::Transform,
> Eigen::UniformScaling, 2x2 and 3x3 rotation matrix via glRotate, etc.)
>
> cheers,
>
> gael
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/