Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CAMP
campvis-public
Commits
bb7ea319
Commit
bb7ea319
authored
Oct 29, 2014
by
Hossain Mahmud
Browse files
rebased :)
parent
9cf13bed
Changes
15
Hide whitespace changes
Inline
Side-by-side
application/gui/datacontainerinspectorwidget.cpp
View file @
bb7ea319
...
...
@@ -225,7 +225,7 @@ namespace campvis {
_mainLayout
->
addWidget
(
_infoWidget
,
0
,
1
,
3
,
1
);
qRegisterMetaType
<
QtDataHandle
>
(
"QtDataHandle"
);
qRegisterMetaType
<
cgt
::
vec4
>
(
"
t
gt_vec4"
);
qRegisterMetaType
<
cgt
::
vec4
>
(
"
c
gt_vec4"
);
connect
(
_dctWidget
->
selectionModel
(),
SIGNAL
(
selectionChanged
(
const
QItemSelection
&
,
const
QItemSelection
&
)),
this
,
SLOT
(
onDCTWidgetSelectionModelSelectionChanged
(
const
QItemSelection
&
,
const
QItemSelection
&
)));
...
...
core/bindings/campvis.i
View file @
bb7ea319
...
...
@@ -121,10 +121,6 @@ namespace campvis {
%
template
(
IntProperty
)
NumericProperty
<
int
>
;
typedef
NumericProperty
<
int
>
IntProperty
;
%
template
(
Ivec2GenericProperty
)
GenericProperty
<
tgt
::
Vector2
<
int
>
>
;
%
template
(
IVec2Property
)
NumericProperty
<
tgt
::
Vector2
<
int
>
>
;
typedef
NumericProperty
<
tgt
::
Vector2
<
int
>
>
IVec2Property
;
%
template
(
Ivec2GenericProperty
)
GenericProperty
<
cgt
::
Vector2
<
int
>
>
;
%
template
(
IVec2Property
)
NumericProperty
<
cgt
::
Vector2
<
int
>
>
;
typedef
NumericProperty
<
cgt
::
Vector2
<
int
>
>
IVec2Property
;
...
...
@@ -311,14 +307,14 @@ namespace campvis {
campvis
::
IntProperty
,
campvis
::
IVec2Property
,
campvis
::
IVec3Property
,
campvis
::
IVec4Property
,
campvis
::
FloatProperty
,
campvis
::
Vec2Property
,
campvis
::
Vec3Property
,
campvis
::
Vec4Property
,
campvis
::
TransferFunctionProperty
,
campvis
::
DataNameProperty
,
campvis
::
StringProperty
,
campvis
::
ButtonProperty
,
campvis
::
BoolProperty
,
campvis
::
CameraProperty
)
;
campvis
::
DataNameProperty
,
campvis
::
StringProperty
,
campvis
::
ButtonProperty
,
campvis
::
BoolProperty
)
;
/* Downcast the return value of HasPropertyCollection::getNestedProperty to appropriate subclass */
%
factory
(
AbstractProperty
*
campvis
::
HasPropertyCollection
::
getNestedProperty
,
campvis
::
IntProperty
,
campvis
::
IVec2Property
,
campvis
::
IVec3Property
,
campvis
::
IVec4Property
,
campvis
::
FloatProperty
,
campvis
::
Vec2Property
,
campvis
::
Vec3Property
,
campvis
::
Vec4Property
,
campvis
::
TransferFunctionProperty
,
campvis
::
DataNameProperty
,
campvis
::
StringProperty
,
campvis
::
ButtonProperty
,
campvis
::
BoolProperty
,
campvis
::
CameraProperty
)
;
campvis
::
DataNameProperty
,
campvis
::
StringProperty
,
campvis
::
ButtonProperty
,
campvis
::
BoolProperty
)
;
/* HasPropertyCollection */
...
...
core/pipeline/abstractpipeline.cpp
View file @
bb7ea319
...
...
@@ -277,15 +277,6 @@ namespace campvis {
return
nullptr
;
}
AbstractProcessor
*
AbstractPipeline
::
getProcessor
(
const
std
::
string
&
name
)
const
{
for
(
auto
it
=
_processors
.
begin
();
it
!=
_processors
.
end
();
++
it
)
{
if
((
*
it
)
->
getName
()
==
name
)
return
*
it
;
}
return
nullptr
;
}
AbstractProcessor
*
AbstractPipeline
::
getProcessor
(
int
index
)
const
{
if
(
index
<
0
||
index
>=
_processors
.
size
())
return
nullptr
;
...
...
ext/cgt/camera.cpp
View file @
bb7ea319
...
...
@@ -160,17 +160,17 @@ vec3 Camera::project(ivec2 vp, vec3 point) const {
GLdouble
modelview
[
16
];
GLdouble
projection
[
16
];
cgt
::
mat4
projection_
t
gt
=
getProjectionMatrix
();
cgt
::
mat4
modelview_
t
gt
=
getViewMatrix
();
cgt
::
mat4
projection_
c
gt
=
getProjectionMatrix
();
cgt
::
mat4
modelview_
c
gt
=
getViewMatrix
();
for
(
int
i
=
0
;
i
<
4
;
++
i
)
{
modelview
[
i
+
0
]
=
modelview_
t
gt
[
i
].
x
;
modelview
[
i
+
4
]
=
modelview_
t
gt
[
i
].
y
;
modelview
[
i
+
8
]
=
modelview_
t
gt
[
i
].
z
;
modelview
[
i
+
12
]
=
modelview_
t
gt
[
i
].
w
;
projection
[
i
+
0
]
=
projection_
t
gt
[
i
].
x
;
projection
[
i
+
4
]
=
projection_
t
gt
[
i
].
y
;
projection
[
i
+
8
]
=
projection_
t
gt
[
i
].
z
;
projection
[
i
+
12
]
=
projection_
t
gt
[
i
].
w
;
modelview
[
i
+
0
]
=
modelview_
c
gt
[
i
].
x
;
modelview
[
i
+
4
]
=
modelview_
c
gt
[
i
].
y
;
modelview
[
i
+
8
]
=
modelview_
c
gt
[
i
].
z
;
modelview
[
i
+
12
]
=
modelview_
c
gt
[
i
].
w
;
projection
[
i
+
0
]
=
projection_
c
gt
[
i
].
x
;
projection
[
i
+
4
]
=
projection_
c
gt
[
i
].
y
;
projection
[
i
+
8
]
=
projection_
c
gt
[
i
].
z
;
projection
[
i
+
12
]
=
projection_
c
gt
[
i
].
w
;
}
viewport
[
0
]
=
0
;
viewport
[
1
]
=
0
;
...
...
modules/microscopysegmentation/bindings/microscopysegmentation.i
View file @
bb7ea319
...
...
@@ -19,7 +19,7 @@ namespace campvis {
}
;
class
MicroscopyImageSegmentation
:
public
VisualizationProcessor
,
public
HasProcessorDecorators
,
public
t
gt
::
EventListener
{
class
MicroscopyImageSegmentation
:
public
VisualizationProcessor
,
public
HasProcessorDecorators
,
public
c
gt
::
EventListener
{
public
:
MicroscopyImageSegmentation
(
campvis
::
IVec2Property
*
viewportSizeProp
,
campvis
::
RaycastingProcessor
*
raycaster
)
;
virtual
~
MicroscopyImageSegmentation
()
;
...
...
scripting/CMakeLists.txt
View file @
bb7ea319
...
...
@@ -127,7 +127,8 @@ ADD_LIBRARY(campvis-scripting ${CampvisSharedStaticModulesFix}
)
ADD_DEPENDENCIES
(
campvis-scripting
${
CampvisLuaModules
}
)
TARGET_LINK_LIBRARIES
(
campvis-scripting campvis-core campvis-modules tgt
${
CampvisGlobalExternalLibs
}
)
TARGET_LINK_LIBRARIES
(
campvis-scripting campvis-core campvis-modules cgt
${
CampvisGlobalExternalLibs
}
)
TARGET_LINK_LIBRARIES
(
campvis-scripting campvis-core campvis-modules cgt
${
CampvisGlobalExternalLibs
}
)
IF
(
CAMPVIS_GROUP_SOURCE_FILES
)
DEFINE_SOURCE_GROUPS_FROM_SUBDIR
(
CampvisScriptingSources
${
CampvisHome
}
""
)
...
...
scripting/luagen/properties/camerapropertylua.cpp
View file @
bb7ea319
...
...
@@ -27,10 +27,10 @@
#include "core/tools/stringutils.h"
namespace
campvis
{
CameraPropertyLua
::
CameraPropertyLua
(
CameraProperty
*
property
,
DataContainer
*
dataContainer
)
:
AbstractPropertyLua
(
property
,
true
,
dataContainer
)
{
}
//
CameraPropertyLua::CameraPropertyLua(CameraProperty* property, DataContainer* dataContainer)
//
: AbstractPropertyLua(property, true, dataContainer)
//
{
//
}
CameraPropertyLua
::~
CameraPropertyLua
()
{
}
...
...
@@ -45,28 +45,28 @@ namespace campvis {
std
::
string
CameraPropertyLua
::
getLuaScript
(
std
::
string
prefix
)
{
std
::
string
ret
=
""
;
t
gt
::
Camera
cam
=
static_cast
<
CameraProperty
*>
(
_property
)
->
getValue
();
t
gt
::
vec3
pos
=
cam
.
getPosition
();
t
gt
::
vec3
focus
=
cam
.
getFocus
();
t
gt
::
vec3
up
=
cam
.
getUpVector
();
float
fovy
=
cam
.
getFovy
();
float
ratio
=
cam
.
getRatio
();
float
distn
=
cam
.
getNearDist
();
float
distf
=
cam
.
getFarDist
();
int
pm
=
cam
.
getProjectionMode
();
//
c
gt::Camera cam = static_cast<CameraProperty*>(_property)->getValue();
//
c
gt::vec3 pos = cam.getPosition();
//
c
gt::vec3 focus = cam.getFocus();
//
c
gt::vec3 up = cam.getUpVector();
//
float fovy = cam.getFovy();
//
float ratio = cam.getRatio();
//
float distn = cam.getNearDist();
//
float distf = cam.getFarDist();
//
int pm = cam.getProjectionMode();
ret
+=
"getNestedProperty(
\"
"
+
prefix
+
_property
->
getName
()
+
"
\"
):setValue(
t
gt.Camera("
+
"
t
gt.vec3("
+
StringUtils
::
toString
(
pos
.
x
)
+
","
+
StringUtils
::
toString
(
pos
.
y
)
+
","
+
StringUtils
::
toString
(
pos
.
z
)
+
")"
+
","
+
"
t
gt.vec3("
+
StringUtils
::
toString
(
focus
.
x
)
+
","
+
StringUtils
::
toString
(
focus
.
y
)
+
","
+
StringUtils
::
toString
(
focus
.
z
)
+
")"
+
","
+
"
t
gt.vec3("
+
StringUtils
::
toString
(
up
.
x
)
+
","
+
StringUtils
::
toString
(
up
.
y
)
+
","
+
StringUtils
::
toString
(
up
.
z
)
+
")"
+
","
+
StringUtils
::
toString
(
fovy
)
+
","
+
StringUtils
::
toString
(
ratio
)
+
","
+
StringUtils
::
toString
(
distn
)
+
","
+
StringUtils
::
toString
(
distf
)
+
","
+
StringUtils
::
toString
(
pm
)
+
"))"
;
//
ret += "getNestedProperty(\"" + prefix+ _property->getName() + "\"):setValue(
c
gt.Camera("
//
+ "
c
gt.vec3(" + StringUtils::toString(pos.x) + "," + StringUtils::toString(pos.y) + "," + StringUtils::toString(pos.z) + ")"
//
+ "," + "
c
gt.vec3(" + StringUtils::toString(focus.x) + "," + StringUtils::toString(focus.y) + "," + StringUtils::toString(focus.z) + ")"
//
+ "," + "
c
gt.vec3(" + StringUtils::toString(up.x) + "," + StringUtils::toString(up.y) + "," + StringUtils::toString(up.z) + ")"
//
+ "," + StringUtils::toString(fovy)
//
+ "," + StringUtils::toString(ratio)
//
+ "," + StringUtils::toString(distn)
//
+ "," + StringUtils::toString(distf)
//
+ "," + StringUtils::toString(pm)
//
+"))";
//ret = "-- If required need to implement lua interface for
t
gt:Camera";
//
//ret = "-- If required need to implement lua interface for
c
gt:Camera";
return
ret
;
}
...
...
scripting/luagen/properties/camerapropertylua.h
View file @
bb7ea319
...
...
@@ -27,9 +27,7 @@
#include "abstractpropertylua.h"
#include "propertyluafactory.h"
#include "core/properties/cameraproperty.h"
class
QLabel
;
//#include "core/properties/cameraproperty.h"
namespace
campvis
{
/**
...
...
@@ -44,7 +42,7 @@ namespace campvis {
* \param dataContainer DataContainer to use (optional), defaults to nullptr.
* \param parent Parent Qt lua
*/
CameraPropertyLua
(
CameraProperty
*
property
,
DataContainer
*
dataContainer
);
//
CameraPropertyLua(CameraProperty* property, DataContainer* dataContainer);
/**
* Destructor
...
...
@@ -53,16 +51,10 @@ namespace campvis {
std
::
string
getLuaScript
(
std
::
string
prefix
);
private:
QLabel
*
_lblCameraPosition
;
QLabel
*
_lblFocusPosition
;
QLabel
*
_lblLookDirection
;
QLabel
*
_lblUpVector
;
};
// explicitly instantiate template, so that it gets registered also over DLL boundaries.
template
class
PropertyLuaRegistrar
<
CameraPropertyLua
,
CameraProperty
>;
//
template class PropertyLuaRegistrar<CameraPropertyLua, CameraProperty>;
}
#endif // CAMERAPROPERTYLUA_H__
...
...
scripting/luagen/properties/colorpropertylua.cpp
View file @
bb7ea319
...
...
@@ -36,9 +36,9 @@ namespace campvis {
}
std
::
string
ColorPropertyLua
::
getLuaScript
(
std
::
string
prefix
)
{
t
gt
::
vec4
value
=
static_cast
<
ColorProperty
*>
(
_property
)
->
getValue
();
c
gt
::
vec4
value
=
static_cast
<
ColorProperty
*>
(
_property
)
->
getValue
();
std
::
string
ret
=
""
;
ret
+=
"getNestedProperty(
\"
"
+
prefix
+
_property
->
getName
()
+
"
\"
):setValue(
t
gt.vec4("
ret
+=
"getNestedProperty(
\"
"
+
prefix
+
_property
->
getName
()
+
"
\"
):setValue(
c
gt.vec4("
+
StringUtils
::
toString
(
value
.
x
)
+
", "
+
StringUtils
::
toString
(
value
.
y
)
+
", "
+
StringUtils
::
toString
(
value
.
z
)
+
", "
+
StringUtils
::
toString
(
value
.
w
)
+
"))"
;
return
ret
;
...
...
scripting/luagen/properties/floatpropertylua.h
View file @
bb7ea319
...
...
@@ -65,19 +65,19 @@ namespace campvis {
template
<
>
struct
VecPropertyLuaTraits
<
2
>
{
typedef
Vec2Property
PropertyType
;
typedef
t
gt
::
vec2
BaseType
;
typedef
c
gt
::
vec2
BaseType
;
};
template
<
>
struct
VecPropertyLuaTraits
<
3
>
{
typedef
Vec3Property
PropertyType
;
typedef
t
gt
::
vec3
BaseType
;
typedef
c
gt
::
vec3
BaseType
;
};
template
<
>
struct
VecPropertyLuaTraits
<
4
>
{
typedef
Vec4Property
PropertyType
;
typedef
t
gt
::
vec4
BaseType
;
typedef
c
gt
::
vec4
BaseType
;
};
}
...
...
@@ -139,9 +139,9 @@ namespace campvis {
}
std
::
string
campvis
::
Vec2PropertyLua
::
getLuaScript
(
std
::
string
prefix
)
{
t
gt
::
vec2
value
=
static_cast
<
Vec2Property
*>
(
_property
)
->
getValue
();
c
gt
::
vec2
value
=
static_cast
<
Vec2Property
*>
(
_property
)
->
getValue
();
std
::
string
ret
=
""
;
ret
+=
"getNestedProperty(
\"
"
+
prefix
+
_property
->
getName
()
+
"
\"
):setValue(
t
gt.vec2("
ret
+=
"getNestedProperty(
\"
"
+
prefix
+
_property
->
getName
()
+
"
\"
):setValue(
c
gt.vec2("
+
StringUtils
::
toString
(
value
.
x
)
+
", "
+
StringUtils
::
toString
(
value
.
y
)
+
"))"
;
return
ret
;
}
...
...
@@ -156,9 +156,9 @@ namespace campvis {
{
}
std
::
string
campvis
::
Vec3PropertyLua
::
getLuaScript
(
std
::
string
prefix
)
{
t
gt
::
vec3
value
=
static_cast
<
Vec3Property
*>
(
_property
)
->
getValue
();
c
gt
::
vec3
value
=
static_cast
<
Vec3Property
*>
(
_property
)
->
getValue
();
std
::
string
ret
=
""
;
ret
+=
"getNestedProperty(
\"
"
+
prefix
+
_property
->
getName
()
+
"
\"
):setValue(
t
gt.vec3("
ret
+=
"getNestedProperty(
\"
"
+
prefix
+
_property
->
getName
()
+
"
\"
):setValue(
c
gt.vec3("
+
StringUtils
::
toString
(
value
.
x
)
+
", "
+
StringUtils
::
toString
(
value
.
y
)
+
", "
+
StringUtils
::
toString
(
value
.
z
)
+
"))"
;
return
ret
;
...
...
@@ -175,9 +175,9 @@ namespace campvis {
}
std
::
string
campvis
::
Vec4PropertyLua
::
getLuaScript
(
std
::
string
prefix
)
{
t
gt
::
vec4
value
=
static_cast
<
Vec4Property
*>
(
_property
)
->
getValue
();
c
gt
::
vec4
value
=
static_cast
<
Vec4Property
*>
(
_property
)
->
getValue
();
std
::
string
ret
=
""
;
ret
+=
"getNestedProperty(
\"
"
+
prefix
+
_property
->
getName
()
+
"
\"
):setValue(
t
gt.vec4("
ret
+=
"getNestedProperty(
\"
"
+
prefix
+
_property
->
getName
()
+
"
\"
):setValue(
c
gt.vec4("
+
StringUtils
::
toString
(
value
.
x
)
+
", "
+
StringUtils
::
toString
(
value
.
y
)
+
", "
+
StringUtils
::
toString
(
value
.
z
)
+
", "
+
StringUtils
::
toString
(
value
.
w
)
+
"))"
;
return
ret
;
...
...
scripting/luagen/properties/intpropertylua.h
View file @
bb7ea319
...
...
@@ -64,19 +64,19 @@ namespace campvis {
template
<
>
struct
IVecPropertyLuaTraits
<
2
>
{
typedef
IVec2Property
PropertyType
;
typedef
t
gt
::
ivec2
BaseType
;
typedef
c
gt
::
ivec2
BaseType
;
};
template
<
>
struct
IVecPropertyLuaTraits
<
3
>
{
typedef
IVec3Property
PropertyType
;
typedef
t
gt
::
ivec3
BaseType
;
typedef
c
gt
::
ivec3
BaseType
;
};
template
<
>
struct
IVecPropertyLuaTraits
<
4
>
{
typedef
IVec4Property
PropertyType
;
typedef
t
gt
::
ivec4
BaseType
;
typedef
c
gt
::
ivec4
BaseType
;
};
}
...
...
@@ -137,9 +137,9 @@ namespace campvis {
}
std
::
string
campvis
::
IVec2PropertyLua
::
getLuaScript
(
std
::
string
prefix
)
{
t
gt
::
ivec2
value
=
static_cast
<
IVec2Property
*>
(
_property
)
->
getValue
();
c
gt
::
ivec2
value
=
static_cast
<
IVec2Property
*>
(
_property
)
->
getValue
();
std
::
string
ret
=
""
;
ret
+=
"getNestedProperty(
\"
"
+
prefix
+
_property
->
getName
()
+
"
\"
):setValue(
t
gt.ivec2("
ret
+=
"getNestedProperty(
\"
"
+
prefix
+
_property
->
getName
()
+
"
\"
):setValue(
c
gt.ivec2("
+
StringUtils
::
toString
(
value
.
x
)
+
", "
+
StringUtils
::
toString
(
value
.
y
)
+
"))"
;
return
ret
;
}
...
...
@@ -155,9 +155,9 @@ namespace campvis {
}
std
::
string
campvis
::
IVec3PropertyLua
::
getLuaScript
(
std
::
string
prefix
)
{
t
gt
::
ivec3
value
=
static_cast
<
IVec3Property
*>
(
_property
)
->
getValue
();
c
gt
::
ivec3
value
=
static_cast
<
IVec3Property
*>
(
_property
)
->
getValue
();
std
::
string
ret
=
""
;
ret
+=
"getNestedProperty(
\"
"
+
prefix
+
_property
->
getName
()
+
"
\"
):setValue(
t
gt.ivec3("
ret
+=
"getNestedProperty(
\"
"
+
prefix
+
_property
->
getName
()
+
"
\"
):setValue(
c
gt.ivec3("
+
StringUtils
::
toString
(
value
.
x
)
+
", "
+
StringUtils
::
toString
(
value
.
y
)
+
", "
+
StringUtils
::
toString
(
value
.
z
)
+
"))"
;
return
ret
;
...
...
@@ -174,9 +174,9 @@ namespace campvis {
}
std
::
string
campvis
::
IVec4PropertyLua
::
getLuaScript
(
std
::
string
prefix
)
{
t
gt
::
ivec4
value
=
static_cast
<
IVec4Property
*>
(
_property
)
->
getValue
();
c
gt
::
ivec4
value
=
static_cast
<
IVec4Property
*>
(
_property
)
->
getValue
();
std
::
string
ret
=
""
;
ret
+=
"getNestedProperty(
\"
"
+
prefix
+
_property
->
getName
()
+
"
\"
):setValue(
t
gt.ivec4("
ret
+=
"getNestedProperty(
\"
"
+
prefix
+
_property
->
getName
()
+
"
\"
):setValue(
c
gt.ivec4("
+
StringUtils
::
toString
(
value
.
x
)
+
", "
+
StringUtils
::
toString
(
value
.
y
)
+
", "
+
StringUtils
::
toString
(
value
.
z
)
+
", "
+
StringUtils
::
toString
(
value
.
w
)
+
"))"
;
return
ret
;
...
...
scripting/luagen/properties/metapropertylua.cpp
View file @
bb7ea319
...
...
@@ -22,7 +22,7 @@
//
// ================================================================================================
#include "
t
gt/assert.h"
#include "
c
gt/assert.h"
#include "metapropertylua.h"
#include "core/tools/stringutils.h"
...
...
scripting/luagen/properties/propertyluafactory.cpp
View file @
bb7ea319
...
...
@@ -59,7 +59,7 @@ namespace campvis {
_propertyWidgetMap
.
insert
(
it
,
std
::
make_pair
(
typeIndex
,
ptr
));
}
else
{
t
gtAssert
(
false
,
"Double-registered a property widget for the same type."
);
c
gtAssert
(
false
,
"Double-registered a property widget for the same type."
);
}
}
if
(
fallbackPtr
!=
nullptr
)
{
...
...
scripting/luagen/properties/propertyluafactory.h
View file @
bb7ea319
...
...
@@ -25,8 +25,8 @@
#ifndef PROPERTYLUAFACTORY_H__
#define PROPERTYLUAFACTORY_H__
#include "
t
gt/logmanager.h"
#include "
t
gt/singleton.h"
#include "
c
gt/logmanager.h"
#include "
c
gt/singleton.h"
#include <tbb/atomic.h>
#include <tbb/spin_mutex.h>
...
...
@@ -123,7 +123,7 @@ namespace campvis {
* \return The newly created property widget.
*/
static
AbstractPropertyLua
*
create
(
AbstractProperty
*
property
,
DataContainer
*
dc
=
nullptr
)
{
t
gtAssert
(
dynamic_cast
<
PropertyType
*>
(
property
)
!=
nullptr
,
"Incompatible types - this should not happen!"
);
c
gtAssert
(
dynamic_cast
<
PropertyType
*>
(
property
)
!=
nullptr
,
"Incompatible types - this should not happen!"
);
return
new
PropertyLuaType
(
static_cast
<
PropertyType
*>
(
property
),
dc
);
}
...
...
scripting/luagen/properties/transferfunctionpropertylua.cpp
View file @
bb7ea319
...
...
@@ -39,10 +39,10 @@ namespace campvis {
std
::
string
TransferFunctionPropertyLua
::
getLuaScript
(
std
::
string
prefix
)
{
TransferFunctionProperty
*
prop
=
static_cast
<
TransferFunctionProperty
*>
(
_property
);
AbstractTransferFunction
*
tf
=
prop
->
getTF
();
const
t
gt
::
vec2
&
domain
=
tf
->
getIntensityDomain
();
const
c
gt
::
vec2
&
domain
=
tf
->
getIntensityDomain
();
std
::
string
ret
=
""
;
ret
+=
"getNestedProperty(
\"
"
+
prefix
+
_property
->
getName
()
+
"
\"
):setIntensityDomain(
t
gt.vec2("
ret
+=
"getNestedProperty(
\"
"
+
prefix
+
_property
->
getName
()
+
"
\"
):setIntensityDomain(
c
gt.vec2("
+
StringUtils
::
toString
(
domain
.
x
)
+
", "
+
StringUtils
::
toString
(
domain
.
y
)
+
"))"
;
return
ret
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment