SplatCloudObject.cc 19.2 KB
Newer Older
Jan Möbius's avatar
Jan Möbius committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
/*===========================================================================*\
*                                                                            *
*                              OpenFlipper                                   *
*      Copyright (C) 2001-2011 by Computer Graphics Group, RWTH Aachen       *
*                           www.openflipper.org                              *
*                                                                            *
*--------------------------------------------------------------------------- *
*  This file is part of OpenFlipper.                                         *
*                                                                            *
*  OpenFlipper is free software: you can redistribute it and/or modify       *
*  it under the terms of the GNU Lesser General Public License as            *
*  published by the Free Software Foundation, either version 3 of            *
*  the License, or (at your option) any later version with the               *
*  following exceptions:                                                     *
*                                                                            *
*  If other files instantiate templates or use macros                        *
*  or inline functions from this file, or you compile this file and          *
*  link it with other files to produce an executable, this file does         *
*  not by itself cause the resulting executable to be covered by the         *
*  GNU Lesser General Public License. This exception does not however        *
*  invalidate any other reasons why the executable file might be             *
*  covered by the GNU Lesser General Public License.                         *
*                                                                            *
*  OpenFlipper is distributed in the hope that it will be useful,            *
*  but WITHOUT ANY WARRANTY; without even the implied warranty of            *
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
*  GNU Lesser General Public License for more details.                       *
*                                                                            *
*  You should have received a copy of the GNU LesserGeneral Public           *
*  License along with OpenFlipper. If not,                                   *
*  see <http://www.gnu.org/licenses/>.                                       *
*                                                                            *
\*===========================================================================*/

/*===========================================================================*\
*                                                                            *
*   $Revision$                                                       *
*   $LastChangedBy$                                                *
*   $Date$                     *
*                                                                            *
\*===========================================================================*/

//================================================================
//
//  SplatCloudObject
//
//================================================================


#define SPLATCLOUDOBJECT_C


//== INCLUDES ====================================================


#include "SplatCloud.hh"
#include <OpenFlipper/common/Types.hh>
#include <OpenFlipper/common/GlobalOptions.hh>
59
#include <OpenFlipper/BasePlugin/PluginFunctions.hh>
Jan Möbius's avatar
Jan Möbius committed
60 61 62 63
#include <ACG/Scenegraph/DrawModes.hh>
#include <QString>


Jan Möbius's avatar
Jan Möbius committed
64 65 66 67 68 69
//== DEFINES =====================================================


//#define REPORT_UPDATE_TYPE


Jan Möbius's avatar
Jan Möbius committed
70 71 72 73 74 75 76 77 78 79 80 81 82 83
//== IMPLEMENTATION ==============================================


/** Constructor for SplatCloud Objects. This object class gets a Separator Node giving
 *  the root node to which it should be connected. The SplatCloud is generated internally
 *  and all nodes for visualization will be added below the scenegraph node.\n
 *  You dont need to create an object of this type manually. Use
 *  PluginFunctions::addSplatCloud instead. ( see Types.hh::DataType )
 */
SplatCloudObject::SplatCloudObject() : 
BaseObjectData         (       ), 
backfaceCullingEnabled_( false ), 
pointsizeScale_        ( 1.0f  ), 
shaderNode_            ( 0     ), 
84
splatCloudNode_        ( 0     ) 
Jan Möbius's avatar
Jan Möbius committed
85
{
86 87 88 89 90 91 92
	// allocate memory for splat cloud
	splatCloud_ = new SplatCloud;
	if( !splatCloud_ )
	{
		std::cerr << "SplatCloudObject::SplatCloudObject() : Out of memory." << std::endl;
	}

Jan Möbius's avatar
Jan Möbius committed
93 94 95 96 97 98 99 100 101 102 103 104
	setDataType( DATA_SPLATCLOUD );
	setTypeIcon( DATA_SPLATCLOUD, "SplatCloudType.png" );
	init();
}


//----------------------------------------------------------------


/**
 * Copy Constructor - generates a copy of the given object
 */
105
SplatCloudObject::SplatCloudObject( const SplatCloudObject &_object ) : BaseObjectData( _object )
Jan Möbius's avatar
Jan Möbius committed
106
{
107
	init( _object.splatCloud_ );
Jan Möbius's avatar
Jan Möbius committed
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
	setName( name() );
}


//----------------------------------------------------------------


/** Destructor for SplatCloud Objects. The destructor deletes the Line and all
 *  Scenegraph nodes associated with the SplatCloud or the object.
 */
SplatCloudObject::~SplatCloudObject()
{
	// Delete the data attached to this object ( this will remove all perObject data)
	// Not the best way to do it but it will work.
	// This is only necessary if people use references to the SplatCloud below and
	// they do something with the SplatCloud in the destructor of their
	// perObjectData.
	deleteData();

	// No need to delete the scenegraph Nodes as this will be managed by baseplugin
128
	shaderNode_     = 0;
Jan Möbius's avatar
Jan Möbius committed
129
	splatCloudNode_ = 0;
130 131 132 133

	// free memory of splat cloud
	delete splatCloud_;
	splatCloud_ = 0;
Jan Möbius's avatar
Jan Möbius committed
134 135 136 137 138 139 140 141 142 143 144 145 146
}


//----------------------------------------------------------------


/** Cleanup Function for SplatCloud Objects. Deletes the contents of the whole object and
 * calls SplatCloudObject::init afterwards.
 */
void SplatCloudObject::cleanup()
{
	BaseObjectData::cleanup();

147
	shaderNode_     = 0;
Jan Möbius's avatar
Jan Möbius committed
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
	splatCloudNode_ = 0;

	init();
}


//----------------------------------------------------------------


/**
 * Generate a copy
 */
BaseObject *SplatCloudObject::copy()
{
	SplatCloudObject *object = new SplatCloudObject( *this );
	return dynamic_cast<BaseObject *>( object );
}


//----------------------------------------------------------------


/**
 * Reload shaders from file
 */
void SplatCloudObject::reloadShaders()
{
	// standard shader filenames
	static const char SPLATS_VERTEXSHADER_FILENAME[]   = "SplatCloud_Splats/Vertex.glsl";
	static const char SPLATS_FRAGMENTSHADER_FILENAME[] = "SplatCloud_Splats/Fragment.glsl";
	static const char DOTS_VERTEXSHADER_FILENAME[]     = "SplatCloud_Dots/Vertex.glsl";
	static const char DOTS_FRAGMENTSHADER_FILENAME[]   = "SplatCloud_Dots/Fragment.glsl";
	static const char POINTS_VERTEXSHADER_FILENAME[]   = "SplatCloud_Points/Vertex.glsl";
	static const char POINTS_FRAGMENTSHADER_FILENAME[] = "SplatCloud_Points/Fragment.glsl";

	// picking shader filenames
	static const char SPLATS_PICK_VERTEXSHADER_FILENAME[]   = "SplatCloud_Splats/PickVertex.glsl";
	static const char SPLATS_PICK_FRAGMENTSHADER_FILENAME[] = "SplatCloud_Splats/Fragment.glsl";
	static const char DOTS_PICK_VERTEXSHADER_FILENAME[]     = "SplatCloud_Dots/PickVertex.glsl";
	static const char DOTS_PICK_FRAGMENTSHADER_FILENAME[]   = "SplatCloud_Dots/Fragment.glsl";
	static const char POINTS_PICK_VERTEXSHADER_FILENAME[]   = "SplatCloud_Points/PickVertex.glsl";
	static const char POINTS_PICK_FRAGMENTSHADER_FILENAME[] = "SplatCloud_Points/Fragment.glsl";

	// get drawmodes
	ACG::SceneGraph::DrawModes::DrawMode splatsDrawMode = ACG::SceneGraph::DrawModes::getDrawMode( "Splats" );
	ACG::SceneGraph::DrawModes::DrawMode dotsDrawMode   = ACG::SceneGraph::DrawModes::getDrawMode( "Dots"   );
	ACG::SceneGraph::DrawModes::DrawMode pointsDrawMode = ACG::SceneGraph::DrawModes::getDrawMode( "Points" );

	// if drawmodes don't exist something went wrong
	if( splatsDrawMode == ACG::SceneGraph::DrawModes::NONE || 
198 199
	    dotsDrawMode   == ACG::SceneGraph::DrawModes::NONE || 
	    pointsDrawMode == ACG::SceneGraph::DrawModes::NONE )
Jan Möbius's avatar
Jan Möbius committed
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
	{
		std::cerr << "Shader DrawModes for SplatCloud not existent!" << std::endl;
		return;
	}

	// get shader directory
	QString shaderDir =	OpenFlipper::Options::shaderDirStr() + 
						OpenFlipper::Options::dirSeparator();
	std::string shaderDirectory = std::string( shaderDir.toUtf8() );

	// set shader directory
	shaderNode_->setShaderDir( shaderDirectory );

	// load shaders

	if( QFile( shaderDir + SPLATS_VERTEXSHADER_FILENAME        ).exists() && 
216 217 218
	    QFile( shaderDir + SPLATS_PICK_VERTEXSHADER_FILENAME   ).exists() &&
	    QFile( shaderDir + SPLATS_FRAGMENTSHADER_FILENAME      ).exists() &&
	    QFile( shaderDir + SPLATS_PICK_FRAGMENTSHADER_FILENAME ).exists() )
Jan Möbius's avatar
Jan Möbius committed
219 220 221 222 223 224 225 226 227 228 229
	{
		shaderNode_->setShader( splatsDrawMode, 
			SPLATS_VERTEXSHADER_FILENAME,      SPLATS_FRAGMENTSHADER_FILENAME, 
			SPLATS_PICK_VERTEXSHADER_FILENAME, SPLATS_PICK_FRAGMENTSHADER_FILENAME );
	}
	else
	{
		std::cerr << "Shader Files for SplatCloud/Splats not found!" << std::endl;
	}

	if( QFile( shaderDir + DOTS_VERTEXSHADER_FILENAME        ).exists() && 
230 231 232
	    QFile( shaderDir + DOTS_PICK_VERTEXSHADER_FILENAME   ).exists() &&
	    QFile( shaderDir + DOTS_FRAGMENTSHADER_FILENAME      ).exists() &&
	    QFile( shaderDir + DOTS_PICK_FRAGMENTSHADER_FILENAME ).exists() )
Jan Möbius's avatar
Jan Möbius committed
233 234 235 236 237 238 239 240 241 242 243
	{
		shaderNode_->setShader( dotsDrawMode, 
			DOTS_VERTEXSHADER_FILENAME,      DOTS_FRAGMENTSHADER_FILENAME, 
			DOTS_PICK_VERTEXSHADER_FILENAME, DOTS_PICK_FRAGMENTSHADER_FILENAME );
	}
	else
	{
		std::cerr << "Shader Files for SplatCloud/Dots not found!" << std::endl;
	}

	if( QFile( shaderDir + POINTS_VERTEXSHADER_FILENAME        ).exists() && 
Jan Möbius's avatar
Jan Möbius committed
244 245 246
	    QFile( shaderDir + POINTS_PICK_VERTEXSHADER_FILENAME   ).exists() &&
	    QFile( shaderDir + POINTS_FRAGMENTSHADER_FILENAME      ).exists() &&
	    QFile( shaderDir + POINTS_PICK_FRAGMENTSHADER_FILENAME ).exists() )
Jan Möbius's avatar
Jan Möbius committed
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
	{
		shaderNode_->setShader( pointsDrawMode, 
			POINTS_VERTEXSHADER_FILENAME,      POINTS_FRAGMENTSHADER_FILENAME, 
			POINTS_PICK_VERTEXSHADER_FILENAME, POINTS_PICK_FRAGMENTSHADER_FILENAME );
	}
	else
	{
		std::cerr << "Shader Files for SplatCloud/Points not found!" << std::endl;
	}
}


//----------------------------------------------------------------


/**
 * Enable or disable backface culling
 */
void SplatCloudObject::enableBackfaceCulling( bool _enable )
{
	// get drawmodes
	ACG::SceneGraph::DrawModes::DrawMode splatsDrawMode = ACG::SceneGraph::DrawModes::getDrawMode( "Splats" );
	ACG::SceneGraph::DrawModes::DrawMode dotsDrawMode   = ACG::SceneGraph::DrawModes::getDrawMode( "Dots"   );
	ACG::SceneGraph::DrawModes::DrawMode pointsDrawMode = ACG::SceneGraph::DrawModes::getDrawMode( "Points" );

	// if drawmodes don't exist something went wrong
	if( splatsDrawMode == ACG::SceneGraph::DrawModes::NONE || 
274 275
	    dotsDrawMode   == ACG::SceneGraph::DrawModes::NONE || 
	    pointsDrawMode == ACG::SceneGraph::DrawModes::NONE )
Jan Möbius's avatar
Jan Möbius committed
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351
	{
		std::cerr << "Shader DrawModes for SplatCloud not existent!" << std::endl;
		return;
	}

	// get standard and picking shaders
	GLSL::PtrProgram splatsShader     = shaderNode_->getShader( splatsDrawMode, false );
	GLSL::PtrProgram splatsPickShader = shaderNode_->getShader( splatsDrawMode, true  );
	GLSL::PtrProgram dotsShader       = shaderNode_->getShader( dotsDrawMode,   false );
	GLSL::PtrProgram dotsPickShader   = shaderNode_->getShader( dotsDrawMode,   true  );
	GLSL::PtrProgram pointsShader     = shaderNode_->getShader( pointsDrawMode, false );
	GLSL::PtrProgram pointsPickShader = shaderNode_->getShader( pointsDrawMode, true  );

	// update backface-culling uniform of shaders

	backfaceCullingEnabled_ = _enable;
	GLint backfaceCulling = (GLint) _enable;

	if( splatsShader )
	{
		splatsShader->use();
		splatsShader->setUniform( "backfaceCulling", backfaceCulling );
		splatsShader->disable();
	}

	if( splatsPickShader )
	{
		splatsPickShader->use();
		splatsPickShader->setUniform( "backfaceCulling", backfaceCulling );
		splatsPickShader->disable();
	}

	if( dotsShader )
	{
		dotsShader->use();
		dotsShader->setUniform( "backfaceCulling", backfaceCulling );
		dotsShader->disable();
	}

	if( dotsPickShader )
	{
		dotsPickShader->use();
		dotsPickShader->setUniform( "backfaceCulling", backfaceCulling );
		dotsPickShader->disable();
	}

	if( pointsShader )
	{
		pointsShader->use();
		pointsShader->setUniform( "backfaceCulling", backfaceCulling );
		pointsShader->disable();
	}

	if( pointsPickShader )
	{
		pointsPickShader->use();
		pointsPickShader->setUniform( "backfaceCulling", backfaceCulling );
		pointsPickShader->disable();
	}
}


//----------------------------------------------------------------


/**
 * Set scale for point sizes
 */
void SplatCloudObject::setPointsizeScale( float _scale )
{
	// get drawmodes
	ACG::SceneGraph::DrawModes::DrawMode splatsDrawMode = ACG::SceneGraph::DrawModes::getDrawMode( "Splats" );
	ACG::SceneGraph::DrawModes::DrawMode dotsDrawMode   = ACG::SceneGraph::DrawModes::getDrawMode( "Dots"   );

	// if drawmodes don't exist something went wrong
	if( splatsDrawMode == ACG::SceneGraph::DrawModes::NONE || 
352
	    dotsDrawMode   == ACG::SceneGraph::DrawModes::NONE )
Jan Möbius's avatar
Jan Möbius committed
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403
	{
		std::cerr << "Shader DrawModes for SplatCloud not existent!" << std::endl;
		return;
	}

	// get standard and picking shaders
	GLSL::PtrProgram splatsShader     = shaderNode_->getShader( splatsDrawMode, false );
	GLSL::PtrProgram splatsPickShader = shaderNode_->getShader( splatsDrawMode, true  );
	GLSL::PtrProgram dotsShader       = shaderNode_->getShader( dotsDrawMode,   false );
	GLSL::PtrProgram dotsPickShader   = shaderNode_->getShader( dotsDrawMode,   true  );

	// update pointsize-scale uniform of shaders

	pointsizeScale_ = _scale;
	GLfloat pointsizeScale = (GLfloat) _scale;

	if( splatsShader )
	{
		splatsShader->use();
		splatsShader->setUniform( "pointsizeScale", pointsizeScale );
		splatsShader->disable();
	}

	if( splatsPickShader )
	{
		splatsPickShader->use();
		splatsPickShader->setUniform( "pointsizeScale", pointsizeScale );
		splatsPickShader->disable();
	}

	if( dotsShader )
	{
		dotsShader->use();
		dotsShader->setUniform( "pointsizeScale", pointsizeScale );
		dotsShader->disable();
	}

	if( dotsPickShader )
	{
		dotsPickShader->use();
		dotsPickShader->setUniform( "pointsizeScale", pointsizeScale );
		dotsPickShader->disable();
	}
}


//----------------------------------------------------------------


/** This function initalizes the SplatCloud object. It creates the scenegraph nodes.
*/
404
void SplatCloudObject::init( const SplatCloud *_splatCloud )
Jan Möbius's avatar
Jan Möbius committed
405 406 407 408
{
	if( materialNode() == NULL )
		std::cerr << "Error when creating SplatCloud Object! materialNode is NULL!" << std::endl;

409 410 411 412
	// if _splatCloud is *not* 0, copy it's contents
	if( _splatCloud )
	{
		delete splatCloud_;
Jan Möbius's avatar
Jan Möbius committed
413

414 415 416 417 418 419
		splatCloud_ = new SplatCloud( *_splatCloud );
		if( !splatCloud_ )
		{
			std::cerr << "SplatCloudObject::init() : Out of memory." << std::endl;
		}
	}
Jan Möbius's avatar
Jan Möbius committed
420

421 422
	// if something went wrong during initialization, abort
	if( !splatCloud_ )
Jan Möbius's avatar
Jan Möbius committed
423
	{
424 425 426
		shaderNode_     = 0;
		splatCloudNode_	= 0;
		return;
Jan Möbius's avatar
Jan Möbius committed
427
	}
428 429 430 431 432 433 434

	// create new scenegraph nodes
	shaderNode_     = new ShaderNode    (               materialNode(), "NEW ShaderNode for" );
	splatCloudNode_	= new SplatCloudNode( *splatCloud_, shaderNode_,    "NEW SplatCloudNode" );

	// load shaders
	reloadShaders();
Jan Möbius's avatar
Jan Möbius committed
435 436 437
}


Jan Möbius's avatar
Jan Möbius committed
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513
//----------------------------------------------------------------


/**
 * Update object and scenegraph nodes
 */
void SplatCloudObject::update( UpdateType _type )
{
	if( _type == UPDATE_ALL )
	{
#		ifdef REPORT_UPDATE_TYPE
		std::cout << "SplatCloudObject::update() : UPDATE_ALL" << std::endl;
		std::cout << std::endl;
#		endif

		if( splatCloudNode_ )
			splatCloudNode_->modifiedAll();
		return;
	}

	if( _type.contains( UPDATE_GEOMETRY ) )
	{
#		ifdef REPORT_UPDATE_TYPE
		std::cout << "SplatCloudObject::update() : UPDATE_GEOMETRY" << std::endl;
#		endif

		if( splatCloudNode_ )
			splatCloudNode_->modifiedPoints();
	}

	if( _type.contains( updateType("Normals") ) )
	{
#		ifdef REPORT_UPDATE_TYPE
		std::cout << "SplatCloudObject::update() : UPDATE_Normals" << std::endl;
#		endif

		if( splatCloudNode_ )
			splatCloudNode_->modifiedNormals();
	}

	if( _type.contains( updateType("Pointsizes") ) )
	{
#		ifdef REPORT_UPDATE_TYPE
		std::cout << "SplatCloudObject::update() : UPDATE_Pointsizes" << std::endl;
#		endif

		if( splatCloudNode_ )
			splatCloudNode_->modifiedPointsizes();
	}

	if( _type.contains( UPDATE_COLOR ) )
	{
#		ifdef REPORT_UPDATE_TYPE
		std::cout << "SplatCloudObject::update() : UPDATE_COLOR" << std::endl;
#		endif

		if( splatCloudNode_ )
			splatCloudNode_->modifiedColors();
	}

	if( _type.contains( UPDATE_SELECTION ) )
	{
#		ifdef REPORT_UPDATE_TYPE
		std::cout << "SplatCloudObject::update() : UPDATE_SELECTION" << std::endl;
#		endif

		if( splatCloudNode_ )
			splatCloudNode_->modifiedSelections();
	}

#	ifdef REPORT_UPDATE_TYPE
	std::cout << std::endl;
#	endif
}


Jan Möbius's avatar
Jan Möbius committed
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555
//----------------------------------------------------------------
//  Name/Path Handling
//----------------------------------------------------------------


/** Set the name of an object. All Scenegraph nodes are renamed too. It also calls
* BaseObjectData::setName.
*/
void SplatCloudObject::setName( QString _name )
{
	BaseObjectData::setName( _name );

	std::string nodename;

	nodename = std::string( "ShaderNode for SplatCloud " + _name.toUtf8() );
	shaderNode_->name( nodename );

	nodename = std::string( "SplatCloudNode for SplatCloud " + _name.toUtf8() );
	splatCloudNode_->name( nodename );
}


//----------------------------------------------------------------
//  Object information
//----------------------------------------------------------------


/** Returns a string containing all information about the current object. This also
* includes the information provided by BaseObjectData::getObjectinfo
*
* @return String containing the object information
*/
QString SplatCloudObject::getObjectinfo()
{
	QString output;

	output += "========================================================================\n";
	output += BaseObjectData::getObjectinfo();

	if( dataType( DATA_SPLATCLOUD ) )
	{
		output += "Object Contains SplatCloud : ";
556

557
		if( splatCloud_ )
558
		{
559 560 561 562
			output += " # points: " + QString::number( splatCloud_->numPoints() );
			output += ", normals used: ";    output += splatCloud_->hasNormals()    ? "true" : "false";
			output += ", pointsizes used: "; output += splatCloud_->hasPointsizes() ? "true" : "false";
			output += ", colors used: ";     output += splatCloud_->hasColors()     ? "true" : "false";
563 564
		}

Jan Möbius's avatar
Jan Möbius committed
565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606
		output += "\n";
	}

	output += "========================================================================\n";
	return output;
}


//----------------------------------------------------------------
//  Picking
//----------------------------------------------------------------


/** Given an node index from PluginFunctions::scenegraphPick this function can be used to
* check if the splatCloudNode of the object has been picked.
*
* @param _node_idx Index of the picked splatcloud node
* @return bool if the splatCloudNode of this object is the picking target.
*/
bool SplatCloudObject::picked( uint _node_idx )
{
	return ( _node_idx == splatCloudNode_->id() );
}


//----------------------------------------------------------------


void SplatCloudObject::enablePicking( bool _enable )
{
	splatCloudNode_->enablePicking( _enable );
	shaderNode_->enablePicking( _enable );
}


//----------------------------------------------------------------


bool SplatCloudObject::pickingEnabled()
{
	return splatCloudNode_->pickingEnabled();
}