Have translations, rotations trigger operators

Hello all, New to BPY

I am developing an addon that voxelizes a 3D model only when it is within a certain volume in the 3D_View. For this I would like every, translation, rotation, scale, dimension change to trigger an operator that will first check if that the geomery is within the volume and then proceed to voxelize.

How do I code something like this:

class MYOP(bpy.types.Operator)
  def execute (self, context)
  obj = context.active_object

def SomeOtherOperator

I know this is wrong, but I also don’t know what is right hehe.
Hope this makes sense.

Thanks a lot

Look at the Application Handlers section of the API.

Try one of the depsgraph_update handlers.