mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-24 05:10:42 -04:00
Forgot to include AABB.h
This commit is contained in:
parent
29050f33bc
commit
9e9cfae15f
@ -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) {
|
||||
|
@ -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>
|
||||
|
@ -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);
|
||||
|
||||
|
@ -169,6 +169,7 @@
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="AABB.h" />
|
||||
<ClInclude Include="BlockEnums.h" />
|
||||
<ClInclude Include="BlockID.h" />
|
||||
<ClInclude Include="Block.h" />
|
||||
|
@ -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">
|
||||
|
Loading…
x
Reference in New Issue
Block a user