clankill3r
clankill3r

Reputation: 9583

How to copy values over to another kind of class

I use the ofxCvBlob class from openframeworks. Let's say i get one object:

ofxCvBlob blob = blobs.get(i);

I have my own class which extends ofxCvBlob:

class ofxDTangible : ofxCvBlob {

}

Suppose i have 1 object of type ofxDTangible:

ofxDTangible tangible;

And i want it to get the values from blob then how can this be done?

Upvotes: 0

Views: 96

Answers (1)

MRB
MRB

Reputation: 3822

I don't understand your problem correctly but if ofxCvBlob has appropriate copy construction

class ofxDTangible : ofxCvBlob 
{
public:
    ofxDTangible() {};
    ofxDTangible(ofxCvBlob& base) : ofxCvBlob(base) {};
}

ofxDTangible tangible(blob);

Upvotes: 2

Related Questions