Added missing summeries #2
This commit is contained in:
parent
31777faa11
commit
c8db1ce8bc
26 changed files with 261 additions and 36 deletions
|
|
@ -23,6 +23,9 @@
|
|||
/// </summary>
|
||||
public static float UpdateDelta { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// The current fixed update delta time.
|
||||
/// </summary>
|
||||
public static float FixedUpdateDelta { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -5,9 +5,18 @@
|
|||
/// </summary>
|
||||
public interface IInitializable
|
||||
{
|
||||
/// <summary>
|
||||
/// If true, its already initialized.
|
||||
/// </summary>
|
||||
bool IsInitialized { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A event when the object was activated.
|
||||
/// </summary>
|
||||
void Activate();
|
||||
/// <summary>
|
||||
/// A event, when the object was first initialized.
|
||||
/// </summary>
|
||||
void Initialization();
|
||||
}
|
||||
}
|
||||
|
|
@ -8,17 +8,38 @@ using SM.OGL.Mesh;
|
|||
|
||||
namespace SM.Base.Utility
|
||||
{
|
||||
/// <summary>
|
||||
/// A utility class to calculate rays.
|
||||
/// </summary>
|
||||
public struct Ray
|
||||
{
|
||||
/// <summary>
|
||||
/// The position of the ray.
|
||||
/// </summary>
|
||||
public Vector3 Position;
|
||||
/// <summary>
|
||||
/// The direction of the ray.
|
||||
/// </summary>
|
||||
public Vector3 Direction;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a ray.
|
||||
/// </summary>
|
||||
/// <param name="position">The position of the ray</param>
|
||||
/// <param name="direction">The direction of the ray.</param>
|
||||
public Ray(Vector3 position, Vector3 direction)
|
||||
{
|
||||
Position = position;
|
||||
Direction = direction.Normalized();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculates a object intersection with OBB.
|
||||
/// </summary>
|
||||
/// <param name="box">The bounding box of the object</param>
|
||||
/// <param name="modelMatrix">The model matrix of the object</param>
|
||||
/// <param name="distance">Distance to the object.</param>
|
||||
/// <returns>If true, it intersects with the object.</returns>
|
||||
public bool ObjectIntersection(BoundingBox box, Matrix4 modelMatrix, out float distance)
|
||||
{
|
||||
distance = 0.0f;
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
namespace SM.Base.Utility
|
||||
{
|
||||
public class ShaderUtility
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -6,8 +6,15 @@ using System;
|
|||
|
||||
namespace SM.Base.Utility
|
||||
{
|
||||
/// <summary>
|
||||
/// Utility-Functions that are too small for a own class.
|
||||
/// </summary>
|
||||
public class Util
|
||||
{
|
||||
/// <summary>
|
||||
/// Activates a <see cref="IInitializable"/>
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
public static void Activate(IInitializable obj)
|
||||
{
|
||||
if (!obj.IsInitialized)
|
||||
|
|
@ -19,6 +26,9 @@ namespace SM.Base.Utility
|
|||
obj.Activate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calls a garbage collector.
|
||||
/// </summary>
|
||||
public static void CallGarbageCollector()
|
||||
{
|
||||
GC.Collect();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue