本文整理汇总了C++中AxisAlignedBox::getMin方法的典型用法代码示例。如果您正苦于以下问题:C++ AxisAlignedBox::getMin方法的具体用法?C++ AxisAlignedBox::getMin怎么用?C++ AxisAlignedBox::getMin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AxisAlignedBox
的用法示例。
在下文中一共展示了AxisAlignedBox::getMin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadGeomSource
void GeometryApp::loadGeomSource( const geom::Source &source, const geom::Source &sourceWire )
{
// The purpose of the TriMesh is to capture a bounding box; without that need we could just instantiate the Batch directly using primitive
TriMesh::Format fmt = TriMesh::Format().positions().normals().texCoords().tangents();
if( mShowColors && source.getAvailableAttribs().count( geom::COLOR ) > 0 )
fmt.colors();
TriMesh mesh( source, fmt );
AxisAlignedBox bbox = mesh.calcBoundingBox();
mCameraLerpTarget = mesh.calcBoundingBox().getCenter();
mCameraViewDirection = mCamera.getViewDirection();
mRecenterCamera = true;
if( mPhongShader )
mPrimitive = gl::Batch::create( mesh, mPhongShader );
if( mWireShader )
mPrimitiveWire = gl::Batch::create( sourceWire, mWireShader );
if( mWireframeShader )
mPrimitiveWireframe = gl::Batch::create( mesh, mWireframeShader );
vec3 size = bbox.getMax() - bbox.getMin();
float scale = std::max( std::max( size.x, size.y ), size.z ) / 25.0f;
mPrimitiveNormalLines = gl::Batch::create( mesh >> geom::VertexNormalLines( scale ), gl::getStockShader( gl::ShaderDef().color() ) );
if( mesh.hasTangents() )
mPrimitiveTangentLines = gl::Batch::create( mesh >> geom::VertexNormalLines( scale, geom::TANGENT ), gl::getStockShader( gl::ShaderDef().color() ) );
else
示例2: to
PxBounds3 Physx::to( const AxisAlignedBox& b )
{
return PxBounds3( to( b.getMin() ), to( b.getMax() ) );
}