Hi,
My program used to compile perfectly, until I've added a member to a class that consists of an object of another class. Now, I get the following warning:
"Class 'Reta': destructor could not be generated because base class destructor is inaccessible."
and the following error:
"'osg::LineSegment::~osg::LineSegment': cannot access protected member declared in class 'osg::LineSegment'"
I've looked in the documentation and my osg::LineSegment class has a protected virtual destructor
Code:
protected:
virtual ~LineSegment();
So basically, I have two situations in which I cannot access my destructor...
I'm going to post the source code (my class definition) just to add some information to my question, hoping that the fact that it's written in Portuguese won't be much of an obstacle to understanding it.
Here it goes:
Code:
#ifndef RETA_H
#define RETA_H
#include <osg/LineSegment>
#include "primitiva.h"
#include "plano.h"
class Plano;
// Classe 'Reta' derived from 'Primitiva'
class Reta : public Primitiva
{
public:
Reta();
osg::Geode* criarReta(osg::Vec3f posicao, float raio, float altura);
void RetaParalela(Reta* reta, osg::Vec3f pos);
void RetaParalela(Plano* plano, osg::Vec3f pos);
void RetaPerpendicular(Reta* reta, osg::Vec3f pos);
void RetaPerpendicular(Plano* plano, osg::Vec3f pos);
private:
osg::LineSegment line; // this is the member that I added
};
#endif