Remove pointless unused methods from Model classes.

This commit is contained in:
UnknownShadow200 2017-06-16 22:48:45 +10:00
parent 9016dc1e33
commit 5f5dd498e9
4 changed files with 8 additions and 11 deletions

View File

@ -10,7 +10,7 @@ namespace ClassicalSharp.Model {
/// <summary> Contains a set of quads and/or boxes that describe a 3D object as well as
/// the bounding boxes that contain the entire set of quads and/or boxes. </summary>
public abstract class IModel : IDisposable {
public abstract class IModel {
protected Game game;
protected const int quadVertices = 4;
protected const int boxVertices = 6 * quadVertices;
@ -146,9 +146,6 @@ namespace ClassicalSharp.Model {
index = 0;
}
/// <summary> Disposes of any native resources tied to this entity model. </summary>
public virtual void Dispose() { }
protected internal virtual Matrix4 TransformMatrix(Entity p, Vector3 pos) {
return p.TransformMatrix(p.ModelScale, pos);

View File

@ -48,10 +48,6 @@ namespace ClassicalSharp.Model {
float temp = X1; X1 = X2; X2 = temp;
return this;
}
public BoxDesc SetX1(float value) { X1 = value / 16f; return this; }
public BoxDesc SetX2(float value) { X1 = value / 16f; return this; }
}
/// <summary> Contains methods to create parts of 3D objects, typically boxes and quads. </summary>

View File

@ -74,9 +74,6 @@ namespace ClassicalSharp.Model {
public void Dispose() {
game.Events.TextureChanged -= TextureChanged;
for (int i = 0; i < Models.Count; i++)
Models[i].Instance.Dispose();
for (int i = 0; i < Textures.Count; i++) {
CachedTexture tex = Textures[i];
gfx.DeleteTexture(ref tex.TexID);

View File

@ -46,6 +46,13 @@ namespace ClassicalSharp.Physics {
return false;
}
/// <summary> Determines whether this bounding box entirely contains
/// the given bounding box on all axes. </summary>
public bool Contains(AABB other) {
return other.Min.X >= Min.X && other.Min.Y >= Min.Y && other.Min.Z >= Min.Z &&
other.Max.X <= Max.X && other.Max.Y <= Max.Y && other.Max.Z <= Max.Z;
}
/// <summary> Determines whether this bounding box entirely contains
/// the coordinates on all axes. </summary>
public bool Contains(Vector3 P) {