This commit is contained in:
Garux
2022-10-27 09:10:31 +03:00
parent b1e5581c60
commit 9d3d204018
289 changed files with 13557 additions and 33481 deletions

View File

@@ -373,7 +373,7 @@ public:
}
else{
// place name in the middle of the "children cloud"
m_name_origin = extents_valid( childBounds.extents.x() )? childBounds.origin : vector4_to_vector3( localToWorld.t() );
m_name_origin = extents_valid( childBounds.extents.x() )? childBounds.origin : localToWorld.t().vec3();
m_renderName.render( renderer, volume, g_matrix4_identity, selected, childSelected );
}
}
@@ -424,17 +424,6 @@ public:
typedef MemberCaller<Doom3Group, &Doom3Group::transformChanged> TransformChangedCaller;
};
class ControlPointAddBounds
{
AABB& m_bounds;
public:
ControlPointAddBounds( AABB& bounds ) : m_bounds( bounds ){
}
void operator()( const Vector3& point ) const {
aabb_extend_by_point_safe( m_bounds, point );
}
};
class Doom3GroupInstance :
public TargetableInstance,
public TransformModifier,
@@ -558,8 +547,8 @@ public:
const AABB& getSelectedComponentsBounds() const {
m_aabb_component = AABB();
m_curveNURBS.forEachSelected( ControlPointAddBounds( m_aabb_component ) );
m_curveCatmullRom.forEachSelected( ControlPointAddBounds( m_aabb_component ) );
m_curveNURBS.forEachSelected( AABBExtendByPoint( m_aabb_component ) );
m_curveCatmullRom.forEachSelected( AABBExtendByPoint( m_aabb_component ) );
return m_aabb_component;
}
void gatherSelectedComponents( const Vector3Callback& callback ) const {