Browse Source

Made a model-func const...

Sebastian 11 years ago
parent
commit
314b2602be
3 changed files with 6 additions and 6 deletions
  1. 2
    2
      geotypes.cpp
  2. 1
    1
      model/model.cpp
  3. 3
    3
      model/model.h

+ 2
- 2
geotypes.cpp View File

@@ -127,7 +127,7 @@ bool Ray::onRay(Punkt3D p, int rnd) {
127 127
 	else if(g3)
128 128
 		return (r1 == r2);
129 129
 	else
130
-		return (r1 == r2 == r3);
130
+		return ((r1 == r2) == r3);
131 131
 }
132 132
 
133 133
 float Ray::dist(Punkt3D p) {
@@ -215,7 +215,7 @@ bool Plane::collision(const Plane &p) const {
215 215
 }
216 216
 
217 217
 float Plane::dist(Punkt3D p) const {
218
-	
218
+	return 0.0f;
219 219
 }
220 220
 
221 221
 } // namespace segl

+ 1
- 1
model/model.cpp View File

@@ -156,7 +156,7 @@ Model::~Model() {
156 156
 	unload();
157 157
 }
158 158
 
159
-const Punkt3D* Model::getMeshData(unsigned int *meshanz) {
159
+const Punkt3D* Model::getMeshData(unsigned int *meshanz) const {
160 160
 	*meshanz = meshdataanz;
161 161
 	return (const Punkt3D*)meshdata;
162 162
 }

+ 3
- 3
model/model.h View File

@@ -84,10 +84,10 @@ class Model {
84 84
 		void unload();
85 85
 		void render();
86 86
 		
87
-		Quader getBoundingBox() { return boundingbox; }
88
-		float getBoundingRad() { return boundingrad; }
87
+		Quader getBoundingBox() const { return boundingbox; }
88
+		float getBoundingRad() const { return boundingrad; }
89 89
 		
90
-		const Punkt3D* getMeshData(unsigned int *meshanz);
90
+		const Punkt3D* getMeshData(unsigned int *meshanz) const;
91 91
 };
92 92
 
93 93
 } // namespace segl

Loading…
Cancel
Save