Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SM_FhObject.h « include « Fuzzics « Sumo « Physics « gameengine « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4aac43f6712da7dc8877591058548800596c36b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef SM_FHOBJECT_H
#define SM_FHOBJECT_H

#include "SM_Object.h"

class SM_FhObject : public SM_Object {
public:
	SM_FhObject() {}
	SM_FhObject(const MT_Vector3& ray, SM_Object *client_object) :
		SM_Object(DT_Ray(ray[0], ray[1], ray[2]), 0, 0, 0),
		m_ray(ray),
		m_ray_direction(ray.normalized()),
		m_client_object(client_object) {}

	const MT_Vector3&  getRay()          const { return m_ray; }
	MT_Point3          getSpot()         const { return m_pos + m_ray; }
	const MT_Vector3&  getRayDirection() const { return m_ray_direction; }
	SM_Object         *getClientObject() const { return m_client_object; }

	static void ray_hit(void *client_data,  
						void *object1,
						void *object2,
						const DT_CollData *coll_data);

private:
	MT_Vector3      m_ray;
	MT_Vector3      m_ray_direction;
	SM_Object      *m_client_object;
};

#endif