Deprecate get_data and set_data, let's switch to get_tri_mesh_data and set_tri_mesh_data so that we can add support for dGeomSetData
This commit is contained in:
parent
12fa338faf
commit
eb341f8a54
|
|
@ -14,13 +14,27 @@
|
|||
|
||||
INLINE void OdeTriMeshGeom::
|
||||
set_data(OdeTriMeshData &data) {
|
||||
odetrimeshdata_cat.warning()
|
||||
<< "OdeTriMeshGeom::set_data() is deprecated, use OdeTriMeshGeom::set_tri_mesh_data() instead!\n";
|
||||
set_tri_mesh_data(data);
|
||||
}
|
||||
|
||||
INLINE PT(OdeTriMeshData) OdeTriMeshGeom::
|
||||
get_data() const {
|
||||
odetrimeshdata_cat.warning()
|
||||
<< "OdeTriMeshGeom::get_data() is deprecated, use OdeTriMeshGeom::get_tri_mesh_data() instead!\n";
|
||||
return get_tri_mesh_data();
|
||||
}
|
||||
|
||||
INLINE void OdeTriMeshGeom::
|
||||
set_tri_mesh_data(OdeTriMeshData &data) {
|
||||
nassertv(_id != 0);
|
||||
dGeomTriMeshSetData(_id, data.get_id());
|
||||
OdeTriMeshData::link_data(_id, &data);
|
||||
}
|
||||
|
||||
INLINE PT(OdeTriMeshData) OdeTriMeshGeom::
|
||||
get_data() const {
|
||||
get_tri_mesh_data() const {
|
||||
nassertr(_id != 0 ,0);
|
||||
return OdeTriMeshData::get_data(_id);
|
||||
}
|
||||
|
|
@ -70,6 +84,13 @@ get_num_triangles() const {
|
|||
|
||||
INLINE dTriMeshDataID OdeTriMeshGeom::
|
||||
get_data_id() const {
|
||||
odetrimeshdata_cat.warning()
|
||||
<< "OdeTriMeshGeom::get_data_id() is deprecated, use OdeTriMeshGeom::get_tri_mesh_data_id() instead!\n";
|
||||
return get_tri_mesh_data_id();
|
||||
}
|
||||
|
||||
INLINE dTriMeshDataID OdeTriMeshGeom::
|
||||
get_tri_mesh_data_id() const {
|
||||
nassertr(_id != 0, 0);
|
||||
return dGeomTriMeshGetTriMeshDataID(_id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ PUBLISHED:
|
|||
virtual ~OdeTriMeshGeom();
|
||||
|
||||
void destroy();
|
||||
INLINE void set_tri_mesh_data(OdeTriMeshData &data);
|
||||
INLINE PT(OdeTriMeshData) get_tri_mesh_data() const;
|
||||
INLINE void set_data(OdeTriMeshData &data);
|
||||
INLINE PT(OdeTriMeshData) get_data() const;
|
||||
INLINE void enable_TC(int geom_class, int enable);
|
||||
|
|
@ -51,6 +53,7 @@ PUBLISHED:
|
|||
|
||||
public:
|
||||
INLINE static int get_geom_class() { return dTriMeshClass; };
|
||||
INLINE dTriMeshDataID get_tri_mesh_data_id() const;
|
||||
INLINE dTriMeshDataID get_data_id() const;
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Reference in New Issue