File: info_data_types.rst

package info (click to toggle)
pyrr 0.10.3-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 956 kB
  • sloc: python: 5,865; makefile: 132; sh: 23
file content (42 lines) | stat: -rw-r--r-- 1,021 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
.. _data_types:

Data types
**********


.. _data_types_modules:

Modules
=======

Each data type resides in its own module named after the specified type.

Where there may be multiple versions of a data type, each version is located in its own module.

Functions which are able to handle all versions of a data type are located in the central module. Otherwise, functions reside in the specific data type's module.

For example:

    * **vector3.py** Provides functions for creating and manipulating 3D vectors (x,y,z).
    * **vector4.py** Provides functions for creating and manipulating 4D vectors (x,y,z,w).
    * **vector.py** Provides functions that work with both 3D and 4D vectors.


.. _data_types_conversion:

Conversion
==========

Data conversion functions are provided in the module of the type being converted to.

For example::

    # module matrix44.py
    def create_from_matrix33(mat) :
        pass

    def create_from_eulers(eulers):
        pass

    def create_from_quaternion(quat):
        pass