mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 07:03:59 -06:00
Make plater work with new XS code
This commit is contained in:
parent
4c96a52012
commit
d4512a12df
4 changed files with 11 additions and 7 deletions
|
@ -49,13 +49,14 @@ sub new {
|
|||
color => COLORS->[ $color_idx % scalar(@{&COLORS}) ],
|
||||
};
|
||||
|
||||
my ($vertices, $facets) = ($mesh->vertices, $mesh->facets);
|
||||
{
|
||||
my @verts = map @{ $mesh->vertices->[$_] }, map @$_, @{$mesh->facets};
|
||||
my @verts = map @{ $vertices->[$_] }, map @$_, @$facets;
|
||||
$v->{verts} = OpenGL::Array->new_list(GL_FLOAT, @verts);
|
||||
}
|
||||
|
||||
{
|
||||
my @norms = map { @$_, @$_, @$_ } map normalize(triangle_normal(map $mesh->vertices->[$_], @$_)), @{$mesh->facets};
|
||||
my @norms = map { @$_, @$_, @$_ } map normalize(triangle_normal(map $vertices->[$_], @$_)), @$facets;
|
||||
$v->{norms} = OpenGL::Array->new_list(GL_FLOAT, @norms);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue