Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment_Engine: Renaming input in the Transform.cs #3124

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Environment_Engine/Modify/Transform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ public static partial class Modify

[Description("Transforms the Space's perimeter and location point by the transform matrix. Only rigid body transformations are supported.")]
[Input("space", "Space to transform.")]
[Input("transform", "Transform matrix.")]
[Input("matrix", "Transform matrix.")]
[Input("tolerance", "Tolerance used in the check whether the input matrix is equivalent to the rigid body transformation.")]
[Output("space", "Modified Space with unchanged properties, but transformed perimeter and location point.")]
public static Space Transform(this Space space, TransformMatrix transform, double tolerance = Tolerance.Distance)
public static Space Transform(this Space space, TransformMatrix matrix, double tolerance = Tolerance.Distance)
FraserGreenroyd marked this conversation as resolved.
Show resolved Hide resolved
{
if (!transform.IsRigidTransformation(tolerance))
if (!matrix.IsRigidTransformation(tolerance))
{
BH.Engine.Base.Compute.RecordError("Transformation failed: only rigid body transformations are currently supported.");
return null;
}

Space result = space.ShallowClone();
result.Perimeter = result.Perimeter.ITransform(transform);
result.Location = result.Location.Transform(transform);
result.Perimeter = result.Perimeter.ITransform(matrix);
result.Location = result.Location.Transform(matrix);
return result;
}

Expand Down