Katana Plug-in APIs 0.1
Public Member Functions

DrawableMesh Class Reference

#include <DrawableMesh.h>

List of all members.

Public Member Functions

void clearGLResources ()
 Releases any OpenGL resources held by this mesh.
void deleteShader ()
 Deletes the GLShaderProgram held by this mesh.
void setDrawAttribute (const std::string &name, FnAttribute::Attribute attr)
 Sets generic settings, eg. geometry data, color values, draw mode etc.
void draw ()
 Draw this object.
void pickerDraw (Foundry::Katana::ViewerUtils::GLShaderProgram &shaderProgram)
void setupGeometry (const FnAttribute::GroupAttribute &attributes)
void setupMaterials (const FnAttribute::GroupAttribute &attributes)
bool isValid () const
 Returns true if the mesh is fully set up and drawable.
Foundry::Katana::ViewerUtils::GLShaderProgramgetCustomShader () const
 Returns the custom GLSL shader for this location.

Detailed Description

This class represents an OpenGL mesh and it's associated objects and settings. Its settings (such as the view matrix to draw with) as well as the geometry information such as vertex positions, are specified using the setDrawAttribute() function.


Member Function Documentation

void DrawableMesh::pickerDraw ( Foundry::Katana::ViewerUtils::GLShaderProgram shaderProgram)

Draw this object for the picking framebuffer using the given shader program. The flat shaded color to draw the mesh with should be set already via setDrawAttribute().

void DrawableMesh::setupGeometry ( const FnAttribute::GroupAttribute attributes)

Inspects the passed attribute for a child called "geometry" and populates the OpenGL buffers as required.

void DrawableMesh::setupMaterials ( const FnAttribute::GroupAttribute attributes)

Inspects the passed attribute for a child called "material" and generates any materials, shaders or settings as required. This function allows you to override the GLSL shader program, by passing replacement code in the scene graph.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Typedefs Enumerations Enumerator