WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-10-2009, 04:40 PM
EnvisMJ EnvisMJ is offline
Member
 
Join Date: May 2009
Location: Purdue University, West Lafayette, Indiana
Posts: 44
How do I run a destructor before the end of the program?

I am writing a program that is basically just a bunch of critters running around.
I can create them fine...but how do I run the destructor on them when they die without waiting till the end of the program?
Reply With Quote
  #2  
Old 12-10-2009, 08:19 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can use the <node3D>.remove() command to permanently remove the object from the scene.
Reply With Quote
  #3  
Old 12-11-2009, 06:34 AM
EnvisMJ EnvisMJ is offline
Member
 
Join Date: May 2009
Location: Purdue University, West Lafayette, Indiana
Posts: 44
2 questions about that,
Does the .remove() actually run the destructor also? Does it free up it's resources, etc?

Also, it throws a '...does not have .remove() function' error when I try to run it on my own class object. Do I need to do something special to include .remove()?
Reply With Quote
  #4  
Old 12-14-2009, 05:17 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Yes, it will free up resources used.

This method will work on Vizard's node3D objects.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
changing the gain of a joystick during a program Saz Vizard 4 06-25-2009 03:49 AM
Is it possible to save a vizard program as (movie) a media file? ghazanfar Vizard 5 05-07-2007 10:03 AM
Get position data in an own little program Researcher Precision Position Tracker (PPT) 2 02-01-2006 02:55 AM
Multiple Stages in one Program Amit Vizard 7 11-11-2005 10:20 AM
Loading .3ds-Files without interrupting Program flow Stefan Vizard 10 06-08-2005 04:44 PM


All times are GMT -7. The time now is 01:39 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC