13
13
from pytorch3d .structures import Meshes , Pointclouds , join_meshes_as_scene
14
14
15
15
16
- def get_camera_wireframe (scale : float = 0.3 ):
16
+ def get_camera_wireframe (scale : float = 0.3 ): # pragma: no cover
17
17
"""
18
18
Returns a wireframe of a 3D line-plot of a camera symbol.
19
19
"""
@@ -30,7 +30,7 @@ def get_camera_wireframe(scale: float = 0.3):
30
30
return lines
31
31
32
32
33
- class AxisArgs (NamedTuple ):
33
+ class AxisArgs (NamedTuple ): # pragma: no cover
34
34
showgrid : bool = False
35
35
zeroline : bool = False
36
36
showline : bool = False
@@ -40,7 +40,7 @@ class AxisArgs(NamedTuple):
40
40
showaxeslabels : bool = False
41
41
42
42
43
- class Lighting (NamedTuple ):
43
+ class Lighting (NamedTuple ): # pragma: no cover
44
44
ambient : float = 0.8
45
45
diffuse : float = 1.0
46
46
fresnel : float = 0.0
@@ -59,7 +59,7 @@ def plot_scene(
59
59
pointcloud_max_points : int = 20000 ,
60
60
pointcloud_marker_size : int = 1 ,
61
61
** kwargs ,
62
- ):
62
+ ): # pragma: no cover
63
63
"""
64
64
Main function to visualize Meshes, Cameras and Pointclouds.
65
65
Plots input Pointclouds, Meshes, and Cameras data into named subplots,
@@ -333,7 +333,7 @@ def plot_batch_individually(
333
333
extend_struct : bool = True ,
334
334
subplot_titles : Optional [List [str ]] = None ,
335
335
** kwargs ,
336
- ):
336
+ ): # pragma: no cover
337
337
"""
338
338
This is a higher level plotting function than plot_scene, for plotting
339
339
Cameras, Meshes and Pointclouds in simple cases. The simplest use is to plot a
@@ -454,7 +454,7 @@ def _add_struct_from_batch(
454
454
subplot_title : str ,
455
455
scene_dictionary : Dict [str , Dict [str , Union [CamerasBase , Meshes , Pointclouds ]]],
456
456
trace_idx : int = 1 ,
457
- ):
457
+ ): # pragma: no cover
458
458
"""
459
459
Adds the struct corresponding to the given scene_num index to
460
460
a provided scene_dictionary to be passed in to plot_scene
@@ -502,7 +502,7 @@ def _add_mesh_trace(
502
502
subplot_idx : int ,
503
503
ncols : int ,
504
504
lighting : Lighting ,
505
- ):
505
+ ): # pragma: no cover
506
506
"""
507
507
Adds a trace rendering a Meshes object to the passed in figure, with
508
508
a given name and in a specific subplot.
@@ -569,7 +569,7 @@ def _add_pointcloud_trace(
569
569
ncols : int ,
570
570
max_points_per_pointcloud : int ,
571
571
marker_size : int ,
572
- ):
572
+ ): # pragma: no cover
573
573
"""
574
574
Adds a trace rendering a Pointclouds object to the passed in figure, with
575
575
a given name and in a specific subplot.
@@ -650,7 +650,7 @@ def _add_camera_trace(
650
650
subplot_idx : int ,
651
651
ncols : int ,
652
652
camera_scale : float ,
653
- ):
653
+ ): # pragma: no cover
654
654
"""
655
655
Adds a trace rendering a Cameras object to the passed in figure, with
656
656
a given name and in a specific subplot.
@@ -698,7 +698,9 @@ def _add_camera_trace(
698
698
_update_axes_bounds (verts_center , max_expand , current_layout )
699
699
700
700
701
- def _gen_fig_with_subplots (batch_size : int , ncols : int , subplot_titles : List [str ]):
701
+ def _gen_fig_with_subplots (
702
+ batch_size : int , ncols : int , subplot_titles : List [str ]
703
+ ): # pragma: no cover
702
704
"""
703
705
Takes in the number of objects to be plotted and generate a plotly figure
704
706
with the appropriate number and orientation of titled subplots.
@@ -731,7 +733,7 @@ def _update_axes_bounds(
731
733
verts_center : torch .Tensor ,
732
734
max_expand : float ,
733
735
current_layout : go .Scene , # pyre-ignore[11]
734
- ):
736
+ ): # pragma: no cover
735
737
"""
736
738
Takes in the vertices' center point and max spread, and the current plotly figure
737
739
layout and updates the layout to have bounds that include all traces for that subplot.
@@ -769,7 +771,7 @@ def _update_axes_bounds(
769
771
770
772
def _scale_camera_to_bounds (
771
773
coordinate : float , axis_bounds : Tuple [float , float ], is_position : bool
772
- ):
774
+ ): # pragma: no cover
773
775
"""
774
776
We set our plotly plot's axes' bounding box to [-1,1]x[-1,1]x[-1,1]. As such,
775
777
the plotly camera location has to be scaled accordingly to have its world coordinates
0 commit comments