CompuServe Thread

#Scanning Objects

6 messages in this thread
#87106From: Danny MercurioFeb 27, 1994 2:12 PM
Hi everyone, Here's another annoying little question: <g> How does one go about scanning all the objects in the editor? I'm trying to perform an EXP_OBJ_EXTENTS on all mesh items in the editor and putting the relevent info in a database. Unfortunately, the only way I've found to set the current input object is with EXP_PICK_OBJECT. There has to be another way to set the current input object without requiring user intervention. PXP_GET_ITEM works great since I can just increment the index number but it doesn't give me the center values for X, Y, & Z of the object. Is there a way to set the current input object in OBJECTIO without resorting to an EXP_PICK_OBJECT?
#87134From: Gus GrubbaFeb 27, 1994 4:52 PM
I'm not sure what you're trying to get but if it's the center of the object, it's easily obtained by interpolating the bounding box (ItemMesh.mins[] and ItemMesh.maxs[]).
#87161From: Danny MercurioFeb 27, 1994 8:46 PM
The trouble with trying to use ItemMesh.mins[] and ItemMesh.maxs[] is that they return the extents of the objects itself, with the origin being the center of the object – not the world origin. In other words, this returns the size of the object but not its position. Using this approach always returns 0,0,0 for the X,Y,Z centers of the object. Unless I'm doing something wrong… ExtInfo.min, ExtInfo.max, & ExtInfo.center return the extents and position of the object relative to the world origin. Unfortunately, you can only perform an EXP_OBJ_EXTENTS on the current input object. Without user intervention, the only way to change the input object would appear to be with EXP_SELECT_INPUT_OBJ. Problem is, this command doesn't appear to work with PXPs. Or, to be more precise, I can't get it to work. <g> I wish there were a direct call pxp command like PXP_GET_EXTENTS, or PXP_GET_CENTERS. <g> Regards, Danny…
#87339From: SyndesisFeb 28, 1994 12:27 PM
Does he mean the center of the object, or the pivot point?
#87354From: Gus GrubbaFeb 28, 1994 1:13 PM
I guess he means the center of the object.
#87387From: Danny MercurioFeb 28, 1994 3:23 PM
I mean the center of the object. <g> Danny…