Skip to content

Commit

Permalink
Add support for an initial camera roll angle in visualiser
Browse files Browse the repository at this point in the history
Closes #1238
  • Loading branch information
Robadob committed Oct 19, 2024
1 parent 107bb63 commit 4ff0b3e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/flamegpu/visualiser/ModelVis.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ class ModelVis {
* @param z The z coordinate
*/
void setInitialCameraTarget(const float &x, const float &y, const float &z);
/**
* Set the initial camera roll in radians
* This value defaults to 0
* @param roll The roll angle in radians
*/
void setInitialCameraRoll(const float &roll);
/**
* The speed of camera movement, in units travelled per millisecond
* This value defaults to (0.05, 5.0)
Expand Down
4 changes: 4 additions & 0 deletions src/flamegpu/visualiser/ModelVis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ void ModelVis::setInitialCameraTarget(const float &x, const float &y, const floa
data->modelCfg.cameraTarget[2] = z;
}

void ModelVis::setInitialCameraRoll(const float &roll) {
data->modelCfg.cameraRoll = roll;
}

void ModelVis::setCameraSpeed(const float &speed, const float &shiftMultiplier) {
data->modelCfg.cameraSpeed[0] = speed;
data->modelCfg.cameraSpeed[1] = shiftMultiplier;
Expand Down

0 comments on commit 4ff0b3e

Please sign in to comment.