Made a model-func const...

This commit is contained in:
Sebastian 2009-09-17 19:40:02 +02:00
parent 07b852c718
commit 314b2602be
3 changed files with 6 additions and 6 deletions

View File

@ -127,7 +127,7 @@ bool Ray::onRay(Punkt3D p, int rnd) {
else if(g3) else if(g3)
return (r1 == r2); return (r1 == r2);
else else
return (r1 == r2 == r3); return ((r1 == r2) == r3);
} }
float Ray::dist(Punkt3D p) { float Ray::dist(Punkt3D p) {
@ -215,7 +215,7 @@ bool Plane::collision(const Plane &p) const {
} }
float Plane::dist(Punkt3D p) const { float Plane::dist(Punkt3D p) const {
return 0.0f;
} }
} // namespace segl } // namespace segl

View File

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

View File

@ -84,10 +84,10 @@ class Model {
void unload(); void unload();
void render(); void render();
Quader getBoundingBox() { return boundingbox; } Quader getBoundingBox() const { return boundingbox; }
float getBoundingRad() { return boundingrad; } float getBoundingRad() const { return boundingrad; }
const Punkt3D* getMeshData(unsigned int *meshanz); const Punkt3D* getMeshData(unsigned int *meshanz) const;
}; };
} // namespace segl } // namespace segl