It's based on the weight of the entire camper - tip to tail. Where that weight is centered (hopefully somewhere forward of the center of tip to tail) is the COG. And because cabover segments are lighter than the full height camper segments, it even gets close to the center of the camper box.
Same goes for side to side, but less commonly discussed.