MBoundingBox convert( const Imath::Box3d &from ) { if( from.isEmpty() ) { return MBoundingBox(); } return MBoundingBox( convert<MPoint>( from.min ), convert<MPoint>( from.max ) ); }
MBoundingBox OpenSubdivDrawOverride::boundingBox(const MDagPath& objPath, const MDagPath& cameraPath) const { MPoint corner1( -1.0, -1.0, -1.0 ); MPoint corner2( 1.0, 1.0, 1.0); return MBoundingBox(corner1, corner2); }
MBoundingBox bruiseMapNode::boundingBox() const { MPoint corner1( -1.-1,-1 ); MPoint corner2( 1,1,1 ); return MBoundingBox( corner1, corner2 ); }
MBoundingBox octreeVizNode::boundingBox() const { MPoint corner1( -1,-1,-1 ); MPoint corner2( 1,1,1 ); return MBoundingBox( corner1, corner2 ); }
MBoundingBox liqCoordSysNode::boundingBox() const { MPoint corner1; MPoint corner2; switch( m_coordType ) { case 0: corner1 = MPoint( -0.5, -0.5, 0.0 ); corner2 = MPoint( 0.5, 0.5, 0.5 ); break; case 4: corner1 = MPoint( -0.5, -0.5, 0.0 ); corner2 = MPoint( 0.5, 0.5, 1.0 ); break; case 5: corner1 = MPoint( -1.0, -1.0, 0.0 ); corner2 = MPoint( 1.0, 1.0, 0.5 ); break; default: corner1 = MPoint( -0.5, -0.5, -0.5 ); corner2 = MPoint( 0.5, 0.5, 0.5 ); break; } return MBoundingBox( corner1, corner2 ); }
MStatus ffdPlanar::getBoundingBox( MDataBlock& block, unsigned int multiIndex, MBoundingBox &boundingBoxOut ) { MStatus status = MS::kSuccess; MArrayDataHandle inputHandle = block.outputArrayValue( input ); inputHandle.jumpToElement( multiIndex ); MObject mesh = inputHandle.outputValue().child( inputGeom ).asMesh(); MBoundingBox boundingBox = MBoundingBox(); MFnMesh meshFn( mesh, &status ); MCheckErr( status, "Error getting mesh from mesh object\n" ); MPointArray pointArray = MPointArray(); meshFn.getPoints( pointArray, MSpace::kTransform ); for ( int i = 0; i < pointArray.length(); i++ ) { boundingBox.expand( pointArray[i] ); } boundingBoxOut = boundingBox; return status; }
MBoundingBox BCIViz::boundingBox() const { MPoint corner1(-1.0, -1.0, -1.0); MPoint corner2( 1.0, 1.0, 1.0); return MBoundingBox( corner1, corner2 ); }
//----------------------------------------------------------------------- MBoundingBox visualizeMeshNode::boundingBox() const //----------------------------------------------------------------------- { return MBoundingBox(MPoint(-1.0,-1.0,-1.0), MPoint(1.0,1.0,1.0)); }
MBoundingBox wingVizNode::boundingBox() const { MPoint corner1( 0,0,0 ); MPoint corner2( 1,1,1 ); m_base->getBBox(corner1, corner2); return MBoundingBox( corner1, corner2 ); }
MBoundingBox nailConstraintNode::boundingBox() const { // std::cout << "nailConstraintNode::boundingBox()" << std::endl; //load the pdbs MObject node = thisMObject(); MPoint corner1(-1, -1, -1); MPoint corner2(1, 1, 1); return MBoundingBox(corner1, corner2); }
MBoundingBox ProxyViz::boundingBox() const { BoundingBox bbox = plantExample(0)->geomBox(); if(numPlants() > 0) bbox = gridBoundingBox(); else if(!isGroundEmpty() ) bbox = ground()->getBBox(); MPoint corner1(bbox.m_data[0], bbox.m_data[1], bbox.m_data[2]); MPoint corner2(bbox.m_data[3], bbox.m_data[4], bbox.m_data[5]); return MBoundingBox( corner1, corner2 ); }
MBoundingBox UsdMayaProxyDrawOverride::boundingBox( const MDagPath& objPath, const MDagPath& /* cameraPath */) const { UsdMayaProxyShape* pShape = getShape(objPath); if (!pShape) { return MBoundingBox(); } return pShape->boundingBox(); }
MBoundingBox FootPrintDrawOverride::boundingBox( const MDagPath& objPath, const MDagPath& cameraPath) const { MPoint corner1( -0.17, 0.0, -0.7 ); MPoint corner2( 0.17, 0.0, 0.3 ); float multiplier = getMultiplier(objPath); corner1 = corner1 * multiplier; corner2 = corner2 * multiplier; return MBoundingBox( corner1, corner2 ); }
//----------------------------------------------------------------------------- // Purpose: Figure out the bounding box of whatever is being drawn // Output : The bounding box of whatever is being drawn //----------------------------------------------------------------------------- MBoundingBox CVstExampleLocator::boundingBox() const { // In this example, a 1x1x1 cube is being drawn centered around the origin // so the bounding box is always constant // Never take into account the matrix coming into the locator node // Maya handles that... If 'localPosition' and/or 'localScale' are // desirable attributes to support (generally they are ignored) then // they must be taken into account // // < -0.5, -0.5, -0.5 > - < 0.5, 0.5, 0.5 > return MBoundingBox( MPoint( -0.5, -0.5, -0.5 ), MPoint( 0.5, 0.5, 0.5 ) ); }
MBoundingBox mpBox::boundingBox() const { MObject thisNode = thisMObject(); float x, y, z; MPlug xsize = MPlug( thisNode, aXsize ); xsize.getValue(x); MPlug ysize = MPlug( thisNode, aYsize ); ysize.getValue(y); MPlug zsize = MPlug( thisNode, aZsize ); zsize.getValue(z); MPoint corner1(x, y, z); MPoint corner2(-x, -y, -z); MBoundingBox bbox = MBoundingBox( corner1, corner2 ); return bbox; }
MBoundingBox swissArmyLocator::boundingBox() const { // Get the size // MObject thisNode = thisMObject(); MPlug plug(thisNode, aSize); MDistance sizeVal; plug.getValue(sizeVal); double multiplier = sizeVal.asCentimeters(); MPoint corner1(-1.1, 0.0, -1.1); MPoint corner2(1.1, 0.0, 1.1); corner1 = corner1 * multiplier; corner2 = corner2 * multiplier; return MBoundingBox(corner1, corner2); }
MBoundingBox footPrint::boundingBox() const { // Get the size // MObject thisNode = thisMObject(); MPlug plug( thisNode, size ); MDistance sizeVal; plug.getValue( sizeVal ); double multiplier = sizeVal.asCentimeters(); MPoint corner1( -0.17, 0.0, -0.7 ); MPoint corner2( 0.17, 0.0, 0.3 ); corner1 = corner1 * multiplier; corner2 = corner2 * multiplier; return MBoundingBox( corner1, corner2 ); }
MBoundingBox mtmEnvLight::boundingBox() const { // Get the size // //MObject thisNode = thisMObject(); //MPlug plug( thisNode, size ); //MDistance sizeVal; //plug.getValue( sizeVal ); //double multiplier = sizeVal.asCentimeters(); MPoint corner1( -0.7, 0.0, -0.3 ); MPoint corner2( 0.7, 0.0, 0.3 ); //corner1 = corner1 * multiplier; //corner2 = corner2 * multiplier; return MBoundingBox( corner1, corner2 ); }