Jump to content

  • Log In with Google      Sign In   
  • Create Account

Calling all IT Pros from Canada and Australia.. we need your help! Support our site by taking a quick sponsored surveyand win a chance at a $50 Amazon gift card. Click here to get started!


Barycentric Coordinates


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 lucky6969b   Members   -  Reputation: 774

Like
0Likes
Like

Posted 30 March 2011 - 12:30 AM

When I have a barycentric coordinate relative to a specific triangle, how can I transform it to world space?
I have found one post although I forgot the link.
My second question being is in max sdk, class Mesh, there isn't any method to retrieve a specific set of vertices of a triangle. Do I assume that I can use getVert() and count a triangle from every third increments? Can I assume max is using triangle strips?
Thanks
Jack

Sponsor:

#2 haegarr   Crossbones+   -  Reputation: 6372

Like
1Likes
Like

Posted 30 March 2011 - 01:34 AM

When I have a barycentric coordinate relative to a specific triangle, how can I transform it to world space?

AFAIK barycentric co-ordinates by itself are ever relative to the vertices, regardless of a co-ordinate system. If you apply the barycentric co-ordinates to vertices given in model space you'll get a point in model space; if you apply them to vertices given in world space you'll get a point in world space.

Hence if you need the point in world space, e.g. apply the barycentric co-ordinates to the vertices of the triangle to yield in the model local co-ordinates of the point. Apply the model-to-global (a.k.a. local-to-world) transformation of the model to yield in the same co-ordinates but now w.r.t. the world space.

#3 lucky6969b   Members   -  Reputation: 774

Like
0Likes
Like

Posted 30 March 2011 - 02:11 AM


When I have a barycentric coordinate relative to a specific triangle, how can I transform it to world space?

AFAIK barycentric co-ordinates by itself are ever relative to the vertices, regardless of a co-ordinate system. If you apply the barycentric co-ordinates to vertices given in model space you'll get a point in model space; if you apply them to vertices given in world space you'll get a point in world space.

Hence if you need the point in world space, e.g. apply the barycentric co-ordinates to the vertices of the triangle to yield in the model local co-ordinates of the point. Apply the model-to-global (a.k.a. local-to-world) transformation of the model to yield in the same co-ordinates but now w.r.t. the world space.


That makes a lot of sense, thanks a lot....Ah. my second question, in max, I can't find any methods in the mesh class that retrieve a face or pointer to a face given a face index.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS