00001 /* -*- C++ -*- */ 00002 00003 /* COPYRIGHT 00004 * 00005 * This file is part of the Visual Effects Engine - VEE 00006 * 00007 * Read the "VEE-LICENSE" file for the license. 00008 * 00009 * Authors & Copyright: 00010 * 00011 * Tommi Ilmonen, Tuukka Heikura, Marko Myllymaa and 00012 * Janne Kontkanen 2001-2004 00013 * 00014 * Additional copyrights: Tekes 2003-2004 00015 * 00016 * firstname.lastname@hut.fi 00017 * 00018 */ 00019 00020 #ifndef VEE_VOLUME_BOX_H 00021 #define VEE_VOLUME_BOX_H 00022 00023 #include <vee_volume.h> 00024 00025 #include <vee_clonable_pointer.h> 00026 #include <vee_matrix3.h> 00027 #include <vee_random.h> 00028 #include <vee_vector3.h> 00029 00030 class VEE_VolumeBox : public VEE_Volume 00031 { 00032 public: 00033 VEE_VolumeBox(); 00034 virtual ~VEE_VolumeBox(); 00035 00036 virtual VEE_Vector3 newRandomPoint(); 00037 00038 virtual void getBoundingBox(VEE_BoundingBox *); 00039 virtual VEE_Volume * clone() const; 00040 00041 virtual float inside(const VEE_Vector3 &location); 00042 00043 /*VEE_Vector3 *centralLocation() { return &m_center; } 00044 VEE_Vector3 *location() { return &m_center; }*/ 00045 VEE_Vector3 & axes() { return m_axes; } 00046 VEE_Matrix3 & rotation() { return m_rotation; } 00047 // void setCenter(float x, float y, float z); 00048 // void move(const VEE_Vector3 &l) { m_center += l; } 00049 void setAxes(float a1, float a2, float a3); 00050 void setRotation(VEE_Matrix3 &rot) { m_rotation = rot; } 00051 void setRandom(VEE_Random *r) { m_random = r; } 00052 00053 00054 protected: 00055 00056 // VEE_Vector3 m_center; 00057 VEE_Vector3 m_axes; 00058 VEE_Matrix3 m_rotation; 00059 00060 VEE_ClonablePointer<VEE_Random> m_random; 00061 }; 00062 00063 00064 #endif 00065 00066