This command is used to check if a 3D object exists using the reference number that is assigned with either dbLoadObject or any of the commands that make 3D primitives.


int dbObjectExist ( int iID )


A value of one is returned by this function if the supplied reference number refers to a 3D object. If not, the functions returns zero.

int doesItExist=dbObjectExist(1);

A real world example of when this command would be useful would be a 'free object' function. The idea behind a free object function is that the programmer can create and manage a number of 3D objects, without necessarily knowing with the objects' reference numbers are. An example free object function is shown below.

int freeObject(int startPoint){
     int currentCheck=startPoint;
     return currentCheck;

This function will return a free reference number. However, if you do not create an object using that reference number, the number will remain free, and therefor will be returned by this function the next time it's called.