Engine prototype #13

Merged
glen merged 133 commits from engine-proto into main 2024-10-21 03:18:48 +00:00
Showing only changes of commit 0731c7aac1 - Show all commits

View File

@ -87,7 +87,7 @@ struct LiesOn{T} <: Relation{T}
LiesOn{T}(pt::Point{T}, sph::Sphere{T}) where T = new{T}([pt, sph]) LiesOn{T}(pt::Point{T}, sph::Sphere{T}) where T = new{T}([pt, sph])
end end
equation(rel::LiesOn) = dot(rel.elements[1].vec, rel.elements[2].vec) equation(rel::LiesOn) = mprod(rel.elements[1].vec, rel.elements[2].vec)
# elements: sphere, sphere # elements: sphere, sphere
struct AlignsWithBy{T} <: Relation{T} struct AlignsWithBy{T} <: Relation{T}
@ -97,7 +97,7 @@ struct AlignsWithBy{T} <: Relation{T}
AlignsWithBy{T}(sph1::Sphere{T}, sph2::Sphere{T}, cos_angle::T) where T = new{T}([sph1, sph2], cos_angle) AlignsWithBy{T}(sph1::Sphere{T}, sph2::Sphere{T}, cos_angle::T) where T = new{T}([sph1, sph2], cos_angle)
end end
equation(rel::AlignsWithBy) = dot(rel.elements[1].vec, rel.elements[2].vec) - rel.cos_angle equation(rel::AlignsWithBy) = mprod(rel.elements[1].vec, rel.elements[2].vec) - rel.cos_angle
# --- constructions --- # --- constructions ---