mirror of
https://github.com/overte-org/overte.git
synced 2025-05-02 18:09:07 +02:00
34 lines
713 B
C++
34 lines
713 B
C++
//
|
|
// Vec3.cpp
|
|
// hifi
|
|
//
|
|
// Created by Brad Hefta-Gaub on 1/29/14
|
|
// Copyright (c) 2014 High Fidelity, Inc. All rights reserved.
|
|
//
|
|
// Scriptable Vec3 class library.
|
|
//
|
|
//
|
|
|
|
#include "Vec3.h"
|
|
|
|
glm::vec3 Vec3::multiply(const glm::vec3& v1, const glm::vec3& v2) {
|
|
return v1 * v2;
|
|
}
|
|
|
|
glm::vec3 Vec3::multiply(const glm::vec3& v1, float f) {
|
|
return v1 * f;
|
|
}
|
|
|
|
glm::vec3 Vec3::multiplyQbyV(const glm::quat& q, const glm::vec3& v) {
|
|
return q * v;
|
|
}
|
|
|
|
glm::vec3 Vec3::sum(const glm::vec3& v1, const glm::vec3& v2) {
|
|
return v1 + v2;
|
|
}
|
|
glm::vec3 Vec3::subtract(const glm::vec3& v1, const glm::vec3& v2) {
|
|
return v1 - v2;
|
|
}
|
|
float Vec3::length(const glm::vec3& v) {
|
|
return glm::length(v);
|
|
}
|