Computing a Basis

Computing a Basis

admin No Comment

Given a normalized 3D vector, here’s an efficient method for computing a full basis. The computed basis is axis aligned if the input vector is axis aligned.
void ComputeBasis(const Vec& a, Vec* b, Vec* c)
// Suppose vector a has all equal components and is a unit vector: a = (s, s, s)
// Then 3*s*s = 1, s = sqrt(1/3) = 0.57735. This means that at least one component of a
// unit vector must be greater or equal to 0.57735.

Hello world!
Saturday October 21, 2017

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

if (Abs(a.x) >= 0.57735f)
b->Set(a.y, -a.x, 0.0f);
b->Set(0.0f, a.z, -a.y);

Juliet thoát khỏi lễ hội halloween
Tuesday October 30, 2018

Game Juliet thoat khoi le hoi halloween – Chơi game Công chúa Juliet thoát khỏi lễ hội halloween 2018 online miễn phí hay nhất y8 24h Thể loại: game tri tue Giới thiệu game Juliet thoat khoi le hoi halloween Game Juliet thoát khỏi lễ hội halloween là một trò chơi trí tuệ rất hay và […]

b = Normalize(b);
*c = Cross(a, *b);
In SSE land you can eliminate the branch using a select operation.

Free Xbox One Games and Xbox 360 Games – February 2017
Wednesday January 25, 2017

Microsoft has released the free Xbox One games and free Xbox 360 games that will be made available through their Games with Gold program that is available to Xbox Live Gold members. Each month both Microsoft and Sony release free games for a limited time through their respective digital distribution platforms. Each month Games with […]