Why can I not dereference this MyPolygon pointer?? It is declared here:
but when I try to dereference it here:Code:class Breakout { public: Breakout( ); ~Breakout( ); Ball* getBall( ) { return &ball; } void run( ); void testCollisions( ); //data members private: Ball ball; FrameRate fRate; MyPolygon* boundaries[ 4 ]; void defineBoundaries( ); };
I get this error - error C2665: 'intersectPolygon' : none of the 2 overloads can convert parameter 1 from type 'class MyPolygon'Code:void Breakout::testCollisions( ) { //need to test for intersection wiht boundaries[ 0 ], the top polygon if( intersectPolygon( *boundaries[ 0 ], *ball.getDirection( ), 4 ) ) cout << "HIT" << endl; }
I've never seen this error before, it normally tells me what I am supposed to be converting it to - but it doesnt
Oh and here is theintersectPolygon() prototype if its any use:
bool intersectPolygon( MyPolygon poly, Vector3d* line );
thx in advance![]()



LinkBack URL
About LinkBacks



