small gcc compilation errors (typenames, missing std...)

This commit is contained in:
Paolo Cignoni 2009-06-25 07:29:29 +00:00
parent eae78a0251
commit b2bc0d07ba
3 changed files with 12 additions and 15 deletions

View File

@ -1073,7 +1073,7 @@ private:
if(!((*fi).IsD()) && !(*fi).IsS())
{
(*fi).SetS();
CCV.push_back(make_pair(0,&*fi));
CCV.push_back(std::make_pair(0,&*fi));
sf.push(&*fi);
while (!sf.empty())
{

View File

@ -215,15 +215,13 @@ template<class SCALAR_TYPE>
}
//intersection between a circle and a line
template<class SCALAR_TYPE>
inline bool CircleLineIntersection(const vcg::Line2<SCALAR_TYPE> & line,
const vcg::Point2<SCALAR_TYPE> &center,
const SCALAR_TYPE &radius,
vcg::Point2<SCALAR_TYPE> &p0,
vcg::Point2<SCALAR_TYPE> &p1)
template<class ScalarType>
inline bool CircleLineIntersection(const vcg::Line2<ScalarType> & line,
const vcg::Point2<ScalarType> &center,
const ScalarType &radius,
vcg::Point2<ScalarType> &p0,
vcg::Point2<ScalarType> &p1)
{
typedef typename SCALAR_TYPE ScalarType;
///translate with origin on the center
ScalarType x1,x2,y1,y2;
x1=line.Origin().X()-center.X();

View File

@ -40,13 +40,12 @@ namespace vcg {
Templated class for storing a generic triangle in a 2D space.
Note the relation with the Face class of TriMesh complex, both classes provide the P(i) access functions to their points and therefore they share the algorithms on it (e.g. area, normal etc...)
*/
template <class SCALAR_TRIANGLE_TYPE> class Triangle2
template <class SCALAR_TYPE> class Triangle2
{
public:
typedef SCALAR_TRIANGLE_TYPE ScalarTriangleType;
typedef ScalarTriangleType ScalarType;
typedef SCALAR_TYPE ScalarType;
typedef Point2< ScalarType > CoordType;
typedef typename Triangle2<ScalarType> TriangleType;
typedef Triangle2<ScalarType> TriangleType;
protected:
/// Vector of vertex pointer incident in the face
@ -123,8 +122,8 @@ bool InterpolationParameters(const CoordType & bq, ScalarType &a, ScalarType &b,
///return the distance to the point q and neighors point p
void PointDistance(const CoordType & q,
typename ScalarType & dist,
typename CoordType & p ) const
ScalarType & dist,
CoordType & p ) const
{
dist=FLT_MAX;
///find distance to each segment and take minimum