Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Autumn2020
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sindre Eiklid
Autumn2020
Commits
bc9af4c6
Commit
bc9af4c6
authored
Dec 9, 2020
by
Sindre Eiklid
Browse files
Options
Downloads
Patches
Plain Diff
Formatting
parent
20b41589
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
class/vegetation.cpp
+1
-1
1 addition, 1 deletion
class/vegetation.cpp
with
1 addition
and
1 deletion
class/vegetation.cpp
+
1
−
1
View file @
bc9af4c6
...
...
@@ -40,7 +40,7 @@ Vegetation::Vegetation() {
//generate coordinates for each instance
for
(
int
i
=
0
;
i
<
g_mapData
->
gridHeight
;
i
+=
5
)
{
for
(
int
j
=
0
;
j
<
g_mapData
->
gridWidth
;
j
+=
5
)
{
//branch if depth is between
42
and 7
9
(in green area)
//branch if depth is between
35
and 7
7
(in green area)
if
(
g_mapData
->
gridElement
[
std
::
make_pair
(
i
,
j
)][
0
][
Z
]
>
35
/
255.f
&&
g_mapData
->
gridElement
[
std
::
make_pair
(
i
,
j
)][
0
][
2
]
<
77
/
255.f
)
{
glm
::
vec3
translation
;
//multiply the value by 100 to compensate for the tree scaling(0.01f * 100.f = 1), then multiply by 2 because of the terrain scalling
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment