Engine prototype #13
@ -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 ---
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user