34 pxr::UsdGeomCamera cam_prim(
prim_);
41 cam_prim.GetFocalLengthAttr().Get(&val, motionSampleTime);
42 pxr::VtValue verApOffset;
43 cam_prim.GetVerticalApertureOffsetAttr().Get(&verApOffset, motionSampleTime);
44 pxr::VtValue horApOffset;
45 cam_prim.GetHorizontalApertureOffsetAttr().Get(&horApOffset, motionSampleTime);
46 pxr::VtValue clippingRangeVal;
47 cam_prim.GetClippingRangeAttr().Get(&clippingRangeVal, motionSampleTime);
48 pxr::VtValue focalDistanceVal;
49 cam_prim.GetFocusDistanceAttr().Get(&focalDistanceVal, motionSampleTime);
50 pxr::VtValue fstopVal;
51 cam_prim.GetFStopAttr().Get(&fstopVal, motionSampleTime);
52 pxr::VtValue projectionVal;
53 cam_prim.GetProjectionAttr().Get(&projectionVal, motionSampleTime);
55 cam_prim.GetVerticalApertureAttr().Get(&verAp, motionSampleTime);
57 cam_prim.GetHorizontalApertureAttr().Get(&horAp, motionSampleTime);
68 bcam->
lens = val.Get<
float>() * tenth_unit_to_millimeters;
69 bcam->
sensor_x = horAp.Get<
float>() * tenth_unit_to_millimeters;
70 bcam->
sensor_y = verAp.Get<
float>() * tenth_unit_to_millimeters;
76 bcam->
shiftx = (horApOffset.Get<
float>() * tenth_unit_to_millimeters) / sensor_size;
77 bcam->
shifty = (verApOffset.Get<
float>() * tenth_unit_to_millimeters) / sensor_size;
79 bcam->
type = (projectionVal.Get<pxr::TfToken>().GetString() ==
"perspective") ?
CAM_PERSP :
84 bcam->
clip_start =
max_ff(1e-6f, clippingRangeVal.UncheckedGet<pxr::GfVec2f>()[0]);
85 bcam->
clip_end = clippingRangeVal.UncheckedGet<pxr::GfVec2f>()[1];