mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
More reversing tweaks?
This commit is contained in:
parent
6864f91b05
commit
9a566451cf
@ -112,6 +112,10 @@ ace::simulation::vertex_table::vertex_table(const ace::p3d::vertex_table_p p3d_v
|
|||||||
this->vertices.resize(p3d_vertex_table->points.size);
|
this->vertices.resize(p3d_vertex_table->points.size);
|
||||||
ace::vector3<float> center_off2 = p3d_lod->min_pos+p3d_lod->max_pos-p3d_lod->autocenter_pos;
|
ace::vector3<float> center_off2 = p3d_lod->min_pos+p3d_lod->max_pos-p3d_lod->autocenter_pos;
|
||||||
ace::vector3<float> center_off = p3d->info->cog_offset;//p3d->info->center_of_gravity + p3d->info->offset_2 + p3d->info->cog_offset;
|
ace::vector3<float> center_off = p3d->info->cog_offset;//p3d->info->center_of_gravity + p3d->info->offset_2 + p3d->info->cog_offset;
|
||||||
|
if (reversed) {
|
||||||
|
center_off.x(center_off.x()*-1);
|
||||||
|
center_off.z(center_off.z()*-1);
|
||||||
|
}
|
||||||
for (uint32_t i = 0; i <= p3d_vertex_table->points.size - 1; ++i) {
|
for (uint32_t i = 0; i <= p3d_vertex_table->points.size - 1; ++i) {
|
||||||
if (p3d->info->autocenter) {
|
if (p3d->info->autocenter) {
|
||||||
ace::vector3<float> new_vertex = p3d_vertex_table->points[i] + center_off;
|
ace::vector3<float> new_vertex = p3d_vertex_table->points[i] + center_off;
|
||||||
@ -132,7 +136,10 @@ ace::simulation::lod::lod(const ace::p3d::lod_p p3d_lod, const ace::p3d::model_p
|
|||||||
this->id = p3d_lod->id;
|
this->id = p3d_lod->id;
|
||||||
this->vertices = vertex_table(p3d_lod->vertices, p3d_lod, p3d, reversed);
|
this->vertices = vertex_table(p3d_lod->vertices, p3d_lod, p3d, reversed);
|
||||||
this->autocenter_pos = p3d->info->cog_offset;//p3d->info->center_of_gravity + p3d->info->offset_2 + p3d->info->cog_offset;
|
this->autocenter_pos = p3d->info->cog_offset;//p3d->info->center_of_gravity + p3d->info->offset_2 + p3d->info->cog_offset;
|
||||||
|
if (reversed) {
|
||||||
|
this->autocenter_pos.x(this->autocenter_pos.x()*-1);
|
||||||
|
this->autocenter_pos.z(this->autocenter_pos.z()*-1);
|
||||||
|
}
|
||||||
for (ace::p3d::face_p p3d_face : p3d_lod->faces) {
|
for (ace::p3d::face_p p3d_face : p3d_lod->faces) {
|
||||||
this->faces.push_back(std::make_shared<face>(p3d_face, p3d_lod, p3d, this));
|
this->faces.push_back(std::make_shared<face>(p3d_face, p3d_lod, p3d, this));
|
||||||
}
|
}
|
||||||
@ -167,6 +174,10 @@ ace::simulation::lod_animation_info::lod_animation_info(
|
|||||||
this->index = p3d_animate_bone->index;
|
this->index = p3d_animate_bone->index;
|
||||||
if (p3d->info->autocenter) {
|
if (p3d->info->autocenter) {
|
||||||
ace::vector3<float> center_off = p3d->info->cog_offset;//p3d->info->center_of_gravity + p3d->info->offset_2 + p3d->info->cog_offset;
|
ace::vector3<float> center_off = p3d->info->cog_offset;//p3d->info->center_of_gravity + p3d->info->offset_2 + p3d->info->cog_offset;
|
||||||
|
if (reversed) {
|
||||||
|
center_off.x(center_off.x()*-1);
|
||||||
|
center_off.z(center_off.z()*-1);
|
||||||
|
}
|
||||||
this->axis_position = p3d_animate_bone->axis_position + center_off;
|
this->axis_position = p3d_animate_bone->axis_position + center_off;
|
||||||
this->axis_direction = p3d_animate_bone->axis_direction;
|
this->axis_direction = p3d_animate_bone->axis_direction;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user