mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-24 05:10:42 -04:00
Remove pointless unused methods from Model classes.
This commit is contained in:
parent
9016dc1e33
commit
5f5dd498e9
@ -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);
|
||||
|
@ -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>
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user