View unanswered posts | View active topics It is currently Sat Oct 23, 2021 9:13 am



Reply to topic  [ 2 posts ] 
 Change GLC_3DRep properties 
Author Message

Joined: Fri Sep 27, 2013 2:34 pm
Posts: 2
Post Change GLC_3DRep properties
I am trying to change the geometrical properties of a GLC_3DRep after it has been created. For example, can I change a GLC_Sphere diameter or a GLC_Box dimensions after these objects have been created? Could you tell me how to do this? Thanks in advance!!


Fri Sep 27, 2013 3:37 pm
Profile
Site Admin

Joined: Sun Jan 03, 2010 4:27 pm
Posts: 390
Post Re: Change GLC_3DRep properties
Hi,
carriojazz wrote:
I am trying to change the geometrical properties of a GLC_3DRep after it has been created. For example, can I change a GLC_Sphere diameter or a GLC_Box dimensions after these objects have been created?

Yes, it's possible.
carriojazz wrote:
Could you tell me how to do this? Thanks in advance!!

Yes.
It seems that you use the class GLC_Factory to create you geometries.
In this case, you have to retrieve for example a pointer to a GLC_Sphere from a GLC_3DRep:
Code:
    GLC_3DRep sphere= GLC_Factory::instance()->createSphere(10.0);
    GLC_Sphere* pSphere= dynamic_cast<GLC_Sphere*>(sphere.geomAt(0));
    if (NULL != pSphere)
    {
        pSphere->setRadius(20.0);
    }


But to do this kind of things (modifying geometry), it will be better to keep a pointer of your geometries in order to modify them more easily.
A+


Sat Sep 28, 2013 1:59 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.