corrected some minor warning
This commit is contained in:
parent
3dfce75a37
commit
08839e1f4c
|
@ -169,7 +169,7 @@ MySegmentType * DoRay(MyRayType & _r,
|
||||||
void GetInBoxSegmentsBruteF( vcg::Box2<MyScalarType> bbox,
|
void GetInBoxSegmentsBruteF( vcg::Box2<MyScalarType> bbox,
|
||||||
std::vector<MySegmentType*> &result)
|
std::vector<MySegmentType*> &result)
|
||||||
{
|
{
|
||||||
for (int i=0;i<AllocatedSeg.size();i++)
|
for (size_t i=0;i<AllocatedSeg.size();i++)
|
||||||
{
|
{
|
||||||
if (!AllocatedSeg[i].BBox().Collide(bbox))continue;
|
if (!AllocatedSeg[i].BBox().Collide(bbox))continue;
|
||||||
result.push_back(&AllocatedSeg[i]);
|
result.push_back(&AllocatedSeg[i]);
|
||||||
|
@ -181,7 +181,7 @@ MySegmentType* GetClosesestSegmentBruteF(MyCoordType & _p,
|
||||||
{
|
{
|
||||||
MyScalarType _minDist=std::numeric_limits<MyScalarType>::max();
|
MyScalarType _minDist=std::numeric_limits<MyScalarType>::max();
|
||||||
MySegmentType *ret=NULL;
|
MySegmentType *ret=NULL;
|
||||||
for (int i=0;i<AllocatedSeg.size();i++)
|
for (size_t i=0;i<AllocatedSeg.size();i++)
|
||||||
{
|
{
|
||||||
vcg::Point2<MyScalarType> test;
|
vcg::Point2<MyScalarType> test;
|
||||||
test=vcg::ClosestPoint(AllocatedSeg[i],_p);
|
test=vcg::ClosestPoint(AllocatedSeg[i],_p);
|
||||||
|
@ -201,7 +201,7 @@ MySegmentType * DoRayBruteF(MyRayType & _r,
|
||||||
{
|
{
|
||||||
MyScalarType _minDist=std::numeric_limits<MyScalarType>::max();
|
MyScalarType _minDist=std::numeric_limits<MyScalarType>::max();
|
||||||
MySegmentType *ret=NULL;
|
MySegmentType *ret=NULL;
|
||||||
for (int i=0;i<AllocatedSeg.size();i++)
|
for (size_t i=0;i<AllocatedSeg.size();i++)
|
||||||
{
|
{
|
||||||
vcg::Point2<MyScalarType> test;
|
vcg::Point2<MyScalarType> test;
|
||||||
bool inters=vcg::RaySegmentIntersection(_r,AllocatedSeg[i],test);
|
bool inters=vcg::RaySegmentIntersection(_r,AllocatedSeg[i],test);
|
||||||
|
@ -245,7 +245,7 @@ void TestBox(int num_test=100000,
|
||||||
|
|
||||||
if (result0.size()!=result1.size())numWrong++;
|
if (result0.size()!=result1.size())numWrong++;
|
||||||
|
|
||||||
for (int j = 0; j < result0.size(); j++)
|
for (size_t j = 0; j < result0.size(); j++)
|
||||||
if (result0[j] != result1[j])
|
if (result0[j] != result1[j])
|
||||||
{
|
{
|
||||||
numWrong++;
|
numWrong++;
|
||||||
|
@ -324,7 +324,6 @@ void TestRay(int num_test=100000,
|
||||||
|
|
||||||
int main( int argc, char **argv )
|
int main( int argc, char **argv )
|
||||||
{
|
{
|
||||||
bool use_sub=true;
|
|
||||||
(void) argc;
|
(void) argc;
|
||||||
(void) argv;
|
(void) argv;
|
||||||
int num_sample=20000;
|
int num_sample=20000;
|
||||||
|
|
Loading…
Reference in New Issue