diff --git a/docs/index.rst b/docs/index.rst index c0266f47..852dc4aa 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -40,7 +40,7 @@ creation and resource loading simple. reference/resources reference/timers/index reference/utils/index - reference/scene/index + reference/scene Indices and tables diff --git a/docs/reference/scene.rst b/docs/reference/scene.rst new file mode 100644 index 00000000..b00e07f6 --- /dev/null +++ b/docs/reference/scene.rst @@ -0,0 +1,66 @@ + +.. py:module:: moderngl_window.scene + + +moderngl_window.scene +===================== + +.. autoclass:: Camera + :members: + +.. autoclass:: KeyboardCamera + :members: + :show-inheritance: + +.. autoclass:: OrbitCamera + :members: + :show-inheritance: + +.. autoclass:: Scene + :members: + +.. autoclass:: Node + :members: + +.. autoclass:: Mesh + :members: + +.. autoclass:: Material + :members: + +.. autoclass:: MaterialTexture + :members: + +.. autoclass:: MeshProgram + :members: + +Mesh Programs +------------- + +.. autoclass:: moderngl_window.scene.programs.VertexColorProgram + :members: + :show-inheritance: + +.. autoclass:: moderngl_window.scene.programs.ColorLightProgram + :members: + :show-inheritance: + +.. autoclass:: moderngl_window.scene.programs.TextureProgram + :members: + :show-inheritance: + +.. autoclass:: moderngl_window.scene.programs.TextureVertexColorProgram + :members: + :show-inheritance: + +.. autoclass:: moderngl_window.scene.programs.TextureLightProgram + :members: + :show-inheritance: + +.. autoclass:: moderngl_window.scene.programs.TextureLightColorProgram + :members: + :show-inheritance: + +.. autoclass:: moderngl_window.scene.programs.FallbackProgram + :members: + :show-inheritance: diff --git a/docs/reference/scene/camera.rst b/docs/reference/scene/camera.rst deleted file mode 100644 index acfc3eca..00000000 --- a/docs/reference/scene/camera.rst +++ /dev/null @@ -1,24 +0,0 @@ - -.. py:module:: moderngl_window.scene - -Camera -====== - -.. autodata:: Camera - :annotation: - -Methods -------- - -.. automethod:: Camera.__init__ -.. automethod:: Camera.set_position -.. automethod:: Camera.set_rotation -.. automethod:: Camera.look_at - -Attributes ----------- - -.. autoattribute:: Camera.pitch -.. autoattribute:: Camera.yaw -.. autoattribute:: Camera.matrix -.. autoattribute:: Camera.projection diff --git a/docs/reference/scene/index.rst b/docs/reference/scene/index.rst deleted file mode 100644 index 4a3b73ea..00000000 --- a/docs/reference/scene/index.rst +++ /dev/null @@ -1,15 +0,0 @@ - -moderngl_window.scene -===================== - -.. toctree:: - :maxdepth: 2 - - camera - keyboardcamera - scene - node - mesh - material - materialtexture - meshprogram diff --git a/docs/reference/scene/keyboardcamera.rst b/docs/reference/scene/keyboardcamera.rst deleted file mode 100644 index efb56b3e..00000000 --- a/docs/reference/scene/keyboardcamera.rst +++ /dev/null @@ -1,35 +0,0 @@ - -.. py:module:: moderngl_window.scene - -KeyboardCamera -============== - -.. autodata:: KeyboardCamera - :annotation: - -Methods -------- - -.. automethod:: KeyboardCamera.__init__ -.. automethod:: KeyboardCamera.key_input -.. automethod:: KeyboardCamera.set_position -.. automethod:: KeyboardCamera.set_rotation -.. automethod:: KeyboardCamera.look_at -.. automethod:: KeyboardCamera.move_left -.. automethod:: KeyboardCamera.move_right -.. automethod:: KeyboardCamera.move_forward -.. automethod:: KeyboardCamera.move_backward -.. automethod:: KeyboardCamera.move_up -.. automethod:: KeyboardCamera.move_down -.. automethod:: KeyboardCamera.move_state -.. automethod:: KeyboardCamera.rot_state - -Attributes ----------- - -.. autoattribute:: KeyboardCamera.pitch -.. autoattribute:: KeyboardCamera.yaw -.. autoattribute:: KeyboardCamera.matrix -.. autoattribute:: KeyboardCamera.mouse_sensitivity -.. autoattribute:: KeyboardCamera.velocity -.. autoattribute:: KeyboardCamera.projection diff --git a/docs/reference/scene/material.rst b/docs/reference/scene/material.rst deleted file mode 100644 index 5a5f659a..00000000 --- a/docs/reference/scene/material.rst +++ /dev/null @@ -1,22 +0,0 @@ - -.. py:module:: moderngl_window.scene - -Material -======== - -.. autodata:: Material - :annotation: - -Methods -------- - -.. automethod:: Material.__init__ -.. automethod:: Material.release - -Attributes ----------- - -.. autoattribute:: Material.name -.. autoattribute:: Material.color -.. autoattribute:: Material.mat_texture -.. autoattribute:: Material.double_sided diff --git a/docs/reference/scene/materialtexture.rst b/docs/reference/scene/materialtexture.rst deleted file mode 100644 index d27c4bc9..00000000 --- a/docs/reference/scene/materialtexture.rst +++ /dev/null @@ -1,19 +0,0 @@ - -.. py:module:: moderngl_window.scene - -MaterialTexture -=============== - -.. autodata:: MaterialTexture - :annotation: - -Methods -------- - -.. automethod:: MaterialTexture.__init__ - -Attributes ----------- - -.. autoattribute:: MaterialTexture.texture -.. autoattribute:: MaterialTexture.sampler diff --git a/docs/reference/scene/mesh.rst b/docs/reference/scene/mesh.rst deleted file mode 100644 index 31adffc3..00000000 --- a/docs/reference/scene/mesh.rst +++ /dev/null @@ -1,19 +0,0 @@ - -.. py:module:: moderngl_window.scene - -Mesh -==== - -.. autodata:: Mesh - -Methods -------- - -.. automethod:: Mesh.__init__ -.. automethod:: Mesh.draw -.. automethod:: Mesh.draw_bbox -.. automethod:: Mesh.draw_wireframe -.. automethod:: Mesh.add_attribute -.. automethod:: Mesh.calc_global_bbox -.. automethod:: Mesh.has_normals -.. automethod:: Mesh.has_uvs diff --git a/docs/reference/scene/meshprogram.rst b/docs/reference/scene/meshprogram.rst deleted file mode 100644 index 17741f8c..00000000 --- a/docs/reference/scene/meshprogram.rst +++ /dev/null @@ -1,20 +0,0 @@ - -.. py:module:: moderngl_window.scene - -MeshProgram -=========== - -.. autodata:: MeshProgram - :annotation: - -Methods -------- - -.. automethod:: MeshProgram.__init__ -.. automethod:: MeshProgram.draw -.. automethod:: MeshProgram.apply - -Attributes ----------- - -.. autoattribute:: MeshProgram.ctx diff --git a/docs/reference/scene/node.rst b/docs/reference/scene/node.rst deleted file mode 100644 index c1dcaaf9..00000000 --- a/docs/reference/scene/node.rst +++ /dev/null @@ -1,29 +0,0 @@ - -.. py:module:: moderngl_window.scene - -Node -==== - -.. autodata:: Node - :annotation: - -Methods -------- - -.. automethod:: Node.__init__ -.. automethod:: Node.add_child -.. automethod:: Node.draw -.. automethod:: Node.draw_bbox -.. automethod:: Node.draw_wireframe -.. automethod:: Node.calc_global_bbox -.. automethod:: Node.calc_model_mat - -Attributes ----------- - -.. autoattribute:: Node.name -.. autoattribute:: Node.mesh -.. autoattribute:: Node.camera -.. autoattribute:: Node.matrix -.. autoattribute:: Node.matrix_global -.. autoattribute:: Node.children diff --git a/docs/reference/scene/scene.rst b/docs/reference/scene/scene.rst deleted file mode 100644 index 0ffef881..00000000 --- a/docs/reference/scene/scene.rst +++ /dev/null @@ -1,26 +0,0 @@ - -.. py:module:: moderngl_window.scene - -Scene -===== - -Methods -------- - -.. automethod:: Scene.__init__ -.. automethod:: Scene.draw -.. automethod:: Scene.draw_bbox -.. automethod:: Scene.draw_wireframe -.. automethod:: Scene.apply_mesh_programs -.. automethod:: Scene.calc_scene_bbox -.. automethod:: Scene.find_material -.. automethod:: Scene.find_node -.. automethod:: Scene.prepare -.. automethod:: Scene.destroy -.. automethod:: Scene.release - -Attributes ----------- - -.. autoattribute:: Scene.ctx -.. autoattribute:: Scene.matrix diff --git a/moderngl_window/scene/__init__.py b/moderngl_window/scene/__init__.py index 7c69146e..8c88aa40 100644 --- a/moderngl_window/scene/__init__.py +++ b/moderngl_window/scene/__init__.py @@ -1,9 +1,21 @@ -# pylint: disable = missing-docstring from .camera import Camera as Camera from .camera import KeyboardCamera as KeyboardCamera +from .camera import OrbitCamera as OrbitCamera from .material import Material as Material from .material import MaterialTexture as MaterialTexture from .mesh import Mesh as Mesh from .node import Node as Node from .programs import MeshProgram as MeshProgram from .scene import Scene as Scene + +__all__ = [ + "Camera", + "KeyboardCamera", + "OrbitCamera", + "Material", + "MaterialTexture", + "Mesh", + "Node", + "MeshProgram", + "Scene", +]