Ignore:
Timestamp:
Mar 13, 2013, 12:57:03 PM (7 years ago)
Author:
ldelgass
Message:

Fix camera reset for nanovis. Includes refactoring of vector/matrix classes
in nanovis to consolidate into vrmath library. Also add preliminary canonical
view control to clients for testing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/Plane.cpp

    r3177 r3492  
    1717
    1818#include "Plane.h"
     19
     20using namespace nv;
    1921
    2022Plane::Plane(float _a, float _b, float _c, float _d) :
     
    3840
    3941void
    40 Plane::transform(const Mat4x4& mat)
     42Plane::transform(const vrmath::Matrix4x4d& mat)
    4143{
    42     Vector4 coeffs(a, b, c, d);
     44    vrmath::Vector4f coeffs(a, b, c, d);
    4345
    44     Mat4x4 inv = mat.inverse();
    45     Vector4 new_coeffs = inv.multiplyRowVector(coeffs);
     46    vrmath::Matrix4x4d inv = mat.inverse();
     47    vrmath::Vector4f new_coeffs = inv.preMultiplyRowVector(coeffs);
    4648    a = new_coeffs.x;
    4749    b = new_coeffs.y;
     
    5153
    5254void
    53 Plane::getPoint(Vector3& point)
     55Plane::getPoint(vrmath::Vector3f& point)
    5456{
    5557    if (a != 0) {
Note: See TracChangeset for help on using the changeset viewer.