00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef ODEHEIGHTFIELDGEOM_H
00016 #define ODEHEIGHTFIELDGEOM_H
00017
00018 #include "pandabase.h"
00019 #include "typedObject.h"
00020 #include "luse.h"
00021
00022 #include "ode_includes.h"
00023 #include "odeGeom.h"
00024
00025
00026
00027
00028
00029 class EXPCL_PANDAODE OdeHeightfieldGeom : public OdeGeom {
00030 friend class OdeGeom;
00031
00032 private:
00033 OdeHeightfieldGeom(dGeomID id);
00034
00035 PUBLISHED:
00036 OdeHeightfieldGeom();
00037 virtual ~OdeHeightfieldGeom();
00038
00039 INLINE dHeightfieldDataID heightfield_data_create();
00040 INLINE void heightfield_data_destroy(dHeightfieldDataID d);
00041 INLINE void heightfield_data_build_callback(dHeightfieldDataID d,
00042 void* p_user_data,
00043 dHeightfieldGetHeight* p_callback,
00044 dReal width,
00045 dReal depth,
00046 int width_samples,
00047 int depth_samples,
00048 dReal scale,
00049 dReal offset,
00050 dReal thickness,
00051 int b_wrap);
00052 INLINE void heightfield_data_build_byte(dHeightfieldDataID d,
00053 const unsigned char* p_height_data,
00054 int b_copy_height_data,
00055 dReal width,
00056 dReal depth,
00057 int width_samples,
00058 int depth_samples,
00059 dReal scale,
00060 dReal offset,
00061 dReal thickness,
00062 int b_wrap);
00063 INLINE void heightfield_data_build_short(dHeightfieldDataID d,
00064 const short* p_height_data,
00065 int b_copy_height_data,
00066 dReal width,
00067 dReal depth,
00068 int width_samples,
00069 int depth_samples,
00070 dReal scale,
00071 dReal offset,
00072 dReal thickness,
00073 int b_wrap);
00074 INLINE void heightfield_data_build_single(dHeightfieldDataID d,
00075 const float* p_height_data,
00076 int b_copy_height_data,
00077 dReal width,
00078 dReal depth,
00079 int width_samples,
00080 int depth_samples,
00081 dReal scale,
00082 dReal offset,
00083 dReal thickness,
00084 int b_wrap);
00085 INLINE void heightfield_data_build_double(dHeightfieldDataID d,
00086 const double* p_height_data,
00087 int b_copy_height_data,
00088 dReal width,
00089 dReal depth,
00090 int width_samples,
00091 int depth_samples,
00092 dReal scale,
00093 dReal offset,
00094 dReal thickness,
00095 int b_wrap);
00096 INLINE void heightfield_data_set_bounds(dHeightfieldDataID d,
00097 dReal min_height,
00098 dReal max_height);
00099 INLINE void heightfield_set_heightfield_data(dHeightfieldDataID d);
00100
00101 public:
00102 static TypeHandle get_class_type() {
00103 return _type_handle;
00104 }
00105 static void init_type() {
00106 OdeGeom::init_type();
00107 register_type(_type_handle, "OdeHeightfieldGeom",
00108 OdeGeom::get_class_type());
00109 }
00110 virtual TypeHandle get_type() const {
00111 return get_class_type();
00112 }
00113 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00114
00115 private:
00116 static TypeHandle _type_handle;
00117 };
00118
00119 #include "odeHeightfieldGeom.I"
00120
00121 #endif