fixing conflict

Former-commit-id: 4b0293ce11a5ae4ca0c8b265959fee2138941032
This commit is contained in:
jshipsey 2019-04-19 19:05:33 -04:00
commit b107a46b07
18 changed files with 60 additions and 9 deletions

View File

@ -18,10 +18,10 @@ use super::{
pub struct CharacterSkeleton {
head: Bone,
chest: Bone,
belt: Bone,
shorts: Bone,
l_hand: Bone,
bl_foot: Bone,
br_foot: Bone,
r_hand: Bone,
l_hand: Bone,
l_foot: Bone,
r_foot: Bone,
back: Bone,
@ -32,10 +32,10 @@ impl CharacterSkeleton {
Self {
head: Bone::default(),
chest: Bone::default(),
belt: Bone::default(),
shorts: Bone::default(),
l_hand: Bone::default(),
br_foot: Bone::default(),
bl_foot: Bone::default(),
r_hand: Bone::default(),
l_hand: Bone::default(),
l_foot: Bone::default(),
r_foot: Bone::default(),
back: Bone::default(),
@ -50,10 +50,10 @@ impl Skeleton for CharacterSkeleton {
[
FigureBoneData::new(self.head.compute_base_matrix()),
FigureBoneData::new(chest_mat),
FigureBoneData::new(self.belt.compute_base_matrix()),
FigureBoneData::new(self.shorts.compute_base_matrix()),
FigureBoneData::new(self.l_hand.compute_base_matrix()),
FigureBoneData::new(self.bl_foot.compute_base_matrix()),
FigureBoneData::new(self.br_foot.compute_base_matrix()),
FigureBoneData::new(self.r_hand.compute_base_matrix()),
FigureBoneData::new(self.l_hand.compute_base_matrix()),
FigureBoneData::new(self.l_foot.compute_base_matrix()),
FigureBoneData::new(self.r_foot.compute_base_matrix()),
FigureBoneData::new(chest_mat * self.back.compute_base_matrix()),

View File

@ -4,11 +4,20 @@ pub mod terrain;
use vek::*;
use dot_vox;
<<<<<<< HEAD
use common::{
comp,
figure::Segment,
};
use client::Client;
=======
// Project
use common::figure::Segment;
use client::Client;
// Crate
>>>>>>> fc56d4d1bc9f9ea9b40dc42f600e164d11e2eb40
use crate::{
render::{
Consts,
@ -70,7 +79,34 @@ impl Scene {
.unwrap(),
},
terrain: Terrain::new(),
<<<<<<< HEAD
figures: Figures::new(renderer),
=======
test_figure: Figure::new(
renderer,
[
Some(load_segment("dragonhead.vox").generate_mesh(Vec3::new(2.0, -12.0, 2.0))),
Some(load_segment("dragon_body.vox").generate_mesh(Vec3::new(0.0, 0.0, 0.0))),
Some(load_segment("dragon_lfoot.vox").generate_mesh(Vec3::new(10.0, 10.0, -80.0))),
Some(load_segment("dragon_rfoot.vox").generate_mesh(Vec3::new(0.0, 10.0, -4.0))),
Some(load_segment("dragon_rfoot.vox").generate_mesh(Vec3::new(0.0, -10.0, -4.0))),
Some(load_segment("dragon_lfoot.vox").generate_mesh(Vec3::new(0.0, 0.0, 0.0))),
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
],
CharacterSkeleton::new(),
)
.unwrap(),
>>>>>>> fc56d4d1bc9f9ea9b40dc42f600e164d11e2eb40
}
}
@ -106,6 +142,7 @@ impl Scene {
}
/// Maintain data such as GPU constant buffers, models, etc. To be called once per tick.
<<<<<<< HEAD
pub fn maintain(&mut self, renderer: &mut Renderer, client: &mut Client) {
// Get player position
let player_pos = client
@ -120,6 +157,9 @@ impl Scene {
// Alter camera position to match player
self.camera.set_focus_pos(player_pos + Vec3::unit_z() * 1.5);
=======
pub fn maintain(&mut self, renderer: &mut Renderer, client: &Client) {
>>>>>>> fc56d4d1bc9f9ea9b40dc42f600e164d11e2eb40
// Compute camera matrices
let (view_mat, proj_mat, cam_pos) = self.camera.compute_dependents();
@ -137,7 +177,18 @@ impl Scene {
// Maintain the terrain and figures
self.terrain.maintain(renderer, client);
<<<<<<< HEAD
self.figures.maintain(renderer, client);
=======
// TODO: Don't do this here
RunAnimation::update_skeleton(
&mut self.test_figure.skeleton,
client.state().get_time(),
);
self.test_figure.update_locals(renderer, FigureLocals::default()).unwrap();
self.test_figure.update_skeleton(renderer).unwrap();
>>>>>>> fc56d4d1bc9f9ea9b40dc42f600e164d11e2eb40
}
/// Render the scene using the provided `Renderer`

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.