Original Post
Hello all, Visual Studio is giving me an error when I am attempting to push_back() an instance of my TestPolyData class onto a vector. The error message is: c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\vector(810): error C2558: class 'TestPolyData' : no copy constructor available or copy constructor is declared 'explicit' I am not sure why it is giving me this. I do have a copy constructor, and it is a public method. I don't have anything declared 'explicit', I am not sure what that means. Has anyone seen this before, or know what might be causing my issue? The header for TestPolyData is below.
#ifndef TESTPOLYDATA_H
#define TESTPOLYDATA_H
#include "Common.h"
struct SATINTERVAL
{
bool collisionExists; // if this is false, then we don't care about the other data
bool collisionInfinite; // this is true in cases where the shapes will never collide, or will alawys collide
float intervalLow; // this is the smallest value where the shapes collide( or sometimes, the smallest extent along an axis )
float intervalHigh; // this is the largest value where the shapes collide( or sometimes, the largest extent along an axis )
D3DXVECTOR3 lastAxisPassed; // this axis is the normal of the final plane of separation crossed before the shapes start to overlap
/// test data
int collideAttemptNum; // used for enumerating collision attempts in log data
///
};
class TestPolyData
{
public:
TestPolyData( D3DXVECTOR3 points[], int pointCount, D3DXVECTOR3 edges[], int edgeCount, D3DXVECTOR3 normal );
TestPolyData( TestPolyData &orig );
~TestPolyData();
SATINTERVAL SATPolyPolyMinDist( TestPolyData &sourcePoly, D3DXVECTOR3 &motionDir, int collideAttemptNum=0 );
void printInputs( TestPolyData &sourcePoly, int collideAttemptNum );
private:
SATINTERVAL SATTestSepPlane( TestPolyData &sourcePoly, D3DXVECTOR3 &planeNormal, float motionNormalComponent );
SATINTERVAL planeExtentMinMax( D3DXVECTOR3 &planeNormal );
SATINTERVAL intervalIntersection( SATINTERVAL &interval1, SATINTERVAL &interval2 );
SATINTERVAL intervalUnion( SATINTERVAL &interval1, SATINTERVAL &interval2 );
D3DXVECTOR3 *m_pPoints;
int m_PointCount;
D3DXVECTOR3 *m_pEdges;
int m_EdgeCount;
D3DXVECTOR3 m_Normal;
/// test data
std::ofstream outfile2;
///
};
#endif // !defined( TESTPOLYDATA_H )