[cig-commits] commit: modified this to properly include the opacity variable

Mercurial hg at geodynamics.org
Mon Nov 24 11:28:57 PST 2008


changeset:   22:d52d1d39d0d9
user:        WendySharples
date:        Sun Sep 09 01:06:43 2007 +0000
files:       DrawingObjects/src/SwarmRGBColourViewer.c
description:
modified this to properly include the opacity variable


diff -r 6c75ca7ee07b -r d52d1d39d0d9 DrawingObjects/src/SwarmRGBColourViewer.c
--- a/DrawingObjects/src/SwarmRGBColourViewer.c	Mon Aug 06 06:29:23 2007 +0000
+++ b/DrawingObjects/src/SwarmRGBColourViewer.c	Sun Sep 09 01:06:43 2007 +0000
@@ -267,7 +267,7 @@ void _lucSwarmRGBColourViewer_SetParticl
 	double                   colourValueRed        = 0.0;
 	double                   colourValueGreen      = 0.0;
 	double                   colourValueBlue       = 0.0;
-
+	double					 opacity = 0.0;
 	/* Get red colour */
 	if ( self->colourRedVariable){
 		SwarmVariable_ValueAt( self->colourRedVariable, lParticle_I, &colourValueRed );
@@ -286,9 +286,14 @@ void _lucSwarmRGBColourViewer_SetParticl
 		SwarmVariable_ValueAt( self->colourBlueVariable, lParticle_I, &colourValueBlue );
 		(self->colour).blue = colourValueBlue;
 	}
-
-	
-	lucColourMap_SetOpenGLColourFromRGB_ExplicitOpacity( (self->colour).red, (self->colour).green, (self->colour).blue, (float)(self->colour).opacity );
+	
+	//added this in
+	/* Get Opacity Value */
+	if ( self->opacityVariable ){
+		SwarmVariable_ValueAt( self->opacityVariable, lParticle_I, &opacity );
+		(self->colour).opacity = (float)opacity;	
+	}
+	lucColourMap_SetOpenGLColourFromRGB_ExplicitOpacity( (self->colour).red, (self->colour).green, (self->colour).blue, (self->colour).opacity );
 }
 
 



More information about the CIG-COMMITS mailing list