|
Boost : |
From: Marcelo E. Magallon (mmagallo_at_[hidden])
Date: 2003-05-21 15:21:01
On Wed, May 21, 2003 at 05:32:33PM +0100, Reece Dunn wrote:
> boost::geometric::point - represents a location
> point = point +/- vector
> and variants
> NOTE: cannot do point * point (does not make sense mathematically)
>
> boost::geometric::vector - represents a distance between two points
> vector = point - point
> vector = vector +/-/*/div vector
> vector = vector +/-/*/div scalar
> and variants
What's vector div vector?
What's vector +/- scalar?
What's vector * vector? It's vector product, from your definition
above, how do I express scalar product (dot product, inner product)?
> boost::math::matrixNxN - N x N matrices and related operations
> matrix = matrix +/-/* matrix
> and variants
vector = matrix * vector;
matrix = scalar * matrix;
Are matrixes row major or column major? This is not as trivial as it
sounds. If they are matrix major and the elements are stored
continously in memory you can pass the address of the (0,0) element to
OpenGL.
> There should also be the matrix-based functions:
> boost::math::transpose( matrix ) - T( i, j ) = A( j, i )
> boost::math::det( martix ) - the determinant of the matrix
> boost::math::cofactor( matrix, i, j ) - the sub-matrix of the matrix
> at the position ( i, j )
boost::math::invert(matrix)
> It should also be possible to perform geometric operations:
> matrix boost::geometric::translate( x, y, z )
> translate an object by this matrix
> matrix boost::geometric::scale( x, y, z )
> enlarge an object by this matrix
> NOTE: identity = scale( 1, 1, 1 )
> matrix boost::geometric::rotate( x, y )
> matrix boost::geometric::rotateX/Y/Z()
> rotate an object about a plane
Rotations around arbitrary axis would be welcomed, e.g.:
matrix4x4 boost::geometric::rotate(a, x, y, z)
> There should also be the facility to project an object from one dimension
> system to another, e.g.
> point2D boost::geometric::project( point2D )
Uhm? You mean like converting between cartesian and polar systems?
Marcelo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk