Panda3D
 All Classes Functions Variables Enumerations
odeHeightFieldGeom.h
1 // Filename: odeHeightfieldGeom.h
2 // Created by: joswilso (27Dec06)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef ODEHEIGHTFIELDGEOM_H
16 #define ODEHEIGHTFIELDGEOM_H
17 
18 #include "pandabase.h"
19 #include "typedObject.h"
20 #include "luse.h"
21 
22 #include "ode_includes.h"
23 #include "odeGeom.h"
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : OdeHeightfieldGeom
27 // Description :
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDAODE OdeHeightfieldGeom : public OdeGeom {
30  friend class OdeGeom;
31 
32 public:
33  OdeHeightfieldGeom(dGeomID id);
34 
35 PUBLISHED:
37  virtual ~OdeHeightfieldGeom();
38 
39  INLINE dHeightfieldDataID heightfield_data_create();
40  INLINE void heightfield_data_destroy(dHeightfieldDataID d);
41  INLINE void heightfield_data_build_callback(dHeightfieldDataID d,
42  void* p_user_data,
43  dHeightfieldGetHeight* p_callback,
44  dReal width,
45  dReal depth,
46  int width_samples,
47  int depth_samples,
48  dReal scale,
49  dReal offset,
50  dReal thickness,
51  int b_wrap);
52  INLINE void heightfield_data_build_byte(dHeightfieldDataID d,
53  const unsigned char* p_height_data,
54  int b_copy_height_data,
55  dReal width,
56  dReal depth,
57  int width_samples,
58  int depth_samples,
59  dReal scale,
60  dReal offset,
61  dReal thickness,
62  int b_wrap);
63  INLINE void heightfield_data_build_short(dHeightfieldDataID d,
64  const short* p_height_data,
65  int b_copy_height_data,
66  dReal width,
67  dReal depth,
68  int width_samples,
69  int depth_samples,
70  dReal scale,
71  dReal offset,
72  dReal thickness,
73  int b_wrap);
74  INLINE void heightfield_data_build_single(dHeightfieldDataID d,
75  const float* p_height_data,
76  int b_copy_height_data,
77  dReal width,
78  dReal depth,
79  int width_samples,
80  int depth_samples,
81  dReal scale,
82  dReal offset,
83  dReal thickness,
84  int b_wrap);
85  INLINE void heightfield_data_build_double(dHeightfieldDataID d,
86  const double* p_height_data,
87  int b_copy_height_data,
88  dReal width,
89  dReal depth,
90  int width_samples,
91  int depth_samples,
92  dReal scale,
93  dReal offset,
94  dReal thickness,
95  int b_wrap);
96  INLINE void heightfield_data_set_bounds(dHeightfieldDataID d,
97  dReal min_height,
98  dReal max_height);
99  INLINE void heightfield_set_heightfield_data(dHeightfieldDataID d);
100 
101 public:
102  static TypeHandle get_class_type() {
103  return _type_handle;
104  }
105  static void init_type() {
106  OdeGeom::init_type();
107  register_type(_type_handle, "OdeHeightfieldGeom",
108  OdeGeom::get_class_type());
109  }
110  virtual TypeHandle get_type() const {
111  return get_class_type();
112  }
113  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
114 
115 private:
116  static TypeHandle _type_handle;
117 };
118 
119 #include "odeHeightfieldGeom.I"
120 
121 #endif
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85