This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Ara3D.Buffers; | |
using Ara3D.Collections; | |
using Ara3D.NarwhalDB; | |
namespace Ara3D.IfcParser; | |
public class IfcPropertyDataReader | |
{ | |
public IfcPropertyDataReader(IReadOnlyList<ByteSpanBuffer> buffers) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Modified from https://github.com/ThatOpen/engine_web-ifc/blob/main/src/cpp/web-ifc-test.cpp | |
This is a snippet of code used to properly benchmark Web IFC in C++ | |
https://github.com/ThatOpen/engine_web-ifc for loading files and counting doors. | |
Unlike the previous code, we count the entire file load process. | |
*/ | |
int main(int argc, char* argv[]) | |
{ | |
std::cout << "Web IFC test" << std::endl; | |
std::cout << "# args = " << argc << std::endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ConceptExamples | |
{ | |
Number Lerp(Number a, Number b, double t) | |
=> a * t + b * (1.0 - t); | |
Number Dot(Vector v) | |
=> (v * v).Sum().Sqrt(); | |
Number Sum(Array xs) | |
=> xs.Aggregate((x, y) => x + y); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Plato; | |
#region Groups | |
// https://en.wikipedia.org/wiki/Algebraic_group | |
interface IGroup<T> | |
where T : IGroup<T> | |
{ | |
T GroupOperation(T x); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using UnityEngine; | |
[ExecuteAlways] | |
public class PMoveTowards : MonoBehaviour | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IAnimationCurve | |
{ | |
double this[double t] { get; } | |
double Duration { get; } | |
} | |
public class AnimationClip<T> : IAnimationClip<T> | |
{ | |
public AnimationClip(IAnimationCurve curve, T from, T to, Func<T, T, double, T> lerp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IAnimator | |
{ | |
IArray<IAnimation> Animations { get; } | |
IAnimator Start(IAnimation anim); | |
IAnimator End(IAnimation anim); | |
IAnimator IsRunning(); | |
T Drive<T>(IAnimation animation, Func<T, T, float, T> lerp); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Here is the basic class | |
public class Vector2_ClassNaive | |
{ | |
public double x, y; | |
} | |
// Once we decide immutability is a good thing | |
public class Vector2_ClassWithFields | |
{ | |
public readonly double x, y; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Plato; | |
public class VectorAttribute : Attribute { } | |
public class ValueAttribute : Attribute { } | |
public class MeasureAttribute : Attribute { } | |
public class NumberAttribute : Attribute { } | |
public class IntervalAttribute : Attribute { } | |
namespace Plato |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Plato | |
{ | |
public partial struct Float2 : IVector<float> | |
{ | |
public float X { get; } | |
public float Y { get; } | |
} |
NewerOlder