[Opengeoscience-developers] OpenGeoscience branch, add_point_source, updated. a8c603785b92b733dc1715189f64be62fb251e2c
Aashish Chaudhary
aashish.chaudhary at kitware.com
Fri Mar 8 17:13:12 EST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "OpenGeoscience".
The branch, add_point_source has been updated
via a8c603785b92b733dc1715189f64be62fb251e2c (commit)
from 7604fc3021c5177496dd4951cda3a87205037d97 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://public.kitware.com/gitweb?p=OpenGeoscience/opengeoscience.git;a=commitdiff;h=a8c603785b92b733dc1715189f64be62fb251e2c
commit a8c603785b92b733dc1715189f64be62fb251e2c
Author: Aashish Chaudhary <aashish.chaudhary at kitware.com>
AuthorDate: Fri Mar 8 17:12:32 2013 -0500
Commit: Aashish Chaudhary <aashish.chaudhary at kitware.com>
CommitDate: Fri Mar 8 17:12:32 2013 -0500
Added API to set solid color of the geometry
diff --git a/web/lib/vgl/mapper.js b/web/lib/vgl/mapper.js
index 30929b2..b2750a8 100644
--- a/web/lib/vgl/mapper.js
+++ b/web/lib/vgl/mapper.js
@@ -39,6 +39,7 @@ vglModule.mapper = function() {
vglModule.boundingObject.call(this);
var m_dirty = true;
+ var m_color = [ 1.0, 1.0, 1.0 ];
var m_geomData = 0;
var m_buffers = [];
var m_bufferVertexAttributeMap = {};
@@ -51,6 +52,27 @@ vglModule.mapper = function() {
};
/**
+ * Get solid color of the geometry
+ *
+ */
+ this.color = function() {
+ return m_color;
+ };
+
+ /**
+ * Set solid color of the geometry. Default is white [1.0, 1.0, 1.0]
+ *
+ * @param r Red component of the color [0.0 - 1.0]
+ * @param g Green component of the color [0.0 - 1.0]
+ * @param b Blue component of the color [0.0 - 1.0]
+ */
+ this.setColor = function(r, g, b) {
+ m_color[0] = r;
+ m_color[1] = g;
+ m_color[2] = br;
+ };
+
+ /**
* Return stored geometry data if any
*
*/
@@ -80,6 +102,9 @@ vglModule.mapper = function() {
setupDrawObjects(renderState);
}
+ // Fixed vertex color
+ gl.vertexAttrib3fv(vglModule.vertexAttributeKeys.Color, this.color());
+
// TODO Use renderState
var bufferIndex = 0;
var i = null;
-----------------------------------------------------------------------
Summary of changes:
web/lib/vgl/mapper.js | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
hooks/post-receive
--
OpenGeoscience
More information about the Opengeoscience-developers
mailing list