Jump to content

How to do various transforms


Recommended Posts


As a frame of reference, in Helix Toolkit for WPF (C#, .NET), I am calculating and rendering some coordinates to model a football Goal Post, or pylons at the end zone corners if you prefer.

I want to start with a single set of coordinates, and apply a transform that basically mirrors those coordinates on either end of the field, end zone, or what have you. This is extremely easy to apply using the WPF view XAML.

Let's say I have the points for the post; 180 feet from either end of center field (Z axis):

// assuming "world" coordinates originate at center field, measured in feet
// that's 50 yards plus 10 for the end zone; post height is 6 feet.
var points = [new BABYLON.Vector3(0, 0, 180), new BABYLON.Vector3(0, 6, 180)];

After that, I would CreateTube, let's say, to actually model the object. But for right now I just want to mirror about the Z axis. The modeling bits are beyond the scope of this question, unless they aren't.

My transformation vector would be something like this, I think, but I could be wrong: new BABYLON.Vector3(0, 0, -1).

Similar case for the uprights; 18.5 feet wide about the X axis:

var points = [new BABYLON.Vector3(9.25, 10, 180), new BABYLON.Vector3(9.25, 40, 180)];

My transformation vector would be something like new BABYLON.Vector3(-1, 0, 0).

Are there utilities in BABYLON that can facilitate such a transformation?

Might do a similar thing for additive transformations, as contrasted with multiplicative, in this case.

Thank you...


Michael Powell

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...