erebus

diff liberebus/src/snode.h @ 2:474a0244f57d

fixed specialization mistake fixed line endings added makefiles
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 28 Apr 2014 06:31:10 +0300
parents 59a72293f9bd
children a932848de652
line diff
     1.1 --- a/liberebus/src/snode.h	Mon Apr 28 05:58:22 2014 +0300
     1.2 +++ b/liberebus/src/snode.h	Mon Apr 28 06:31:10 2014 +0300
     1.3 @@ -1,46 +1,46 @@
     1.4 -#ifndef SNODE_H_
     1.5 -#define SNODE_H_
     1.6 -
     1.7 -#include <vector>
     1.8 -#include "object.h"
     1.9 -#include "vmath/vmath.h"
    1.10 -
    1.11 -class SceneNode {
    1.12 -private:
    1.13 -	Vector3 pos;
    1.14 -	Quaternion rot;
    1.15 -	Vector3 scale;
    1.16 -
    1.17 -	std::vector<Object*> obj;
    1.18 -
    1.19 -	SceneNode *parent;
    1.20 -	std::vector<SceneNode*> children;
    1.21 -
    1.22 -	Matrix4x4 node_xform, xform;
    1.23 -
    1.24 -public:
    1.25 -	void add_child(SceneNode *node);
    1.26 -	bool remove_child(SceneNode *node);
    1.27 -
    1.28 -	int get_num_children() const;
    1.29 -	SceneNode *get_child(int idx) const;
    1.30 -
    1.31 -	void set_position(const Vector3 &pos);
    1.32 -	void set_rotation(const Quaternion &rot);
    1.33 -	void set_scaling(const Vector3 &scale);
    1.34 -
    1.35 -	const Vector3 &get_node_position() const;
    1.36 -	const Quaternion &get_node_rotation() const;
    1.37 -	const Vector3 &get_node_scaling() const;
    1.38 -
    1.39 -	Vector3 get_position() const;
    1.40 -	Quaternion get_rotation() const;
    1.41 -	Vector3 get_scaling() const;
    1.42 -
    1.43 -	void update_node(long msec = 0);
    1.44 -	void update(long msec = 0);
    1.45 -
    1.46 -	bool intersect(const Ray &ray, RayHit *hit) const;
    1.47 -};
    1.48 -
    1.49 -#endif	// SNODE_H_
    1.50 \ No newline at end of file
    1.51 +#ifndef SNODE_H_
    1.52 +#define SNODE_H_
    1.53 +
    1.54 +#include <vector>
    1.55 +#include "object.h"
    1.56 +#include "vmath/vmath.h"
    1.57 +
    1.58 +class SceneNode {
    1.59 +private:
    1.60 +	Vector3 pos;
    1.61 +	Quaternion rot;
    1.62 +	Vector3 scale;
    1.63 +
    1.64 +	std::vector<Object*> obj;
    1.65 +
    1.66 +	SceneNode *parent;
    1.67 +	std::vector<SceneNode*> children;
    1.68 +
    1.69 +	Matrix4x4 node_xform, xform;
    1.70 +
    1.71 +public:
    1.72 +	void add_child(SceneNode *node);
    1.73 +	bool remove_child(SceneNode *node);
    1.74 +
    1.75 +	int get_num_children() const;
    1.76 +	SceneNode *get_child(int idx) const;
    1.77 +
    1.78 +	void set_position(const Vector3 &pos);
    1.79 +	void set_rotation(const Quaternion &rot);
    1.80 +	void set_scaling(const Vector3 &scale);
    1.81 +
    1.82 +	const Vector3 &get_node_position() const;
    1.83 +	const Quaternion &get_node_rotation() const;
    1.84 +	const Vector3 &get_node_scaling() const;
    1.85 +
    1.86 +	Vector3 get_position() const;
    1.87 +	Quaternion get_rotation() const;
    1.88 +	Vector3 get_scaling() const;
    1.89 +
    1.90 +	void update_node(long msec = 0);
    1.91 +	void update(long msec = 0);
    1.92 +
    1.93 +	bool intersect(const Ray &ray, RayHit *hit) const;
    1.94 +};
    1.95 +
    1.96 +#endif	// SNODE_H_