trueaxis.com Forum Index trueaxis.com
True Axis Physics SDK Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Creating object inherited from DynamicObject

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    trueaxis.com Forum Index -> Getting Started
View previous topic :: View next topic  
Author Message
digiman



Joined: 24 Sep 2006
Posts: 1

PostPosted: Sun Sep 24, 2006 11:38 am    Post subject: Creating object inherited from DynamicObject Reply with quote

How should I create objects of my class inherited from DynamicObject class?
Code:

Body *lBody = new Body();

or
Code:

Body *lBody = (Body *)Body::CreateNew();

_________________
Krasnoyarsk, Russian Fed.
Back to top
View user's profile Send private message
luke
Site Admin


Joined: 15 Oct 2004
Posts: 621

PostPosted: Mon Sep 25, 2006 10:48 am    Post subject: Reply with quote

You should be able to do this however you like. TrueAxis just uses CreateNew to avoid conficts with any users or other libraries that override new and delete.

DynamicObjectCar uses the following code.
Code:
DynamicObjectCar* TAC_CALL DynamicObjectCar::CreateNew()
{
   DynamicObjectCar* pNew;
   TA_MEMORY_MGR_NEW(pNew, DynamicObjectCar);
   return pNew;
}
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    trueaxis.com Forum Index -> Getting Started All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group