本文整理汇总了C++中Transform3D::scale方法的典型用法代码示例。如果您正苦于以下问题:C++ Transform3D::scale方法的具体用法?C++ Transform3D::scale怎么用?C++ Transform3D::scale使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transform3D
的用法示例。
在下文中一共展示了Transform3D::scale方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
// Qt Streams
QDebug operator<<(QDebug dbg, const Transform3D &transform)
{
dbg << "Transform3D\n{\n";
dbg << "Position: <" << transform.translation().x() << ", " << transform.translation().y() << ", " << transform.translation().z() << ">\n";
dbg << "Scale: <" << transform.scale().x() << ", " << transform.scale().y() << ", " << transform.scale().z() << ">\n";
dbg << "Rotation: <" << transform.rotation().x() << ", " << transform.rotation().y() << ", " << transform.rotation().z() << " | " << transform.rotation().scalar() << ">\n}";
return dbg;
}
示例2: updateSphere
void DebugAttachmentSystem::updateSphere(
DebugSphereInstance & sphere,
const std::shared_ptr<Attachment> & attachment,
const Transform3D & transform)
{
sphere.setTransform(Transform3D::fromPose(attachment->worldPose()));
sphere.setColor({0.3f, 1.0f, 0.3});
sphere.setVisible(false);
sphere.setRadius(transform.scale());
}
示例3:
Transform3D Transform3D::interpolated(const Transform3D & other, float v) const
{
Transform3D result;
result.setOrientation(glm::slerp(m_orientation, other.orientation(), v));
result.setPosition(glm::mix(m_position, other.position(), v));
result.setScale(glm::mix(m_scale, other.scale(), v));
result.setCenter(glm::mix(m_center, other.center(), v));
return result;
}
示例4: ImGuiProperty
void ImGuiProperty(const Transform3D &transform3D) {
auto position = transform3D.position();
auto center = transform3D.center();
auto scale = transform3D.scale();
auto orientation = transform3D.orientation();
ImGui::InputFloat3("Position", &position[0]);
ImGui::InputFloat3("Center", ¢er[0]);
ImGui::InputFloat("Scale", &scale);
ImGui::InputFloat4("Orientation", &orientation[0]);
}
示例5: updatePose
void DebugAttachmentSystem::updatePose(
DebugPoseInstance & pose,
const std::shared_ptr<Attachment> & attachment,
const Transform3D & transform)
{
auto transform2 = transform;
transform2.setScale(transform.scale() * 20.0f);
pose.setTransform(transform);
pose.setVisible(true);
}
示例6: createTransformScale
/**Create a transform representing a scale in x,y,z
*/
Transform3D createTransformScale(const Vector3D& scale_)
{
Transform3D retval = Transform3D::Identity();
retval.scale(scale_);
return retval;
}