-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added docs for objImport and renderLoop
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |