This page contains reference documentation for the GetSelectBounds function. This function allows you to get the minimum and maximum 3D extents, or bounding box, of the selected objects.
int GetSelectBounds( Vec Min, Vec Max )
Function parameters are as follows:
Examples are as follows:
Group group = (Group)Model.EditNode( node ); Vec aVec1 = new Vec; Vec aVec2 = new Vec; Matrix editManipulator = Model.Grid.GetManipulatorTransform(); Model.GetSelectBounds( aVec1, aVec2 ); editManipulator.Position[0] = ( aVec1.X / 2 ) + ( aVec2.X / 2 ); editManipulator.Position[1] = ( aVec1.Y / 2 ) + ( aVec2.Y / 2 ); editManipulator.Position[2] = ( aVec1.Z / 2 ) + ( aVec2.Z / 2 ); Model.Grid.SetManipulatorTransform( editManipulator );
For sample code: