本文整理汇总了C++中OgreWorldPtr::get方法的典型用法代码示例。如果您正苦于以下问题:C++ OgreWorldPtr::get方法的具体用法?C++ OgreWorldPtr::get怎么用?C++ OgreWorldPtr::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OgreWorldPtr
的用法示例。
在下文中一共展示了OgreWorldPtr::get方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addPoint
void OcclusionDebugRenderer::addPoint(const Umbra::Vector3& pt, const Umbra::Vector4& color)
{
OgreWorldPtr ogreWorld = renderer_->GetActiveOgreWorld();
if(!ogreWorld.get())
return;
// Nothing to do here
float3 point = Vector3ToFloat3(pt);
ogreWorld->DebugDrawSphere(point, 0.1f, 6, Color::Red);
}
示例2: addLine
void OcclusionDebugRenderer::addLine(const Umbra::Vector3& start, const Umbra::Vector3& end, const Umbra::Vector4& color)
{
OgreWorldPtr ogreWorld = renderer_->GetActiveOgreWorld();
if(!ogreWorld.get())
return;
float3 start_ = Vector3ToFloat3(start);
float3 end_ = Vector3ToFloat3(end);
ogreWorld->DebugDrawLine(start_, end_, Color::Yellow);
}
示例3: addAABB
void OcclusionDebugRenderer::addAABB(const Umbra::Vector3& mn, const Umbra::Vector3& mx, const Umbra::Vector4& color)
{
OgreWorldPtr ogreWorld = renderer_->GetActiveOgreWorld();
if(!ogreWorld.get())
return;
float3 mn_ = Vector3ToFloat3(mn);
float3 mx_ = Vector3ToFloat3(mx);
Color color_ = Vector4ToColor(color);
AABB aabb(mn_, mx_);
ogreWorld->DebugDrawAABB(aabb, color_);
}
示例4: addQuad
void OcclusionDebugRenderer::addQuad(const Umbra::Vector3& x0y0, const Umbra::Vector3& x0y1, const Umbra::Vector3& x1y1, const Umbra::Vector3& x1y0, const Umbra::Vector4& color)
{
OgreWorldPtr ogreWorld = renderer_->GetActiveOgreWorld();
if(!ogreWorld.get())
return;
// Nothing to do here
float3 x0y0_, x0y1_, x1y0_, x1y1_;
x0y0_ = Vector3ToFloat3(x0y0);
x0y1_ = Vector3ToFloat3(x0y1);
x1y0_ = Vector3ToFloat3(x1y0);
x1y1_ = Vector3ToFloat3(x1y1);
ogreWorld->DebugDrawLine(x0y0_, x1y0_, Color::Yellow);
ogreWorld->DebugDrawLine(x1y0_, x1y1_, Color::Yellow);
ogreWorld->DebugDrawLine(x1y1_, x0y1_, Color::Yellow);
ogreWorld->DebugDrawLine(x0y1_, x0y0_, Color::Yellow);
}
示例5: DrawDebugGeometry
void PhysicsWorld::DrawDebugGeometry()
{
if (!IsDebugGeometryEnabled())
return;
PROFILE(PhysicsModule_DrawDebugGeometry);
// Draw debug only for the active (visible) scene
OgreWorldPtr ogreWorld = scene_.lock()->GetWorld<OgreWorld>();
cachedOgreWorld_ = ogreWorld.get();
if (!ogreWorld)
return;
if (!ogreWorld->IsActive())
return;
// Get all lines of the physics world
world_->debugDrawWorld();
}