Skip to content

Commit

Permalink
Added docs for objImport and renderLoop
Browse files Browse the repository at this point in the history
  • Loading branch information
C1ffisme committed Sep 3, 2018
1 parent 3791ada commit 75f1bef
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
21 changes: 21 additions & 0 deletions doc/render/objImport.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# OBJ Import
_(objImport.py)_

### Description

OBJ Import contains a function for loading OBJ files and returning them in a way
that can be read by other functions.

## Functions

### importObj(directory)

This function creates a cube in the current PyBullet simulation.

*Arguments:*
- `directory` is a string leading from the working directory to the OBJ file.

*Returns:*
`objectvertexlist`

- `objectvertexlist` is a list of three-integer tuples. Each set of three tuples represents a triangle.
27 changes: 27 additions & 0 deletions doc/render/renderLoop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Render Loop
_(renderLoop.py)_

### Description

Render Loop contains the isolated functions required to render VBOs or arrays of
vertices.

## Functions

### render_loop(program, vertex_array, color_array)

This function serves two purposes: To create the world collisionbox and to return the vertices to make the triangles to render the world.

*Arguments:*
- `program` is the program you would like to use to render these arrays.
- `vertex_array` is a numpy array of vertices.
- `color_array` is a numpy array of RGB colors for each corresponding vertex.

### vbo_render(program, buffers, num_vertices)

This function serves two purposes: To create the world collisionbox and to return the vertices to make the triangles to render the world.

*Arguments:*
- `program` is the program you would like to use to render these arrays.
- `buffers` is a list containing the buffer locations returned by glGenBuffers().
- `num_vertices` is an integer representing the number of vertices.

0 comments on commit 75f1bef

Please sign in to comment.