Get the latest Blender, older versions, or experimental builds.
Stay up-to-date with the new features in the latest Blender releases.
Access production assets and knowledge from the open movies.
Documentation on the usage and features in Blender.
Latest development updates, by Blender developers.
Guidelines, release notes and development docs.
A platform to collect and share results of the Blender Benchmark.
The yearly event that brings the community together.
Support core development with a monthly contribution.
Perform a single donation with more payment options available.
#ifndef SM_FHOBJECT_H
#define SM_FHOBJECT_H
#include "SM_Object.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
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;
};