cloth2
annotate src/object.cc @ 0:ef0c22554406
cloth sim test, initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 11 Jan 2016 16:51:16 +0200 |
parents | |
children |
rev | line source |
---|---|
nuclear@0 | 1 #include "object.h" |
nuclear@0 | 2 #include "opengl.h" |
nuclear@0 | 3 |
nuclear@0 | 4 Object::~Object() |
nuclear@0 | 5 { |
nuclear@0 | 6 } |
nuclear@0 | 7 |
nuclear@0 | 8 Triangle::Triangle() |
nuclear@0 | 9 { |
nuclear@0 | 10 } |
nuclear@0 | 11 |
nuclear@0 | 12 Triangle::Triangle(const Vector3 &a, const Vector3 &b, const Vector3 &c) |
nuclear@0 | 13 { |
nuclear@0 | 14 v[0] = a; |
nuclear@0 | 15 v[1] = b; |
nuclear@0 | 16 v[2] = c; |
nuclear@0 | 17 normal = normalize(cross(b - a, c - a)); |
nuclear@0 | 18 } |
nuclear@0 | 19 |
nuclear@0 | 20 bool Triangle::intersect(const Ray &ray, HitPoint *pt) const |
nuclear@0 | 21 { |
nuclear@0 | 22 return false; |
nuclear@0 | 23 } |
nuclear@0 | 24 |
nuclear@0 | 25 void Triangle::draw() const |
nuclear@0 | 26 { |
nuclear@0 | 27 } |