Skip to content

Commit

Permalink
deploy: 9096d19
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Nov 14, 2024
1 parent 1a98020 commit 06308a6
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 17 deletions.
Binary file modified latest/.doctrees/environment.pickle
Binary file not shown.
Binary file modified latest/.doctrees/scene_api.doctree
Binary file not shown.
Binary file modified latest/.doctrees/transforms.doctree
Binary file not shown.
29 changes: 22 additions & 7 deletions latest/_modules/viser/_scene_api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,11 @@ <h1>Source code for viser._scene_api</h1><div class="highlight"><pre>
<span class="sd"> (similar to Blender, 3DS Max, ROS, etc), the most common alternative is</span>
<span class="sd"> +Y (OpenGL, Maya, etc).</span>

<span class="sd"> In practice, the impact of this can improve (1) the ergonomics of</span>
<span class="sd"> camera controls, which will default to the same up direction as the</span>
<span class="sd"> scene, and (2) lighting, because the default lights and environment map</span>
<span class="sd"> are oriented to match the scene&#39;s up direction.</span>

<span class="sd"> Args:</span>
<span class="sd"> direction: New up direction. Can either be a string (one of +x, +y,</span>
<span class="sd"> +z, -x, -y, -z) or a length-3 direction vector.</span>
Expand Down Expand Up @@ -903,9 +908,19 @@ <h1>Source code for viser._scene_api</h1><div class="highlight"><pre>
<span class="n">background</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span>
<span class="n">background_blurriness</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">0.0</span><span class="p">,</span>
<span class="n">background_intensity</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">1.0</span><span class="p">,</span>
<span class="n">background_rotation</span><span class="p">:</span> <span class="nb">tuple</span><span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">float</span><span class="p">,</span> <span class="nb">float</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">),</span>
<span class="n">background_wxyz</span><span class="p">:</span> <span class="nb">tuple</span><span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">float</span><span class="p">,</span> <span class="nb">float</span><span class="p">,</span> <span class="nb">float</span><span class="p">]</span> <span class="o">|</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span> <span class="o">=</span> <span class="p">(</span>
<span class="mf">1.0</span><span class="p">,</span>
<span class="mf">0.0</span><span class="p">,</span>
<span class="mf">0.0</span><span class="p">,</span>
<span class="mf">0.0</span><span class="p">,</span>
<span class="p">),</span>
<span class="n">environment_intensity</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">1.0</span><span class="p">,</span>
<span class="n">environment_rotation</span><span class="p">:</span> <span class="nb">tuple</span><span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">float</span><span class="p">,</span> <span class="nb">float</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">),</span>
<span class="n">environment_wxyz</span><span class="p">:</span> <span class="nb">tuple</span><span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">float</span><span class="p">,</span> <span class="nb">float</span><span class="p">,</span> <span class="nb">float</span><span class="p">]</span> <span class="o">|</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span> <span class="o">=</span> <span class="p">(</span>
<span class="mf">1.0</span><span class="p">,</span>
<span class="mf">0.0</span><span class="p">,</span>
<span class="mf">0.0</span><span class="p">,</span>
<span class="mf">0.0</span><span class="p">,</span>
<span class="p">),</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Set the environment map for the scene. This will set some lights and background.</span>

Expand All @@ -914,19 +929,19 @@ <h1>Source code for viser._scene_api</h1><div class="highlight"><pre>
<span class="sd"> background: Show or hide the environment map in the background.</span>
<span class="sd"> background_blurriness: Blur factor of the environment map background (0-1).</span>
<span class="sd"> background_intensity: Intensity of the background.</span>
<span class="sd"> background_rotation: Rotation of the background in radians.</span>
<span class="sd"> background_wxyz: Orientation of the background.</span>
<span class="sd"> environment_intensity: Intensity of the environment lighting.</span>
<span class="sd"> environment_rotation: Rotation of the environment lighting in radians.</span>
<span class="sd"> environment_wxyz: Orientation of the environment lighting.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_websock_interface</span><span class="o">.</span><span class="n">queue_message</span><span class="p">(</span>
<span class="n">_messages</span><span class="o">.</span><span class="n">EnvironmentMapMessage</span><span class="p">(</span>
<span class="n">hdri</span><span class="o">=</span><span class="n">hdri</span><span class="p">,</span>
<span class="n">background</span><span class="o">=</span><span class="n">background</span><span class="p">,</span>
<span class="n">background_blurriness</span><span class="o">=</span><span class="n">background_blurriness</span><span class="p">,</span>
<span class="n">background_intensity</span><span class="o">=</span><span class="n">background_intensity</span><span class="p">,</span>
<span class="n">background_rotation</span><span class="o">=</span><span class="n">background_rotation</span><span class="p">,</span>
<span class="n">background_wxyz</span><span class="o">=</span><span class="n">cast_vector</span><span class="p">(</span><span class="n">background_wxyz</span><span class="p">,</span> <span class="mi">4</span><span class="p">),</span>
<span class="n">environment_intensity</span><span class="o">=</span><span class="n">environment_intensity</span><span class="p">,</span>
<span class="n">environment_rotation</span><span class="o">=</span><span class="n">environment_rotation</span><span class="p">,</span>
<span class="n">environment_wxyz</span><span class="o">=</span><span class="n">cast_vector</span><span class="p">(</span><span class="n">environment_wxyz</span><span class="p">,</span> <span class="mi">4</span><span class="p">),</span>
<span class="p">)</span>
<span class="p">)</span></div>

Expand All @@ -941,7 +956,7 @@ <h1>Source code for viser._scene_api</h1><div class="highlight"><pre>
<span class="sd"> see :meth:`SceneApi.set_environment_map()`.</span>

<span class="sd"> Args:</span>
<span class="sd"> enabled: True if user wants default lighting. False is user does</span>
<span class="sd"> enabled: True if user wants default lighting. False if user does</span>
<span class="sd"> not want default lighting.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_websock_interface</span><span class="o">.</span><span class="n">queue_message</span><span class="p">(</span><span class="n">_messages</span><span class="o">.</span><span class="n">EnableLightsMessage</span><span class="p">(</span><span class="n">enabled</span><span class="p">))</span></div>
Expand Down
7 changes: 3 additions & 4 deletions latest/_modules/viser/transforms/_so3/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ <h1>Source code for viser.transforms._so3</h1><div class="highlight"><pre>
<span></span><span class="kn">from</span> <span class="nn">__future__</span> <span class="kn">import</span> <span class="n">annotations</span>

<span class="kn">import</span> <span class="nn">dataclasses</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Tuple</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">NamedTuple</span><span class="p">,</span> <span class="n">Tuple</span>

<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">onp</span>
<span class="kn">import</span> <span class="nn">numpy.typing</span> <span class="k">as</span> <span class="nn">onpt</span>
Expand All @@ -395,8 +395,7 @@ <h1>Source code for viser.transforms._so3</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">.utils</span> <span class="kn">import</span> <span class="n">broadcast_leading_axes</span><span class="p">,</span> <span class="n">get_epsilon</span>


<span class="nd">@dataclasses</span><span class="o">.</span><span class="n">dataclass</span><span class="p">(</span><span class="n">frozen</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="k">class</span> <span class="nc">RollPitchYaw</span><span class="p">:</span>
<span class="k">class</span> <span class="nc">RollPitchYaw</span><span class="p">(</span><span class="n">NamedTuple</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Struct containing roll, pitch, and yaw Euler angles.&quot;&quot;&quot;</span>

<span class="n">roll</span><span class="p">:</span> <span class="n">onpt</span><span class="o">.</span><span class="n">NDArray</span><span class="p">[</span><span class="n">onp</span><span class="o">.</span><span class="n">floating</span><span class="p">]</span>
Expand Down Expand Up @@ -537,7 +536,7 @@ <h1>Source code for viser.transforms._so3</h1><div class="highlight"><pre>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Computes roll, pitch, and yaw angles. Uses the ZYX mobile robot convention.</span>

<span class="sd"> Returns:</span>
<span class="sd"> Named tuple containing Euler angles in radians.</span>
<span class="sd"> NamedTuple containing Euler angles in radians.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">RollPitchYaw</span><span class="p">(</span>
<span class="n">roll</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">compute_roll_radians</span><span class="p">(),</span>
Expand Down
Loading

0 comments on commit 06308a6

Please sign in to comment.