Forgot to include AABB.h

This commit is contained in:
UnknownShadow200 2017-05-20 15:10:41 +10:00
parent 29050f33bc
commit 9e9cfae15f
5 changed files with 6 additions and 19 deletions

View File

@ -147,7 +147,8 @@ namespace ClassicalSharp.Entities {
UpdateModel();
Size = Model.CollisionSize * ModelScale;
modelAABB = Model.PickingBounds.Scale(ModelScale);
modelAABB = Model.PickingBounds;
modelAABB.Min *= ModelScale; modelAABB.Max *= ModelScale;
}
void ParseScale(string scale) {

View File

@ -33,18 +33,6 @@ namespace ClassicalSharp.Physics {
public AABB Offset(Vector3 amount) {
return new AABB(Min + amount, Max + amount);
}
/// <summary> Returns a new bounding box, with the minimum and maximum coordinates
/// of the original bounding box expanded away from origin the given vector. </summary>
public AABB Expand(Vector3 amount) {
return new AABB(Min - amount, Max + amount);
}
/// <summary> Returns a new bounding box, with the minimum and maximum coordinates
/// of the original bounding box scaled away from origin the given value. </summary>
public AABB Scale(float scale) {
return new AABB(Min * scale, Max * scale);
}
/// <summary> Determines whether this bounding box intersects
/// the given bounding box on any axes. </summary>

View File

@ -33,12 +33,6 @@ void AABB_Make(Vector3* pos, Vector3* size, AABB* result);
/* Returns a new AABB, with the min and max coordinates of the original AABB translated by the given vector. */
void AABB_Offset(AABB* bb, Vector3* amount, AABB* result);
/* Returns a new AABB, with the min and max coordinates of the original AABB expanded away from AABB centre by the given vector. */
void AABB_Expand(AABB* bb, Vector3* amount, AABB* result);
/* Returns a new AABB, with the min and max coordinates of the original AABB scaled by the given value. */
void AABB_Scale(AABB* bb, Real32 scale, AABB* result);
/* Determines whether this AABB intersects the given AABB on any axes. */
bool AABB_Intersects(AABB* bb, AABB* other);

View File

@ -169,6 +169,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="AABB.h" />
<ClInclude Include="BlockEnums.h" />
<ClInclude Include="BlockID.h" />
<ClInclude Include="Block.h" />

View File

@ -252,6 +252,9 @@
<ClInclude Include="SkyboxRenderer.h">
<Filter>Header Files\Rendering</Filter>
</ClInclude>
<ClInclude Include="AABB.h">
<Filter>Header Files\Math</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="NotchyGenerator.c">