本文整理汇总了C++中Transform::GetInverse方法的典型用法代码示例。如果您正苦于以下问题:C++ Transform::GetInverse方法的具体用法?C++ Transform::GetInverse怎么用?C++ Transform::GetInverse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transform
的用法示例。
在下文中一共展示了Transform::GetInverse方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: le
DensityRegion::DensityRegion(const Spectrum &sa,
const Spectrum &ss, float gg,
const Spectrum &emit,
const Transform &VolumeToWorld)
: sig_a(sa), sig_s(ss), le(emit), g(gg) {
WorldToVolume = VolumeToWorld.GetInverse();
}
示例2: pbrtCamera
COREDLL void pbrtCamera(const string &name,
const ParamSet ¶ms) {
VERIFY_OPTIONS("Camera");
renderOptions->CameraName = name;
renderOptions->CameraParams = params;
renderOptions->WorldToCamera = curTransform;
namedCoordinateSystems["camera"] =
curTransform.GetInverse();
}
示例3: nShapesMade
// Shape Method Definitions
Shape::Shape(const Transform &o2w, bool ro)
: ObjectToWorld(o2w), WorldToObject(o2w.GetInverse()),
reverseOrientation(ro),
transformSwapsHandedness(o2w.SwapsHandedness()) {
// Update shape creation statistics
static StatsCounter nShapesMade("Geometry",
"Total shapes created");
++nShapesMade;
}
示例4:
// HomogeneousVolume Public Methods
HomogeneousVolume(const Spectrum &sa, const Spectrum &ss, float gg,
const Spectrum &emit, const BBox &e,
const Transform &v2w) {
WorldToVolume = v2w.GetInverse();
sig_a = sa;
sig_s = ss;
g = gg;
le = emit;
extent = e;
}
示例6: RunFluxAnalysis
//.........这里部分代码省略.........
m_pPhotonMap->SetBufferSize( HUGE_VAL );
m_tracedRays = 0;
m_wPhoton = 0;
m_totalPower = 0;
}
QVector< InstanceNode* > exportSuraceList;
QModelIndex nodeIndex = m_pCurrentSceneModel->IndexFromNodeUrl( m_surfaceURL );
if( !nodeIndex.isValid() ) return;
InstanceNode* surfaceNode = m_pCurrentSceneModel->NodeFromIndex( nodeIndex );
if( !surfaceNode || surfaceNode == 0 ) return;
exportSuraceList.push_back( surfaceNode );
//UpdateLightSize();
TSeparatorKit* concentratorRoot = static_cast< TSeparatorKit* >( m_pCurrentScene->getPart( "childList[0]", false ) );
if ( !concentratorRoot ) return;
SoGetBoundingBoxAction* bbAction = new SoGetBoundingBoxAction( SbViewportRegion() ) ;
concentratorRoot->getBoundingBox( bbAction );
SbBox3f box = bbAction->getXfBoundingBox().project();
delete bbAction;
bbAction = 0;
BBox sceneBox;
if( !box.isEmpty() )
{
sceneBox.pMin = Point3D( box.getMin()[0], box.getMin()[1], box.getMin()[2] );
sceneBox.pMax = Point3D( box.getMax()[0], box.getMax()[1], box.getMax()[2] );
if( lightKit ) lightKit->Update( sceneBox );
}
m_pCurrentSceneModel->UpdateSceneModel();
//Compute bounding boxes and world to object transforms
trf::ComputeSceneTreeMap( m_pRootSeparatorInstance, Transform( new Matrix4x4 ), true );
m_pPhotonMap->SetConcentratorToWorld( m_pRootSeparatorInstance->GetIntersectionTransform() );
QStringList disabledNodes = QString( lightKit->disabledNodes.getValue().getString() ).split( ";", QString::SkipEmptyParts );
QVector< QPair< TShapeKit*, Transform > > surfacesList;
trf::ComputeFistStageSurfaceList( m_pRootSeparatorInstance, disabledNodes, &surfacesList );
lightKit->ComputeLightSourceArea( m_sunWidthDivisions, m_sunHeightDivisions, surfacesList );
if( surfacesList.count() < 1 ) return;
QVector< long > raysPerThread;
int maximumValueProgressScale = 100;
unsigned long t1 = nOfRays/ maximumValueProgressScale;
for( int progressCount = 0; progressCount < maximumValueProgressScale; ++ progressCount )
raysPerThread<< t1;
if( ( t1 * maximumValueProgressScale ) < nOfRays ) raysPerThread<< ( nOfRays - ( t1* maximumValueProgressScale) );
Transform lightToWorld = tgf::TransformFromSoTransform( lightTransform );
lightInstance->SetIntersectionTransform( lightToWorld.GetInverse() );
// Create a progress dialog.
QProgressDialog dialog;
dialog.setLabelText( QString("Progressing using %1 thread(s)..." ).arg( QThread::idealThreadCount() ) );
// Create a QFutureWatcher and conncect signals and slots.
QFutureWatcher< void > futureWatcher;
QObject::connect(&futureWatcher, SIGNAL(finished()), &dialog, SLOT(reset()));
QObject::connect(&dialog, SIGNAL(canceled()), &futureWatcher, SLOT(cancel()));
QObject::connect(&futureWatcher, SIGNAL(progressRangeChanged(int, int)), &dialog, SLOT(setRange(int, int)));
QObject::connect(&futureWatcher, SIGNAL(progressValueChanged(int)), &dialog, SLOT(setValue(int)));
QMutex mutex;
QMutex mutexPhotonMap;
QFuture< void > photonMap;
if( transmissivity )
photonMap = QtConcurrent::map( raysPerThread, RayTracer( m_pRootSeparatorInstance,
lightInstance, raycastingSurface, sunShape, lightToWorld,
transmissivity,
*m_pRandomDeviate,
&mutex, m_pPhotonMap, &mutexPhotonMap,
exportSuraceList ) );
else
photonMap = QtConcurrent::map( raysPerThread, RayTracerNoTr( m_pRootSeparatorInstance,
lightInstance, raycastingSurface, sunShape, lightToWorld,
*m_pRandomDeviate,
&mutex, m_pPhotonMap, &mutexPhotonMap,
exportSuraceList ) );
futureWatcher.setFuture( photonMap );
// Display the dialog and start the event loop.
dialog.exec();
futureWatcher.waitForFinished();
m_tracedRays += nOfRays;
double irradiance = sunShape->GetIrradiance();
double inputAperture = raycastingSurface->GetValidArea();
m_wPhoton = double ( inputAperture * irradiance ) / m_tracedRays;
UpdatePhotonCounts();
}