本文整理汇总了C++中float4x4类的典型用法代码示例。如果您正苦于以下问题:C++ float4x4类的具体用法?C++ float4x4怎么用?C++ float4x4使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了float4x4类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: Transform
void Capsule::Transform(const float4x4 &transform)
{
assume(transform.HasUniformScale());
assume(transform.IsColOrthogonal3());
l.Transform(transform);
r *= transform.Col3(0).Length(); // Scale the radius.
}
开发者ID:360degrees-fi,项目名称:tundra,代码行数:7,代码来源:Capsule.cpp
示例2: Transform
void Sphere::Transform(const float4x4 &transform)
{
assume(transform.HasUniformScale());
assume(!transform.ContainsProjection());
pos = transform.MulPos(pos);
r *= transform.Col3(0).Length();
}
开发者ID:juj,项目名称:MathGeoLib,代码行数:7,代码来源:Sphere.cpp
示例3: Transform
void Circle::Transform(const float4x4 &transform)
{
assume(transform.HasUniformScale());
assume(transform.IsColOrthogonal3());
pos = transform.MulPos(pos);
normal = transform.MulDir(normal).Normalized();
r *= transform.Col3(0).Length(); // Scale the radius of the circle.
}
开发者ID:360degrees-fi,项目名称:tundra,代码行数:8,代码来源:Circle.cpp
示例4: TransformAsAABB
void AABB::TransformAsAABB(const float4x4 &transform)
{
assume(transform.IsColOrthogonal3());
assume(transform.HasUniformScale());
assume(transform.Row(3).Equals(0,0,0,1));
AABBTransformAsAABB(*this, transform);
}
开发者ID:katik,项目名称:naali,代码行数:8,代码来源:AABB.cpp
示例5: TransformAsAABB
void AABB::TransformAsAABB(const float4x4 &transform)
{
assume(transform.IsColOrthogonal3());
assume(transform.HasUniformScale());
assume(transform.Row(3).Equals(0,0,0,1));
#if defined(MATH_AUTOMATIC_SSE) && defined(MATH_SIMD)
AABBTransformAsAABB_SIMD(*this, transform);
#else
AABBTransformAsAABB(*this, transform);
#endif
}
开发者ID:ChunHungLiu,项目名称:MathGeoLib,代码行数:12,代码来源:AABB.cpp
示例6: Set
void Quat::Set(const float4x4 &m)
{
assume(m.IsColOrthogonal3());
assume(m.HasUnitaryScale());
assume(!m.HasNegativeScale());
assume(m.Row(3).Equals(0,0,0,1));
SetQuatFrom(*this, m);
#ifdef MATH_ASSERT_CORRECTNESS
// Test that the conversion float3x3->Quat->float3x3 is correct.
mathassert(this->ToFloat3x3().Equals(m.Float3x3Part(), 0.01f));
#endif
}
开发者ID:360degrees-fi,项目名称:tundra,代码行数:13,代码来源:Quat.cpp
示例7:
float4x4 operator *(const float4x4 &lhs, const TranslateOp &rhs)
{
float4x4 r = lhs;
r.SetTranslatePart(lhs.TransformPos(rhs.Offset()));
// Our optimized form of multiplication must be the same as this.
mathassert(r.Equals(lhs * rhs.ToFloat4x4()));
return r;
}
开发者ID:360degrees-fi,项目名称:tundra,代码行数:9,代码来源:TransformOps.cpp
示例8: assume
float4x4 operator *(const TranslateOp &lhs, const float4x4 &rhs)
{
// This function is based on the optimized assumption that the last row of rhs is [0,0,0,1].
// If this does not hold and you are hitting the check below, explicitly cast TranslateOp lhs to float4x4 before multiplication!
assume(rhs.Row(3).Equals(0.f, 0.f, 0.f, 1.f));
float4x4 r = rhs;
r.SetTranslatePart(r.TranslatePart() + DIR_TO_FLOAT3(lhs.Offset()));
return r;
}
开发者ID:juj,项目名称:MathGeoLib,代码行数:10,代码来源:TransformOps.cpp
示例9: tfm
Aabb operator * (const float4x4 &tfm, const Aabb &a)
{
Aabb result = { tfm.getTranslation(), tfm.getTranslation() };
for (int i = 1; i < 4; ++i)
{
for (int j = 1; j < 4; ++ j)
{
float e = tfm(i,j) * a.min[j - 1];
float f = tfm(i,j) * a.max[j - 1];
if (e < f)
{
result.min[i - 1] += e;
result.max[i - 1] += f;
}
else
{
result.min[i - 1] += f;
result.max[i - 1] += e;
}
}
}
return result;
}
开发者ID:rocksjtu,项目名称:SelfLuminous,代码行数:24,代码来源:Aabb.cpp
示例10: Transform
void OBB::Transform(const float4x4 &transform)
{
assume(transform.IsOrthogonal3());
OBBTransform(*this, transform);
}
开发者ID:Ilikia,项目名称:naali,代码行数:5,代码来源:OBB.cpp
示例11: Transform
void Frustum::Transform(const float4x4 &transform)
{
assume(transform.Row(3).Equals(0,0,0,1));
Transform(transform.Float3x4Part());
}
开发者ID:chengzg,项目名称:MathGeoLib,代码行数:5,代码来源:Frustum.cpp
示例12: SetFrom
void OBB::SetFrom(const AABB &aabb, const float4x4 &transform)
{
assume(transform.Row(3).Equals(0,0,0,1));
OBBSetFrom(*this, aabb, transform.Float3x4Part());
}
开发者ID:OtterOrder,项目名称:TBToolkit,代码行数:5,代码来源:OBB.cpp
示例13: Transform
void Ray::Transform(const float4x4 &transform)
{
pos = transform.TransformPos(pos);
dir = transform.TransformDir(dir);
}
开发者ID:Ilikia,项目名称:naali,代码行数:5,代码来源:Ray.cpp
示例14: Ray
Ray operator *(const float4x4 &transform, const Ray &ray)
{
return Ray(transform.MulPos(ray.pos), transform.MulDir(ray.dir));
}
开发者ID:Ilikia,项目名称:naali,代码行数:4,代码来源:Ray.cpp
示例15: Ray
Ray operator *(const float4x4 &transform, const Ray &ray)
{
assume(transform.IsInvertible());
return Ray(transform.MulPos(ray.pos), transform.MulDir(ray.dir).Normalized());
}
开发者ID:ggf31416,项目名称:CompGraf1,代码行数:5,代码来源:Ray.cpp
示例16:
transform::transform(const float4x4 &m)
: m_xfrm(m), m_inv(m.inverse())
{}
开发者ID:jaredhoberock,项目名称:igloo,代码行数:3,代码来源:transform.cpp
示例17: Transform
void Polyhedron::Transform(const float4x4 &transform)
{
for(size_t i = 0; i < v.size(); ++i)
v[i] = transform.MulPos(v[i]); ///\todo Add float4x4::BatchTransformPos.
}
开发者ID:360degrees-fi,项目名称:tundra,代码行数:5,代码来源:Polyhedron.cpp
示例18: Transform
void Triangle::Transform(const float4x4 &transform)
{
a = transform.MulPos(a);
b = transform.MulPos(b);
c = transform.MulPos(c);
}
开发者ID:d0n3val,项目名称:Edu-Game-Engine,代码行数:6,代码来源:Triangle.cpp
示例19: Transform
void Plane::Transform(const float4x4 &transform)
{
assume(transform.Row(3).Equals(float4(0,0,0,1)));
Transform(transform.Float3x4Part());
}
开发者ID:Ilikia,项目名称:naali,代码行数:5,代码来源:Plane.cpp
示例20: Transform
void Line::Transform(const float4x4 &transform)
{
pos = transform.MulPos(pos);
dir = transform.MulDir(dir);
}
开发者ID:jnmacd,项目名称:MathGeoLib,代码行数:5,代码来源:Line.cpp
注:本文中的float4x4类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论