vc7.1 fixes

This commit is contained in:
cxgeorge 2002-11-23 02:18:47 +00:00
parent a48bf15656
commit 0bb4baebe7
9 changed files with 25 additions and 25 deletions

View File

@ -92,7 +92,7 @@ has_normal() const {
// true.
////////////////////////////////////////////////////////////////////
template <class VT, class NT, class TT, class CT>
INLINE BuilderAttribTempl<VT, NT, TT, CT>::NType BuilderAttribTempl<VT, NT, TT, CT>::
INLINE TYPENAME BuilderAttribTempl<VT, NT, TT, CT>::NType BuilderAttribTempl<VT, NT, TT, CT>::
get_normal() const {
nassertr(has_normal(), _normal);
return _normal;
@ -145,7 +145,7 @@ has_color() const {
// true.
////////////////////////////////////////////////////////////////////
template <class VT, class NT, class TT, class CT>
INLINE BuilderAttribTempl<VT, NT, TT, CT>::CType BuilderAttribTempl<VT, NT, TT, CT>::
INLINE TYPENAME BuilderAttribTempl<VT, NT, TT, CT>::CType BuilderAttribTempl<VT, NT, TT, CT>::
get_color() const {
nassertr(has_color(), _color);
return _color;

View File

@ -452,7 +452,7 @@ set_type(BuilderPrimType t) {
// one of has_normal() or has_overall_normal() is true.
////////////////////////////////////////////////////////////////////
template <class VTX>
INLINE BuilderPrimTempl<VTX>::NType BuilderPrimTempl<VTX>::
INLINE TYPENAME BuilderPrimTempl<VTX>::NType BuilderPrimTempl<VTX>::
get_normal() const {
return DAttrib::get_normal();
}
@ -481,7 +481,7 @@ set_normal(const NType &n) {
// one of has_color() or has_overall_color() is true.
////////////////////////////////////////////////////////////////////
template <class VTX>
INLINE BuilderPrimTempl<VTX>::CType BuilderPrimTempl<VTX>::
INLINE TYPENAME BuilderPrimTempl<VTX>::CType BuilderPrimTempl<VTX>::
get_color() const {
return DAttrib::get_color();
}
@ -570,7 +570,7 @@ get_num_verts() const {
// the primitive.
////////////////////////////////////////////////////////////////////
template <class VTX>
INLINE BuilderPrimTempl<VTX>::Vertex &BuilderPrimTempl<VTX>::
INLINE TYPENAME BuilderPrimTempl<VTX>::Vertex &BuilderPrimTempl<VTX>::
get_vertex(int n) {
nassertr(n >= 0 && n < (int)_verts.size(), *(new Vertex));
return _verts[n];
@ -583,7 +583,7 @@ get_vertex(int n) {
// < get_num_verts().
////////////////////////////////////////////////////////////////////
template <class VTX>
INLINE const BuilderPrimTempl<VTX>::Vertex &BuilderPrimTempl<VTX>::
INLINE const TYPENAME BuilderPrimTempl<VTX>::Vertex &BuilderPrimTempl<VTX>::
get_vertex(int n) const {
nassertr(n >= 0 && n < (int)_verts.size(), *(new Vertex));
return _verts[n];
@ -645,7 +645,7 @@ get_num_components() const {
// add_component() and get_num_components().
////////////////////////////////////////////////////////////////////
template <class VTX>
INLINE BuilderPrimTempl<VTX>::DAttrib &BuilderPrimTempl<VTX>::
INLINE TYPENAME BuilderPrimTempl<VTX>::DAttrib &BuilderPrimTempl<VTX>::
get_component(int n) {
nassertr(n >= 0 && n < (int)_components.size(), *(new DAttrib));
return _components[n];
@ -660,7 +660,7 @@ get_component(int n) {
// add_component() and get_num_components().
////////////////////////////////////////////////////////////////////
template <class VTX>
INLINE const BuilderPrimTempl<VTX>::DAttrib &BuilderPrimTempl<VTX>::
INLINE const TYPENAME BuilderPrimTempl<VTX>::DAttrib &BuilderPrimTempl<VTX>::
get_component(int n) const {
nassertr(n >= 0 && n < (int)_components.size(), *(new DAttrib));
return _components[n];

View File

@ -113,7 +113,7 @@ has_coord() const {
// true.
////////////////////////////////////////////////////////////////////
template <class VT, class NT, class TT, class CT>
INLINE BuilderVertexTempl<VT, NT, TT, CT>::VType BuilderVertexTempl<VT, NT, TT, CT>::
INLINE TYPENAME BuilderVertexTempl<VT, NT, TT, CT>::VType BuilderVertexTempl<VT, NT, TT, CT>::
get_coord() const {
nassertr(has_coord(), _coord);
return _coord;
@ -209,7 +209,7 @@ clear_texcoord() {
// has_texcoord() is true.
////////////////////////////////////////////////////////////////////
template <class VT, class NT, class TT, class CT>
INLINE BuilderVertexTempl<VT, NT, TT, CT>::TType BuilderVertexTempl<VT, NT, TT, CT>::
INLINE TYPENAME BuilderVertexTempl<VT, NT, TT, CT>::TType BuilderVertexTempl<VT, NT, TT, CT>::
get_texcoord() const {
nassertr(has_texcoord(), _texcoord);
return _texcoord;

View File

@ -260,8 +260,8 @@ build(pvector<Prim> &unrolled_tris) {
template <class PrimType>
int MesherFanMaker<PrimType>::
unroll(Strips::iterator strip_begin, Strips::iterator strip_end,
Edges::iterator edge_begin, Edges::iterator edge_end,
unroll(TYPENAME Strips::iterator strip_begin, TYPENAME Strips::iterator strip_end,
TYPENAME Edges::iterator edge_begin, TYPENAME Edges::iterator edge_end,
pvector<Prim> &unrolled_tris) {
Edges::iterator ei;
Strips::iterator si;

View File

@ -65,8 +65,8 @@ public:
float compute_angle() const;
int build(pvector<Prim> &unrolled_tris);
int unroll(Strips::iterator strip_begin, Strips::iterator strip_end,
Edges::iterator edge_begin, Edges::iterator edge_end,
int unroll(TYPENAME Strips::iterator strip_begin, TYPENAME Strips::iterator strip_end,
TYPENAME Edges::iterator edge_begin, TYPENAME Edges::iterator edge_end,
pvector<Prim> &unrolled_tris);
ostream &output(ostream &out) const;

View File

@ -128,7 +128,7 @@ rotate_back() {
// pointer equality with any shared Edge.
////////////////////////////////////////////////////////////////////
template <class PrimType>
INLINE MesherStrip<PrimType>::Edge MesherStrip<PrimType>::
INLINE TYPENAME MesherStrip<PrimType>::Edge MesherStrip<PrimType>::
get_head_edge() const {
Verts::const_iterator vi = _verts.begin();
return Edge(_verts.front(), *++vi);
@ -143,7 +143,7 @@ get_head_edge() const {
// pointer equality with any shared Edge.
////////////////////////////////////////////////////////////////////
template <class PrimType>
INLINE MesherStrip<PrimType>::Edge MesherStrip<PrimType>::
INLINE TYPENAME MesherStrip<PrimType>::Edge MesherStrip<PrimType>::
get_tail_edge() const {
Verts::const_reverse_iterator vi = _verts.rbegin();
return Edge(*++vi, _verts.back());
@ -220,7 +220,7 @@ MesherStrip(const PrimType &prim, int index, const BuilderBucket &bucket) {
_plane_normal = cross(p1-p2, p2-p3);
float l = length(_plane_normal);
if (l != 0.0) {
if (l != 0.0f) {
_plane_normal /= l;
_planar = true;
_plane_offset = -dot(_plane_normal, p1);
@ -1046,7 +1046,7 @@ show_neighbors(ostream &out) const {
// the given edge.
////////////////////////////////////////////////////////////////////
template <class PrimType>
const MesherStrip<PrimType>::Vertex *MesherStrip<PrimType>::
const TYPENAME MesherStrip<PrimType>::Vertex *MesherStrip<PrimType>::
find_uncommon_vertex(const Edge *edge) const {
const Vertex *a = edge->_a;
const Vertex *b = edge->_b;
@ -1073,7 +1073,7 @@ find_uncommon_vertex(const Edge *edge) const {
// opposite the given vertex.
////////////////////////////////////////////////////////////////////
template <class PrimType>
const MesherStrip<PrimType>::Edge *MesherStrip<PrimType>::
const TYPENAME MesherStrip<PrimType>::Edge *MesherStrip<PrimType>::
find_opposite_edge(const Vertex *vertex) const {
Edges::const_iterator ei;
for (ei = _edges.begin(); ei != _edges.end(); ++ei) {
@ -1094,7 +1094,7 @@ find_opposite_edge(const Vertex *vertex) const {
// edge opposite the given edge.
////////////////////////////////////////////////////////////////////
template <class PrimType>
const MesherStrip<PrimType>::Edge *MesherStrip<PrimType>::
const TYPENAME MesherStrip<PrimType>::Edge *MesherStrip<PrimType>::
find_opposite_edge(const Edge *edge) const {
const Vertex *a = edge->_a;
const Vertex *b = edge->_b;
@ -1118,7 +1118,7 @@ find_opposite_edge(const Edge *edge) const {
// one of two edges adjacent to the given edge.
////////////////////////////////////////////////////////////////////
template <class PrimType>
const MesherStrip<PrimType>::Edge *MesherStrip<PrimType>::
const TYPENAME MesherStrip<PrimType>::Edge *MesherStrip<PrimType>::
find_adjacent_edge(const Edge *edge) const {
const Vertex *a = edge->_a;
const Vertex *b = edge->_b;
@ -1560,7 +1560,7 @@ pick_sheet_mate(const MesherStrip &a_strip, const MesherStrip &b_strip) const {
float a_diff = dot(_plane_normal, a_strip._plane_normal);
float b_diff = dot(_plane_normal, b_strip._plane_normal);
if (fabs(a_diff - b_diff) > 0.0001) {
if (fabs(a_diff - b_diff) > 0.0001f) {
return a_diff > b_diff;
}
}

View File

@ -384,7 +384,7 @@ count_vert_edges(const EdgePtrs &edges) const {
}
template <class PrimType>
plist<MesherTempl<PrimType>::Strip> &MesherTempl<PrimType>::
plist<TYPENAME MesherTempl<PrimType>::Strip> &MesherTempl<PrimType>::
choose_strip_list(const Strip &strip) {
switch (strip._status) {
case MS_done:

View File

@ -78,7 +78,7 @@ protected:
Edges _edges;
int _stripIndex;
BuilderBucket *_bucket;
Strips::iterator _next_strip;
TYPENAME Strips::iterator _next_strip;
Colors _colors;
ColorSheetMap _color_sheets;

View File

@ -68,7 +68,7 @@ AnimChannel(AnimGroup *parent, const string &name)
////////////////////////////////////////////////////////////////////
template<class SwitchType>
void AnimChannel<SwitchType>::
get_value(int, AnimChannel<SwitchType>::ValueType &) {
get_value(int, TYPENAME AnimChannel<SwitchType>::ValueType &) {
}
#endif