erebus

diff liberebus/src/object.h @ 17:e9da2916bc79

fixed the normal bug
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 26 May 2014 05:41:28 +0300
parents 93894c232d65
children bab25c0ce337
line diff
     1.1 --- a/liberebus/src/object.h	Sun May 25 02:23:39 2014 +0300
     1.2 +++ b/liberebus/src/object.h	Mon May 26 05:41:28 2014 +0300
     1.3 @@ -5,12 +5,21 @@
     1.4  #include "vmath/ray.h"
     1.5  
     1.6  class Object;
     1.7 +class SceneNode;
     1.8  
     1.9 -struct RayHit {
    1.10 +class RayHit {
    1.11 +public:
    1.12  	float dist;
    1.13  	Ray world_ray, local_ray;
    1.14  
    1.15 +	const SceneNode *node;
    1.16  	const Object *obj, *subobj;
    1.17 +
    1.18 +	RayHit();
    1.19 +
    1.20 +	Vector3 calc_normal() const;
    1.21 +	Vector3 calc_tangent() const;
    1.22 +	Vector2 calc_texcoords() const;
    1.23  };
    1.24  
    1.25  enum class ObjType { null, geom, camera };