RE: pfType oddness

New Message Reply Date view Thread view Subject view Author view

From: Javier Abadía Miranda (jabadia++at++espelsa.es)
Date: 02/21/2000 23:21:47


Can be this?

if(item->isOfType( pfNetDCS::getClassType ( ) ))
                                                               ^^^

Hope it helps.

-----Mensaje original-----
De: Chris Scharver [SMTP:scharver++at++evl.uic.edu]
Enviado el: lunes 21 de febrero de 2000 23:32
Para: info-performer++at++sgi.com
Asunto: pfType oddness

Hi Performers,

I'm having some trouble trying to use some Performer type checking.
I have made a networked pfDCS class called pfNetDCS--a bit of a pain
since none of the functions in pfDCS are virtual, but that's another
matter. Anyhow, I have a node obtained through intersection tests.
I need to cast it as a pfNetDCS if it's of that type, but for some
reason the test fails.

if (item->isOfType( pfNetDCS::getClassType ))
{
        ((pfNetDCS *) item)->setMat( newMatrix );
}
else
{
        cout << "It's just a " << item->getClassName() << endl;
}

When this check runs during execution, I get the line "It's just a
NetDCS". Well, that's obviously what I expected it to be, so why is
the correct class name being returned but isOfType is failing its
check? Any idea what I'm not doing correctly?

Thanks,
Chris
__________________________________________________________________________
Chris Scharver EECS Graduate Student
Electronic Visualization Laboratory EVL Phone: 312-996-3002
The University of Illinois at Chicago EVL FAX: 312-413-7585
1998-1999 UIC Men's Swimming and Diving
-----------------------------------------------------------------------
List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com
.


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Feb 21 2000 - 23:23:33 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.