Skip to content

Commit

Permalink
Why is a CameraIntrinsicTransform a FrameTransform? It's not an affin…
Browse files Browse the repository at this point in the history
…e transformation, right?
  • Loading branch information
liamjwang committed Feb 17, 2024
1 parent 3afb363 commit 2739296
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/killeengeo/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,20 +1161,20 @@ def check_dim():
# bulky.
return [self @ x for x in other]
elif isinstance(self, FrameTransform):
if isinstance(other, FrameTransform):
if isinstance(other, CameraIntrinsicTransform):
return CameraIntrinsicTransform(
self.data @ other.data, other._sensor_height, other._sensor_width
)
elif isinstance(other, CameraProjection):
return CameraProjection(self @ other.intrinsic, other.extrinsic.copy())
elif isinstance(other, FrameTransform):
return FrameTransform(self.data @ other.data)
elif isinstance(other, HasLocationAndDirection):
p = other.get_point()
v = other.get_direction()
p_ = self @ p
v_ = self @ v
return type(other).from_point_direction(p_, v_)
elif isinstance(other, CameraIntrinsicTransform):
return CameraIntrinsicTransform(
self.data @ other.data, other._sensor_height, other._sensor_width
)
elif isinstance(other, CameraProjection):
return CameraProjection(self @ other.intrinsic, other.extrinsic.copy())
elif isinstance(other, Primitive):
# Catches other primitives, which are parameterized by columns of points or vectors.
return type(other)(self.data @ other.data)
Expand Down

0 comments on commit 2739296

Please sign in to comment.