MCPcopy Create free account
hub / github.com/InternRobotics/EmbodiedScan / flip

Method flip

embodiedscan/structures/points/cam_points.py:39–50  ·  view source on GitHub ↗

Flip the points along given BEV direction. Args: bev_direction (str): Flip direction (horizontal or vertical). Defaults to 'horizontal'.

(self, bev_direction: str = 'horizontal')

Source from the content-addressed store, hash-verified

37 self.rotation_axis = 1
38
39 def flip(self, bev_direction: str = 'horizontal') -> None:
40 """Flip the points along given BEV direction.
41
42 Args:
43 bev_direction (str): Flip direction (horizontal or vertical).
44 Defaults to 'horizontal'.
45 """
46 assert bev_direction in ('horizontal', 'vertical')
47 if bev_direction == 'horizontal':
48 self.tensor[:, 0] = -self.tensor[:, 0]
49 elif bev_direction == 'vertical':
50 self.tensor[:, 2] = -self.tensor[:, 2]
51
52 @property
53 def bev(self) -> Tensor:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected