[Also: Sources: 76ers trade big man to Cavs ]
Hamilton, a 6-foot-7 wing player, gives the Rockets the athletic perimeter player they've been seeking for their bench.
Hamilton, 23, has averaged 6.8 points this season for Denver.
He was the 26th overall pick in the 2011 NBA Draft out of Texas.
Brooks, a seven-year veteran, gives the Nuggets a backup point guard for Ty Lawson. Denver traded guard Andre Miller to Washington on Thursday.