Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OCSR
UMANS
Commits
bad087c0
Commit
bad087c0
authored
Apr 17, 2020
by
Fabien Grzeskowiak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Time step setter to API
parent
462742a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
src/Library/APIFunctions.cpp
src/Library/APIFunctions.cpp
+9
-0
src/Library/APIFunctions.h
src/Library/APIFunctions.h
+5
-0
No files found.
src/Library/APIFunctions.cpp
View file @
bad087c0
...
...
@@ -75,6 +75,15 @@ extern "C"
return
true
;
}
API_FUNCTION
bool
SetSimulationTimeStep
(
float
result_dt
)
{
if
(
cs
==
nullptr
)
return
false
;
cs
->
GetWorld
()
->
SetDeltaTime
(
result_dt
);
return
true
;
}
API_FUNCTION
bool
DoSimulationSteps
(
int
nrSteps
)
{
if
(
cs
==
nullptr
)
...
...
src/Library/APIFunctions.h
View file @
bad087c0
...
...
@@ -58,6 +58,11 @@ extern "C"{
/// <returns>true if the operation was successful; false otherwise, i.e. if the simulation has not been initialized (correctly) yet.</returns>
API_FUNCTION
bool
GetSimulationTimeStep
(
float
&
result_dt
);
/// <summary>Sets the step size of the simulation, in seconds.</summary>
/// <param ref="result_dt">[out] Will set the step size of the simulation.</param>
/// <returns>true if the operation was successful; false otherwise, i.e. if the simulation has not been initialized (correctly) yet.</returns>
API_FUNCTION
bool
SetSimulationTimeStep
(
float
result_dt
);
/// <summary>Performs the given number of simulation steps.
/// To obtain the resulting status of the simulation, use the GetAgentPositions() function.</summary>
/// <param ref="nrSteps">The number of steps to perform.</param>
...
...
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