|
Home Table of Contents News Dev Blogs Gallery Timeline Legend Tags Sponsors |
|
Join us on... |
|
|
|
Current: Month Day, Year
| name | description |
|---|---|
| vert_pos_buffes | reference to vertex buffer. |
| normal_buffer | reference to normal buffer. |
| tex_coord_buffer | reference to texture coordinates buffer (UV). |
| memory_pos | memory_pos holds the the value of the source numpy array for the verices (gl_coord). |
| len_memory | length in bytes of the vert_pos_buffer needed |
| name | parameters | returns | description |
|---|---|---|---|
| VertexBuffer | pos | None | creates the vertex buffer and puts the vertex-coordinates into that buffer. This buffer is used dynamic. |
| NormalBuffer | pos | None | creates the normal buffer and puts the normals into that buffer. |
| TexCoordBuffer | pos | None | creates the texture coordinates buffer and puts the values into that buffer. |
| GetBuffers | pos norm tpos | None | Calls VertexBuffer, NormalBuffer, TexCoordBuffer with the given values. |
| BindBuffersToShader | shader | None | set shader attribute buffer 0, 1 for vertex buffer and normal buffer, in case self.tex_coord_buffer this bound to 2. shader.enableAttributeArray is called in each case. |
| Tweak | None | None | Tweaks the vertex buffer with new values. |
| Delete | None | None | Deletes (destroys) the vertex, normal and tex_coord buffer. |
| name | description |
|---|---|
| parent | parent object, which is used to access multiple functions. |
| glob | reference to global object. |
| env | reference to environment object. |
| object | object to render. |
| boundingbox | reference to boundingbox. |
| glbuffers | reference to OpenGlBuffers object. |
| position | Current position as QVector3D. |
| functions | OpenGL functions from parent object. |
| shaders | reference to shaders from parent object. |
| texture | reference to diffuse texture (preset to None). |
| litsphere | reference to litsphere texture (preset to None). |
| aomap | reference to ambient occlusion map (preset to None). |
| nomap | reference to normal map (preset to None). |
| mrmap | reference to metal-roughness map (preset to None). |
| emmap | reference to emission map (preset to None). |
| mefac | metallic factor (Preset to 0). |
| z_depth | z-depth of object. |
| name | Name of the object. |
| getindex | Reference to index function (from object, getOpenGLIndex). Determines if hidden vertices are also used. |
| scale | Scale of the object. Preset to (1, 1, 1). |
| x_rotation | Rotation around x axis. Preset to 0.0. |
| y_rotation | Rotation around y axis. Preset to 0.0. |
| z_rotation | Rotation around z axis. Preset to 0.0. |
| mvp_matrix | empty MVP matrix for later use. |
| model_matrix | empty model matrix for later use. |
| normal_matrix | empty normal matrix for later use. |
| proxy | If type is proxy, proxy is linked to basemesh, otherwise it is linked to object (this is used for material selection). |
| name | parameters | returns | description |
|---|---|---|---|
| delete | None | None | Deletes the glBuffers of the object. |
| setMaterial | material modify (boolean) | None | set shader and creates textures from material according to shader type. All shaders use a diffuse texture, used objects are marked by proxy (which is either basemesh or object). Also colorates object and loads a mask if needed. |
| setTexture | texture | None | Setter for diffuse texture. |
| setPosition | pos | None | Setter for position. |
| setScale | scale | None | Setter for scale. |
| setXRotation | rot | None | Setter for x rotation. |
| setYRotation | rot | None | Setter for y rotation. |
| setZRotation | rot | None | Setter for z rotation. |
| geomToShader | shader proj_view_matrix campos | None | creates the geometry. It first get the uniforms uMvpMatrix, uModelMatrix, uNormalMatrix, viewPos from the shaders. Then binds the buffers to the shaders, sets model matrix to idendity and translates, rotates and scales object. Then the model view matrix and normal_matrix ist calculated. All uniform values not being -1 are set with setUniformValue. |
| glReset | None | None | resets shader by disabling certain parameters and sets glActiveTexture to gl.GL_TEXTURE0. |
| drawObject | None | None | get index from object and calls glDrawElements |
| draw | proj_view_matrix campos light xrayed boolean | None | The main draw function. GL_DEPTH_TEST is enabled. Then xrayed version is handled first with special shader. After that lightWeight is calculated (phong, specular focus). Next step is transparency. AlphaCoverage demands samples buffers, so if these are not given do not use alphaToCoverage, use BLEND instead. Blend function is set according to transparency. After that diffuse texture is always bind. The next steps are litsphere, for phong: AOTexture and NOTexture and for pbr all textures and skybox. Also glass parameters are set. Then drawObject is called and glReset. |
| drawWireframe | proj_view_matrix campos black white | None | creates a wireframe model, either uses an own shader 'wireframe' or the old glPolygonMode function for apple (which is internally a phong shader). glPolygonMode is used with glDrawElements twice with white and black. |
| name | description |
|---|---|
| functions | OpenGL functions from parent object. |
| shader | reference to shader. |
| name | Name of the object. |
| infront | Paint always in front. |
| position | Current position as QVector3D. |
| scale | Scale of the object. Preset to (1, 1, 1). |
| y_rotation | Rotation around y axis. Preset to 0.0. |
| mvp_matrix | empty MVP matrix for later use. |
| model_matrix | empty model matrix for later use. |
| normal_matrix | empty normal matrix for later use. |
| glbuffers | reference to OpenGlBuffers object. |
| indices | array of indices. |
| mvp_matrix_location | holds value of shader.uniforms["uMvpMatrix"] |
| model_matrix_location | holds value of shader.uniforms["uModelMatrix"] |
| name | parameters | returns | description |
|---|---|---|---|
| delete | None | None | Deletes the glBuffers of the object. |
| setPosition | pos | None | Setter for position. |
| setYRotation | rot | None | Setter for y rotation. |
| draw | proj_view_matrix | None | The main draw function. Creates the geometry and then binds the buffers to the shaders, sets model matrix to idendity and translates, rotates and scales object. Then the model view matrix and normal_matrix ist calculated. glDrawElements is called with indices. |
| name | description |
|---|---|
| functions | OpenGL functions from parent object. |
| name | Name of the object. |
| scale | Scale of the object. Preset to (1, 1, 1). |
| mvp_matrix | empty MVP matrix for later use. |
| model_matrix | empty model matrix for later use. |
| normal_matrix | empty normal matrix for later use. |
| rotation | rotation matrix. |
| position | Current position as QVector3D. |
| glbuffers | reference to OpenGlBuffers object. |
| indices | array of indices. |
| infront | Paint always in front. |
| transparent | Paint object transparent. |
| shader | Reference to phong shader. |
| mvp_matrix_location | holds value of shader.uniforms["uMvpMatrix"] |
| model_matrix_location | holds value of shader.uniforms["uModelMatrix"] |
| normal_matrix_location | holds value of shader.uniforms["uNormalMatrix"] |
| name | parameters | returns | description |
|---|---|---|---|
| setPosition | pos | None | Setter for position. |
| setScale | scale | None | Setter for scale. |
| setRotation | rot | None | Setter for rotation matrix. |
| delete | None | None | Deletes the glBuffers of the object. |
| draw | proj_view_matrix | None | The main draw function. Creates the geometry and then binds the buffers to the shaders, sets model matrix to idendity and translates, rotates and scales object. Then the model view matrix and normal_matrix ist calculated. Diffuse and AO-Texture are used. Object is either created in front or (disable depth test) or normal. Transparency is handled. glDrawElements is called with indices. Then all shaders are resetted. |