Skip to content

Commit c40d903

Browse files
author
devsh
committed
add a new XML up-vector tag
1 parent 7fe4ce1 commit c40d903

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

include/nbl/ext/MitsubaLoader/CElementSensor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class CElementSensor : public IElement
3737
};
3838
struct ShutterSensor
3939
{
40+
core::vectorSIMDf up = core::vectorSIMDf(0,1,0);
4041
float moveSpeed = core::nan<float>();
4142
float zoomSpeed = core::nan<float>();
4243
float rotateSpeed = core::nan<float>();

src/nbl/ext/MitsubaLoader/CElementSensor.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ bool CElementSensor::addProperty(SNamedPropertyElement&& _property)
131131
} \
132132
}); \
133133
}
134-
134+
135+
auto setUp = SET_PROPERTY_TEMPLATE(up,SNamedPropertyElement::Type::VECTOR,ShutterSensor);
135136
auto setShiftX = SET_PROPERTY_TEMPLATE(shiftX,SNamedPropertyElement::Type::FLOAT,PerspectivePinhole);
136137
auto setShiftY = SET_PROPERTY_TEMPLATE(shiftY,SNamedPropertyElement::Type::FLOAT,PerspectivePinhole);
137138
auto setFov = SET_PROPERTY_TEMPLATE(fov,SNamedPropertyElement::Type::FLOAT,PerspectivePinhole);
@@ -177,6 +178,7 @@ bool CElementSensor::addProperty(SNamedPropertyElement&& _property)
177178
const core::unordered_map<std::string, std::function<void()>, core::CaseInsensitiveHash, core::CaseInsensitiveEquals> SetPropertyMap =
178179
{
179180
//{"focalLength", noIdeaHowToProcessValue},
181+
{"up", setUp},
180182
{"shiftX", setShiftX},
181183
{"shiftY", setShiftY},
182184
{"fov", setFov},

0 commit comments

Comments
 (0)