mirror of
https://github.com/Garux/netradiant-custom.git
synced 2026-09-28 00:00:03 +02:00
simpler plane3_translated()
This commit is contained in:
+3
-3
@@ -75,9 +75,9 @@ inline Plane3 plane3_normalised( const Plane3& plane ){
|
||||
);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
Plane3 plane3_translated( const Plane3& plane, const BasicVector3<T>& translation ){
|
||||
return Plane3( plane.normal(), vector3_dot( plane.normal(), plane.normal() * plane.dist() + translation ) );
|
||||
template<typename P, typename V>
|
||||
Plane3___<P> plane3_translated( const Plane3___<P>& plane, const BasicVector3<V>& translation ){
|
||||
return Plane3___<P>( plane.normal(), plane.dist() + vector3_dot( plane.normal(), translation ) );
|
||||
}
|
||||
|
||||
inline Plane3 plane3_transformed( const Plane3& plane, const Matrix4& transform ){
|
||||
|
||||
@@ -645,7 +645,7 @@ int ShiftBSPMain( Args& args ){
|
||||
/* shift planes */
|
||||
for ( bspPlane_t& plane : bspPlanes )
|
||||
{
|
||||
plane.dist() = vector3_dot( plane.normal(), plane.normal() * plane.dist() + shift );
|
||||
plane = plane3_translated( plane, shift );
|
||||
}
|
||||
|
||||
// fixme: engine says 'light grid mismatch', unless translation is multiple of grid size
|
||||
|
||||
Reference in New Issue
Block a user