From Mike Wittman, C# build fixes

This commit is contained in:
Robert Osfield 2007-04-04 08:05:23 +00:00
parent 307a9a9a78
commit 9b5bbe862d
2 changed files with 10 additions and 10 deletions

View File

@ -52,7 +52,7 @@ public:
* The delaunay triangles inside the DelaunayConstraint area can be used to fill
* the area or generate geometry that terrain follows the area in some way.
* These triangles can form a canopy or a field. */
void addtriangle(const int i1,const int i2, const int i3);
void addtriangle(int i1, int i2, int i3);
/** Get the filling primitive. One:
* triangulate must have bneen called and
@ -83,11 +83,11 @@ public:
/** return winding number as a float of loop around testpoint; may use multiple loops
* does not reject points on the edge or very very close to the edge */
float windingNumber(const osg::Vec3 testpoint) const ;
float windingNumber(const osg::Vec3 &testpoint) const ;
/** true if testpoint is internal (or external) to constraint. */
virtual bool contains(const osg::Vec3 testpoint) const;
virtual bool outside(const osg::Vec3 testpoint) const;
virtual bool contains(const osg::Vec3 &testpoint) const;
virtual bool outside(const osg::Vec3 &testpoint) const;
/** Tessellate the constraint loops so that the crossing points are interpolated
* and added to the contraints for the triangulation. */
@ -158,7 +158,7 @@ public:
protected:
virtual ~DelaunayTriangulator();
DelaunayTriangulator &operator=(const DelaunayTriangulator &) { return *this; }
int getindex(const osg::Vec3 pt,const osg::Vec3Array *points);
int getindex(const osg::Vec3 &pt,const osg::Vec3Array *points);
private:
osg::ref_ptr<osg::Vec3Array> points_;

View File

@ -406,7 +406,7 @@ const Triangle * getTriangleWithEdge(const unsigned int ip1,const unsigned int i
return NULL; //-1;
}
int DelaunayTriangulator::getindex(const osg::Vec3 pt,const osg::Vec3Array *points)
int DelaunayTriangulator::getindex(const osg::Vec3 &pt,const osg::Vec3Array *points)
{
// return index of pt in points (or -1)
for (unsigned int i=0; i<points->size(); i++)
@ -1173,7 +1173,7 @@ void DelaunayTriangulator::removeInternalTriangles(DelaunayConstraint *dc )
}
//=== DelaunayConstraint functions
float DelaunayConstraint::windingNumber(const osg::Vec3 testpoint) const
float DelaunayConstraint::windingNumber(const osg::Vec3 &testpoint) const
{
// return winding number of loop around testpoint. Only in 2D, x-y coordinates assumed!
float theta=0; // sum of angles subtended by the line array - the winding number
@ -1240,13 +1240,13 @@ osg::DrawElementsUInt *DelaunayConstraint::makeDrawable()
return prim_tris_.get();
}
bool DelaunayConstraint::contains(const osg::Vec3 testpoint) const
bool DelaunayConstraint::contains(const osg::Vec3 &testpoint) const
{
// true if point is internal to the loop.
float theta=windingNumber(testpoint); // sum of angles subtended by the line array - the winding number
return fabs(theta)>0.9; // should be 0 or 1 (or 2,3,4 for very complex not permitted loops).
}
bool DelaunayConstraint::outside(const osg::Vec3 testpoint) const
bool DelaunayConstraint::outside(const osg::Vec3 &testpoint) const
{
// true if point is outside the loop.
float theta=windingNumber(testpoint); // sum of angles subtended by the line array - the winding number
@ -1254,7 +1254,7 @@ bool DelaunayConstraint::outside(const osg::Vec3 testpoint) const
}
void DelaunayConstraint::addtriangle(const int i1,const int i2, const int i3)
void DelaunayConstraint::addtriangle(int i1, int i2, int i3)
{
// a triangle joins vertices i1,i2,i3 in the points of the delaunay triangles.
// points is the array of poitns in the triangulator;