Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Clark Lin
hw3d
Commits
0d65e345
Commit
0d65e345
authored
Aug 31, 2019
by
chili
Browse files
make test plane great (not smol) again
parent
5d647693
Changes
1
Hide whitespace changes
Inline
Side-by-side
hw3d/Plane.h
View file @
0d65e345
...
@@ -16,8 +16,8 @@ public:
...
@@ -16,8 +16,8 @@ public:
assert
(
divisions_x
>=
1
);
assert
(
divisions_x
>=
1
);
assert
(
divisions_y
>=
1
);
assert
(
divisions_y
>=
1
);
constexpr
float
width
=
1
.0
f
;
constexpr
float
width
=
2
.0
f
;
constexpr
float
height
=
1
.0
f
;
constexpr
float
height
=
2
.0
f
;
const
int
nVertices_x
=
divisions_x
+
1
;
const
int
nVertices_x
=
divisions_x
+
1
;
const
int
nVertices_y
=
divisions_y
+
1
;
const
int
nVertices_y
=
divisions_y
+
1
;
Dvtx
::
VertexBuffer
vb
{
std
::
move
(
layout
)
};
Dvtx
::
VertexBuffer
vb
{
std
::
move
(
layout
)
};
...
@@ -32,11 +32,11 @@ public:
...
@@ -32,11 +32,11 @@ public:
for
(
int
y
=
0
,
i
=
0
;
y
<
nVertices_y
;
y
++
)
for
(
int
y
=
0
,
i
=
0
;
y
<
nVertices_y
;
y
++
)
{
{
const
float
y_pos
=
float
(
y
)
*
divisionSize_y
-
1.0
f
;
const
float
y_pos
=
float
(
y
)
*
divisionSize_y
-
side_y
;
const
float
y_pos_tc
=
1.0
f
-
float
(
y
)
*
divisionSize_y_tc
;
const
float
y_pos_tc
=
1.0
f
-
float
(
y
)
*
divisionSize_y_tc
;
for
(
int
x
=
0
;
x
<
nVertices_x
;
x
++
,
i
++
)
for
(
int
x
=
0
;
x
<
nVertices_x
;
x
++
,
i
++
)
{
{
const
float
x_pos
=
float
(
x
)
*
divisionSize_x
-
1.0
f
;
const
float
x_pos
=
float
(
x
)
*
divisionSize_x
-
side_x
;
const
float
x_pos_tc
=
float
(
x
)
*
divisionSize_x_tc
;
const
float
x_pos_tc
=
float
(
x
)
*
divisionSize_x_tc
;
vb
.
EmplaceBack
(
vb
.
EmplaceBack
(
dx
::
XMFLOAT3
{
x_pos
,
y_pos
,
0.0
f
},
dx
::
XMFLOAT3
{
x_pos
,
y_pos
,
0.0
f
},
...
...
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