1 /*
  2   Copyright (c) 2008 Seneca College
  3   Licenced under the MIT License (http://www.c3dl.org/index.php/mit-license/)
  4 */
  5 
  6 
  7 /**
  8 	@class c3dl.RenderingObject is an object which is created dynamically 
  9 	and passed to the callback function defined within an effect when 
 10 	rendering objects.
 11 */
 12 c3dl.RenderingObject = function()
 13 {
 14 	// NOTE
 15 	// These methods are empty because we only want jsdoc toolkit creating 
 16 	// the doc files.  Within the renderer code, we create an instance of 
 17 	// this class and override these functions and provide the function
 18 	// definition. 
 19 	
 20 	// This is done because adding 
 21 	// setter functions would make this object not read-only.
 22 
 23 	/**
 24 		Get the rendering context. Within the callback function, the context
 25 		is used to do many things, some of which includes issuing commands to
 26 		set the uniform variables, set rendering states and render the 
 27 		geometry.
 28 		
 29 		@returns the rendering context.
 30 	*/
 31 	this.getContext = function(){}
 32 		
 33 	/**
 34 		Get the geometric object to render. The geometric object is composed
 35 		of primitive sets, so the list of primitive sets must be queried and
 36 		rendered.
 37 
 38 		@returns {c3dl.Geometry} the geometric object to render.
 39 	*/
 40 	this.getGeometry = function(){}
 41 
 42 	/**
 43 		Get the ID of the program object which is to be used to render the
 44 		geometry. Pass this value to the context's useProgram() function to
 45 		change the current rendering program.
 46 
 47 		@returns {int} the program object ID.
 48 	*/
 49 	this.getProgramObjectID = function(){}
 50 	
 51 	/**
 52 		Get the renderer used to render the geometry. The renderer will have 
 53 		useful state information as well as helper functions to easily set
 54 		uniform and vertex attribute variables.
 55 		
 56 		@returns {c3dl.OpenGLES20} the renderer used to render the geometry.
 57 	*/
 58 	this.getRenderer = function(){}
 59 }
 60