25 #ifndef WPROPERTYTYPES_H
26 #define WPROPERTYTYPES_H
35 #include <boost/filesystem.hpp>
37 #include "WStringUtils.h"
38 #include "math/linearAlgebra/WLinearAlgebra.h"
39 #include "math/linearAlgebra/WMatrixFixed.h"
40 #include "math/linearAlgebra/WVectorFixed.h"
43 #include "WItemSelector.h"
45 template <
typename T >
89 PV_PURPOSE_INFORMATION,
101 namespace WPVBaseTypes
228 typedef boost::shared_ptr< WPVInt > WPropInt;
233 typedef boost::shared_ptr< WPVDouble > WPropDouble;
238 typedef boost::shared_ptr< WPVBool > WPropBool;
243 typedef boost::shared_ptr< WPVString > WPropString;
248 typedef boost::shared_ptr< WPVFilename > WPropFilename;
253 typedef boost::shared_ptr< WPVSelection > WPropSelection;
258 typedef boost::shared_ptr< WPVPosition > WPropPosition;
263 typedef boost::shared_ptr< WPVColor > WPropColor;
268 typedef boost::shared_ptr< WPVGroup > WPropGroup;
273 typedef boost::shared_ptr< WPVTrigger > WPropTrigger;
278 typedef boost::shared_ptr< WPVMatrix4X4 > WPropMatrix4X4;
283 typedef boost::shared_ptr< WPVTransferFunction > WPropTransferFunction;
288 namespace PROPERTY_TYPE_HELPER
293 template<
typename T >
313 template<
typename T >
326 return string_utils::fromString< T >( str );
574 std::vector< std::string > tokens;
576 WAssert( tokens.size() >= 16,
"There weren't 16 values for a 4x4 Matrix" );
579 for(
size_t row = 0; row < 4; ++row )
581 for(
size_t col = 0; col < 4; ++col )
583 c( row, col ) = string_utils::fromString< double >( tokens[ idx ] );
600 std::ostringstream out;
601 for(
size_t row = 0; row < 4; ++row )
603 for(
size_t col = 0; col < 4; ++col )
605 out << v( row, col ) <<
";";
626 return PV_TRANSFERFUNCTION;
675 std::vector< std::string > tokens;
677 WAssert( tokens.size() >= 3,
"There weren't 3 values for a 3D vector" );
680 for(
size_t col = 0; col < 3; ++col )
682 c[ col ] = string_utils::fromString< double >( tokens[ idx ] );
697 std::ostringstream out;
698 for(
size_t col = 0; col < 3; ++col )
700 out << v[ col ] <<
";";
707 #endif // WPROPERTYTYPES_H