Rename crossSection to intersection in general code

This commit is contained in:
Jacob Støren
2019-11-26 12:30:44 +01:00
parent 54c96581f1
commit 0e14c63f07
43 changed files with 165 additions and 165 deletions

View File

@@ -64,7 +64,7 @@ RivExtrudedCurveIntersectionGeometryGenerator::RivExtrudedCurveIntersectionGeome
const RivIntersectionHexGridInterface* grid,
bool isFlattened,
const cvf::Vec3d& flattenedPolylineStartPoint )
: m_crossSection( crossSection )
: m_intersection( crossSection )
, m_polyLines( polylines )
, m_extrusionDirection( extrusionDirection )
, m_hexGrid( grid )
@@ -112,7 +112,7 @@ void RivExtrudedCurveIntersectionGeometryGenerator::calculateSegementTransformPr
cvf::Vec3d displayOffset( 0, 0, 0 );
{
RimGridView* gridView = nullptr;
m_crossSection->firstAncestorOrThisOfType( gridView );
m_intersection->firstAncestorOrThisOfType( gridView );
if ( gridView && gridView->ownerCase() )
{
displayOffset = gridView->ownerCase()->displayModelOffset();
@@ -254,10 +254,10 @@ void RivExtrudedCurveIntersectionGeometryGenerator::calculateArrays()
double maxSectionHeightUp = 0;
double maxSectionHeightDown = 0;
if ( m_crossSection->type == RimExtrudedCurveIntersection::CS_AZIMUTHLINE )
if ( m_intersection->type == RimExtrudedCurveIntersection::CS_AZIMUTHLINE )
{
maxSectionHeightUp = m_crossSection->lengthUp();
maxSectionHeightDown = m_crossSection->lengthDown();
maxSectionHeightUp = m_intersection->lengthUp();
maxSectionHeightDown = m_intersection->lengthDown();
if ( maxSectionHeightUp + maxSectionHeightDown == 0 )
{
@@ -320,7 +320,7 @@ void RivExtrudedCurveIntersectionGeometryGenerator::calculateArrays()
&hexPlaneCutTriangleVxes,
&cellFaceForEachTriangleEdge );
if ( m_crossSection->type == RimExtrudedCurveIntersection::CS_AZIMUTHLINE )
if ( m_intersection->type == RimExtrudedCurveIntersection::CS_AZIMUTHLINE )
{
bool hasAnyPointsOnSurface = false;
for ( caf::HexGridIntersectionTools::ClipVx vertex : hexPlaneCutTriangleVxes )
@@ -511,7 +511,7 @@ cvf::ref<cvf::DrawableGeo> RivExtrudedCurveIntersectionGeometryGenerator::create
cvf::ref<cvf::DrawableGeo>
RivExtrudedCurveIntersectionGeometryGenerator::createLineAlongExtrusionLineDrawable( const std::vector<cvf::Vec3d>& extrusionLine )
{
cvf::ref<caf::DisplayCoordTransform> transform = displayCoordTransform( crossSection() );
cvf::ref<caf::DisplayCoordTransform> transform = displayCoordTransform( intersection() );
std::vector<cvf::Vec3d> displayCoords;
for ( const auto& pt : extrusionLine )
@@ -537,7 +537,7 @@ cvf::ref<cvf::DrawableGeo> RivExtrudedCurveIntersectionGeometryGenerator::create
cvf::ref<cvf::DrawableGeo>
RivExtrudedCurveIntersectionGeometryGenerator::createPointsFromExtrusionLineDrawable( const std::vector<cvf::Vec3d>& extrusionLine )
{
cvf::ref<caf::DisplayCoordTransform> transform = displayCoordTransform( crossSection() );
cvf::ref<caf::DisplayCoordTransform> transform = displayCoordTransform( intersection() );
std::vector<cvf::Vec3d> displayCoords;
for ( const auto& pt : extrusionLine )
@@ -580,9 +580,9 @@ const cvf::Vec3fArray* RivExtrudedCurveIntersectionGeometryGenerator::triangleVx
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimExtrudedCurveIntersection* RivExtrudedCurveIntersectionGeometryGenerator::crossSection() const
RimExtrudedCurveIntersection* RivExtrudedCurveIntersectionGeometryGenerator::intersection() const
{
return m_crossSection;
return m_intersection;
}
//--------------------------------------------------------------------------------------------------

View File

@@ -49,7 +49,7 @@ class DrawableGeo;
class RivExtrudedCurveIntersectionGeometryGenerator : public cvf::Object, public RivIntersectionGeometryGeneratorIF
{
public:
RivExtrudedCurveIntersectionGeometryGenerator( RimExtrudedCurveIntersection* crossSection,
RivExtrudedCurveIntersectionGeometryGenerator( RimExtrudedCurveIntersection* intersection,
std::vector<std::vector<cvf::Vec3d>>& polylines,
const cvf::Vec3d& extrusionDirection,
const RivIntersectionHexGridInterface* grid,
@@ -77,7 +77,7 @@ public:
return m_faultMeshLabelAndAnchorPositions;
}
RimExtrudedCurveIntersection* crossSection() const;
RimExtrudedCurveIntersection* intersection() const;
cvf::Mat4d unflattenTransformMatrix( const cvf::Vec3d& intersectionPointFlat );
@@ -93,7 +93,7 @@ private:
void calculateSegementTransformPrLinePoint();
void calculateFlattenedOrOffsetedPolyline();
RimExtrudedCurveIntersection* m_crossSection;
RimExtrudedCurveIntersection* m_intersection;
cvf::cref<RivIntersectionHexGridInterface> m_hexGrid;
const std::vector<std::vector<cvf::Vec3d>> m_polyLines;
cvf::Vec3d m_extrusionDirection;

View File

@@ -85,21 +85,21 @@
///
//--------------------------------------------------------------------------------------------------
RivExtrudedCurveIntersectionPartMgr::RivExtrudedCurveIntersectionPartMgr( RimExtrudedCurveIntersection* rimCrossSection, bool isFlattened )
: m_rimCrossSection( rimCrossSection )
: m_rimIntersection( rimCrossSection )
, m_isFlattened( isFlattened )
{
CVF_ASSERT( m_rimCrossSection );
CVF_ASSERT( m_rimIntersection );
m_crossSectionFacesTextureCoords = new cvf::Vec2fArray;
m_intersectionFacesTextureCoords = new cvf::Vec2fArray;
cvf::Vec3d flattenedPolylineStartPoint;
std::vector<std::vector<cvf::Vec3d>> polyLines = m_rimCrossSection->polyLines( &flattenedPolylineStartPoint );
std::vector<std::vector<cvf::Vec3d>> polyLines = m_rimIntersection->polyLines( &flattenedPolylineStartPoint );
if ( polyLines.size() > 0 )
{
cvf::Vec3d direction = m_rimCrossSection->extrusionDirection();
cvf::ref<RivIntersectionHexGridInterface> hexGrid = m_rimCrossSection->createHexGridInterface();
m_crossSectionGenerator = new RivExtrudedCurveIntersectionGeometryGenerator( m_rimCrossSection,
cvf::Vec3d direction = m_rimIntersection->extrusionDirection();
cvf::ref<RivIntersectionHexGridInterface> hexGrid = m_rimIntersection->createHexGridInterface();
m_intersectionGenerator = new RivExtrudedCurveIntersectionGeometryGenerator( m_rimIntersection,
polyLines,
direction,
hexGrid.p(),
@@ -113,36 +113,36 @@ RivExtrudedCurveIntersectionPartMgr::RivExtrudedCurveIntersectionPartMgr( RimExt
//--------------------------------------------------------------------------------------------------
void RivExtrudedCurveIntersectionPartMgr::applySingleColorEffect()
{
if ( m_crossSectionGenerator.isNull() ) return;
if ( m_intersectionGenerator.isNull() ) return;
caf::SurfaceEffectGenerator geometryEffgen( cvf::Color3f::OLIVE, caf::PO_1 );
cvf::ref<cvf::Effect> geometryOnlyEffect = geometryEffgen.generateCachedEffect();
if ( m_crossSectionFaces.notNull() )
if ( m_intersectionFaces.notNull() )
{
m_crossSectionFaces->setEffect( geometryOnlyEffect.p() );
m_intersectionFaces->setEffect( geometryOnlyEffect.p() );
}
// Update mesh colors as well, in case of change
RiaPreferences* prefs = RiaApplication::instance()->preferences();
if ( m_crossSectionGridLines.notNull() )
if ( m_intersectionGridLines.notNull() )
{
cvf::ref<cvf::Effect> eff;
caf::MeshEffectGenerator CrossSectionEffGen( prefs->defaultGridLineColors() );
eff = CrossSectionEffGen.generateCachedEffect();
m_crossSectionGridLines->setEffect( eff.p() );
m_intersectionGridLines->setEffect( eff.p() );
}
if ( m_crossSectionFaultGridLines.notNull() )
if ( m_intersectionFaultGridLines.notNull() )
{
cvf::ref<cvf::Effect> eff;
caf::MeshEffectGenerator CrossSectionEffGen( prefs->defaultFaultGridLineColors() );
eff = CrossSectionEffGen.generateCachedEffect();
m_crossSectionFaultGridLines->setEffect( eff.p() );
m_intersectionFaultGridLines->setEffect( eff.p() );
}
}
@@ -155,12 +155,12 @@ void RivExtrudedCurveIntersectionPartMgr::updateCellResultColor( size_t
{
RivIntersectionResultsColoringTools::calculateIntersectionResultColors( timeStepIndex,
!m_isFlattened,
m_rimCrossSection,
m_crossSectionGenerator.p(),
m_rimIntersection,
m_intersectionGenerator.p(),
explicitScalarColorMapper,
explicitTernaryColorMapper,
m_crossSectionFaces.p(),
m_crossSectionFacesTextureCoords.p() );
m_intersectionFaces.p(),
m_intersectionFacesTextureCoords.p() );
}
//--------------------------------------------------------------------------------------------------
@@ -223,12 +223,12 @@ void RivIntersectionResultsColoringTools::calculateNodeOrElementNodeBasedGeoMech
//--------------------------------------------------------------------------------------------------
void RivExtrudedCurveIntersectionPartMgr::generatePartGeometry()
{
if ( m_crossSectionGenerator.isNull() ) return;
if ( m_intersectionGenerator.isNull() ) return;
bool useBufferObjects = true;
// Surface geometry
{
cvf::ref<cvf::DrawableGeo> geo = m_crossSectionGenerator->generateSurface();
cvf::ref<cvf::DrawableGeo> geo = m_intersectionGenerator->generateSurface();
if ( geo.notNull() )
{
geo->computeNormals();
@@ -243,20 +243,20 @@ void RivExtrudedCurveIntersectionPartMgr::generatePartGeometry()
part->setDrawable( geo.p() );
// Set mapping from triangle face index to cell index
cvf::ref<RivExtrudedCurveIntersectionSourceInfo> si = new RivExtrudedCurveIntersectionSourceInfo( m_crossSectionGenerator.p() );
cvf::ref<RivExtrudedCurveIntersectionSourceInfo> si = new RivExtrudedCurveIntersectionSourceInfo( m_intersectionGenerator.p() );
part->setSourceInfo( si.p() );
part->updateBoundingBox();
part->setEnableMask( intersectionCellFaceBit );
part->setPriority( RivPartPriority::PartType::Intersection );
m_crossSectionFaces = part;
m_intersectionFaces = part;
}
}
// Cell Mesh geometry
{
cvf::ref<cvf::DrawableGeo> geoMesh = m_crossSectionGenerator->createMeshDrawable();
cvf::ref<cvf::DrawableGeo> geoMesh = m_intersectionGenerator->createMeshDrawable();
if ( geoMesh.notNull() )
{
if ( useBufferObjects )
@@ -272,15 +272,15 @@ void RivExtrudedCurveIntersectionPartMgr::generatePartGeometry()
part->setEnableMask( intersectionCellMeshBit );
part->setPriority( RivPartPriority::PartType::MeshLines );
part->setSourceInfo( new RivMeshLinesSourceInfo( m_rimCrossSection ) );
part->setSourceInfo( new RivMeshLinesSourceInfo( m_rimIntersection ) );
m_crossSectionGridLines = part;
m_intersectionGridLines = part;
}
}
// Fault Mesh geometry
{
cvf::ref<cvf::DrawableGeo> geoMesh = m_crossSectionGenerator->createFaultMeshDrawable();
cvf::ref<cvf::DrawableGeo> geoMesh = m_intersectionGenerator->createFaultMeshDrawable();
if ( geoMesh.notNull() )
{
if ( useBufferObjects )
@@ -296,16 +296,16 @@ void RivExtrudedCurveIntersectionPartMgr::generatePartGeometry()
part->setEnableMask( intersectionFaultMeshBit );
part->setPriority( RivPartPriority::PartType::FaultMeshLines );
part->setSourceInfo( new RivMeshLinesSourceInfo( m_rimCrossSection ) );
part->setSourceInfo( new RivMeshLinesSourceInfo( m_rimIntersection ) );
m_crossSectionFaultGridLines = part;
m_intersectionFaultGridLines = part;
}
}
createPolyLineParts( useBufferObjects );
createExtrusionDirParts( useBufferObjects );
if ( m_isFlattened ) createFaultLabelParts( m_crossSectionGenerator->faultMeshLabelAndAnchorPositions() );
if ( m_isFlattened ) createFaultLabelParts( m_intersectionGenerator->faultMeshLabelAndAnchorPositions() );
applySingleColorEffect();
}
@@ -322,10 +322,10 @@ void RivExtrudedCurveIntersectionPartMgr::createFaultLabelParts( const std::vect
RimFaultInViewCollection* faultInViewColl = nullptr;
if ( !m_rimCrossSection->activeSeparateResultDefinition() )
if ( !m_rimIntersection->activeSeparateResultDefinition() )
{
RimEclipseView* eclipseView = nullptr;
m_rimCrossSection->firstAncestorOrThisOfType( eclipseView );
m_rimIntersection->firstAncestorOrThisOfType( eclipseView );
if ( eclipseView )
{
faultInViewColl = eclipseView->faultCollection();
@@ -351,7 +351,7 @@ void RivExtrudedCurveIntersectionPartMgr::createFaultLabelParts( const std::vect
drawableText->setTextColor( faultLabelColor );
}
cvf::BoundingBox bb = m_crossSectionFaces->boundingBox();
cvf::BoundingBox bb = m_intersectionFaces->boundingBox();
double labelZOffset = bb.extent().z() / 10;
int visibleFaultNameCount = 0;
@@ -427,11 +427,11 @@ void RivExtrudedCurveIntersectionPartMgr::createPolyLineParts( bool useBufferObj
m_highlightLineAlongPolyline = nullptr;
m_highlightPointsForPolyline = nullptr;
if ( m_rimCrossSection->type == RimExtrudedCurveIntersection::CS_POLYLINE ||
m_rimCrossSection->type == RimExtrudedCurveIntersection::CS_AZIMUTHLINE )
if ( m_rimIntersection->type == RimExtrudedCurveIntersection::CS_POLYLINE ||
m_rimIntersection->type == RimExtrudedCurveIntersection::CS_AZIMUTHLINE )
{
{
cvf::ref<cvf::DrawableGeo> polylineGeo = m_crossSectionGenerator->createLineAlongPolylineDrawable();
cvf::ref<cvf::DrawableGeo> polylineGeo = m_intersectionGenerator->createLineAlongPolylineDrawable();
if ( polylineGeo.notNull() )
{
if ( useBufferObjects )
@@ -463,7 +463,7 @@ void RivExtrudedCurveIntersectionPartMgr::createPolyLineParts( bool useBufferObj
}
}
cvf::ref<cvf::DrawableGeo> polylinePointsGeo = m_crossSectionGenerator->createPointsFromPolylineDrawable();
cvf::ref<cvf::DrawableGeo> polylinePointsGeo = m_intersectionGenerator->createPointsFromPolylineDrawable();
if ( polylinePointsGeo.notNull() )
{
if ( useBufferObjects )
@@ -509,11 +509,11 @@ void RivExtrudedCurveIntersectionPartMgr::createExtrusionDirParts( bool useBuffe
m_highlightLineAlongExtrusionDir = nullptr;
m_highlightPointsForExtrusionDir = nullptr;
if ( m_rimCrossSection->direction() == RimExtrudedCurveIntersection::CS_TWO_POINTS )
if ( m_rimIntersection->direction() == RimExtrudedCurveIntersection::CS_TWO_POINTS )
{
{
cvf::ref<cvf::DrawableGeo> polylineGeo = m_crossSectionGenerator->createLineAlongExtrusionLineDrawable(
m_rimCrossSection->polyLinesForExtrusionDirection() );
cvf::ref<cvf::DrawableGeo> polylineGeo = m_intersectionGenerator->createLineAlongExtrusionLineDrawable(
m_rimIntersection->polyLinesForExtrusionDirection() );
if ( polylineGeo.notNull() )
{
if ( useBufferObjects )
@@ -545,8 +545,8 @@ void RivExtrudedCurveIntersectionPartMgr::createExtrusionDirParts( bool useBuffe
}
}
cvf::ref<cvf::DrawableGeo> polylinePointsGeo = m_crossSectionGenerator->createPointsFromExtrusionLineDrawable(
m_rimCrossSection->polyLinesForExtrusionDirection() );
cvf::ref<cvf::DrawableGeo> polylinePointsGeo = m_intersectionGenerator->createPointsFromExtrusionLineDrawable(
m_rimIntersection->polyLinesForExtrusionDirection() );
if ( polylinePointsGeo.notNull() )
{
if ( useBufferObjects )
@@ -587,18 +587,18 @@ void RivExtrudedCurveIntersectionPartMgr::createExtrusionDirParts( bool useBuffe
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivExtrudedCurveIntersectionPartMgr::appendNativeCrossSectionFacesToModel( cvf::ModelBasicList* model,
void RivExtrudedCurveIntersectionPartMgr::appendNativeIntersectionFacesToModel( cvf::ModelBasicList* model,
cvf::Transform* scaleTransform )
{
if ( m_crossSectionFaces.isNull() )
if ( m_intersectionFaces.isNull() )
{
generatePartGeometry();
}
if ( m_crossSectionFaces.notNull() )
if ( m_intersectionFaces.notNull() )
{
m_crossSectionFaces->setTransform( scaleTransform );
model->addPart( m_crossSectionFaces.p() );
m_intersectionFaces->setTransform( scaleTransform );
model->addPart( m_intersectionFaces.p() );
}
}
@@ -607,21 +607,21 @@ void RivExtrudedCurveIntersectionPartMgr::appendNativeCrossSectionFacesToModel(
//--------------------------------------------------------------------------------------------------
void RivExtrudedCurveIntersectionPartMgr::appendMeshLinePartsToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform )
{
if ( m_crossSectionGridLines.isNull() )
if ( m_intersectionGridLines.isNull() )
{
generatePartGeometry();
}
if ( m_crossSectionGridLines.notNull() )
if ( m_intersectionGridLines.notNull() )
{
m_crossSectionGridLines->setTransform( scaleTransform );
model->addPart( m_crossSectionGridLines.p() );
m_intersectionGridLines->setTransform( scaleTransform );
model->addPart( m_intersectionGridLines.p() );
}
if ( m_crossSectionFaultGridLines.notNull() )
if ( m_intersectionFaultGridLines.notNull() )
{
m_crossSectionFaultGridLines->setTransform( scaleTransform );
model->addPart( m_crossSectionFaultGridLines.p() );
m_intersectionFaultGridLines->setTransform( scaleTransform );
model->addPart( m_intersectionFaultGridLines.p() );
}
if ( m_faultMeshLabelLines.notNull() )
@@ -646,7 +646,7 @@ void RivExtrudedCurveIntersectionPartMgr::appendPolylinePartsToModel( Rim3dView&
{
Rim2dIntersectionView* curr2dView = dynamic_cast<Rim2dIntersectionView*>( &view );
if ( m_rimCrossSection->inputPolyLineFromViewerEnabled || ( curr2dView && curr2dView->showDefiningPoints() ) )
if ( m_rimIntersection->inputPolyLineFromViewerEnabled || ( curr2dView && curr2dView->showDefiningPoints() ) )
{
if ( m_highlightLineAlongPolyline.notNull() )
{
@@ -661,7 +661,7 @@ void RivExtrudedCurveIntersectionPartMgr::appendPolylinePartsToModel( Rim3dView&
}
}
if ( m_rimCrossSection->inputExtrusionPointsFromViewerEnabled )
if ( m_rimIntersection->inputExtrusionPointsFromViewerEnabled )
{
if ( m_highlightLineAlongExtrusionDir.notNull() )
{
@@ -676,7 +676,7 @@ void RivExtrudedCurveIntersectionPartMgr::appendPolylinePartsToModel( Rim3dView&
}
}
if ( m_rimCrossSection->inputTwoAzimuthPointsFromViewerEnabled || ( curr2dView && curr2dView->showDefiningPoints() ) )
if ( m_rimIntersection->inputTwoAzimuthPointsFromViewerEnabled || ( curr2dView && curr2dView->showDefiningPoints() ) )
{
if ( m_highlightLineAlongPolyline.notNull() )
{
@@ -697,7 +697,7 @@ void RivExtrudedCurveIntersectionPartMgr::appendPolylinePartsToModel( Rim3dView&
//--------------------------------------------------------------------------------------------------
const RimExtrudedCurveIntersection* RivExtrudedCurveIntersectionPartMgr::intersection() const
{
return m_rimCrossSection.p();
return m_rimIntersection.p();
}
//--------------------------------------------------------------------------------------------------
@@ -705,5 +705,5 @@ const RimExtrudedCurveIntersection* RivExtrudedCurveIntersectionPartMgr::interse
//--------------------------------------------------------------------------------------------------
cvf::Mat4d RivExtrudedCurveIntersectionPartMgr::unflattenTransformMatrix( const cvf::Vec3d& intersectionPointFlat )
{
return m_crossSectionGenerator->unflattenTransformMatrix( intersectionPointFlat );
return m_intersectionGenerator->unflattenTransformMatrix( intersectionPointFlat );
}

View File

@@ -64,14 +64,14 @@ class RivPipeGeometryGenerator;
class RivExtrudedCurveIntersectionPartMgr : public cvf::Object
{
public:
explicit RivExtrudedCurveIntersectionPartMgr( RimExtrudedCurveIntersection* rimCrossSection, bool isFlattened = false );
explicit RivExtrudedCurveIntersectionPartMgr( RimExtrudedCurveIntersection* rimIntersection, bool isFlattened = false );
void applySingleColorEffect();
void updateCellResultColor( size_t timeStepIndex,
const cvf::ScalarMapper* explicitScalarColorMapper,
const RivTernaryScalarMapper* explicitTernaryColorMapper );
void appendNativeCrossSectionFacesToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
void appendNativeIntersectionFacesToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
void appendMeshLinePartsToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
void appendPolylinePartsToModel( Rim3dView& view, cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
@@ -87,13 +87,13 @@ private:
void createExtrusionDirParts( bool useBufferObjects );
private:
caf::PdmPointer<RimExtrudedCurveIntersection> m_rimCrossSection;
caf::PdmPointer<RimExtrudedCurveIntersection> m_rimIntersection;
cvf::ref<RivExtrudedCurveIntersectionGeometryGenerator> m_crossSectionGenerator;
cvf::ref<RivExtrudedCurveIntersectionGeometryGenerator> m_intersectionGenerator;
cvf::ref<cvf::Part> m_crossSectionFaces;
cvf::ref<cvf::Part> m_crossSectionGridLines;
cvf::ref<cvf::Part> m_crossSectionFaultGridLines;
cvf::ref<cvf::Part> m_intersectionFaces;
cvf::ref<cvf::Part> m_intersectionGridLines;
cvf::ref<cvf::Part> m_intersectionFaultGridLines;
cvf::ref<cvf::Part> m_faultMeshLabels;
cvf::ref<cvf::Part> m_faultMeshLabelLines;
cvf::ref<cvf::Part> m_highlightLineAlongPolyline;
@@ -101,7 +101,7 @@ private:
cvf::ref<cvf::Part> m_highlightLineAlongExtrusionDir;
cvf::ref<cvf::Part> m_highlightPointsForExtrusionDir;
cvf::ref<cvf::Vec2fArray> m_crossSectionFacesTextureCoords;
cvf::ref<cvf::Vec2fArray> m_intersectionFacesTextureCoords;
struct RivPipeBranchData
{

View File

@@ -25,9 +25,9 @@
///
//--------------------------------------------------------------------------------------------------
RivExtrudedCurveIntersectionSourceInfo::RivExtrudedCurveIntersectionSourceInfo( RivExtrudedCurveIntersectionGeometryGenerator* geometryGenerator )
: m_crossSectionGeometryGenerator( geometryGenerator )
: m_intersectionGeometryGenerator( geometryGenerator )
{
CVF_ASSERT( m_crossSectionGeometryGenerator.notNull() );
CVF_ASSERT( m_intersectionGeometryGenerator.notNull() );
}
//--------------------------------------------------------------------------------------------------
@@ -35,9 +35,9 @@ RivExtrudedCurveIntersectionSourceInfo::RivExtrudedCurveIntersectionSourceInfo(
//--------------------------------------------------------------------------------------------------
const std::vector<size_t>& RivExtrudedCurveIntersectionSourceInfo::triangleToCellIndex() const
{
CVF_ASSERT( m_crossSectionGeometryGenerator.notNull() );
CVF_ASSERT( m_intersectionGeometryGenerator.notNull() );
return m_crossSectionGeometryGenerator->triangleToCellIndex();
return m_intersectionGeometryGenerator->triangleToCellIndex();
}
//--------------------------------------------------------------------------------------------------
@@ -46,9 +46,9 @@ const std::vector<size_t>& RivExtrudedCurveIntersectionSourceInfo::triangleToCel
std::array<cvf::Vec3f, 3> RivExtrudedCurveIntersectionSourceInfo::triangle( int triangleIdx ) const
{
std::array<cvf::Vec3f, 3> tri;
tri[0] = ( *m_crossSectionGeometryGenerator->triangleVxes() )[triangleIdx * 3];
tri[1] = ( *m_crossSectionGeometryGenerator->triangleVxes() )[triangleIdx * 3 + 1];
tri[2] = ( *m_crossSectionGeometryGenerator->triangleVxes() )[triangleIdx * 3 + 2];
tri[0] = ( *m_intersectionGeometryGenerator->triangleVxes() )[triangleIdx * 3];
tri[1] = ( *m_intersectionGeometryGenerator->triangleVxes() )[triangleIdx * 3 + 1];
tri[2] = ( *m_intersectionGeometryGenerator->triangleVxes() )[triangleIdx * 3 + 2];
return tri;
}
@@ -56,7 +56,7 @@ std::array<cvf::Vec3f, 3> RivExtrudedCurveIntersectionSourceInfo::triangle( int
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimExtrudedCurveIntersection* RivExtrudedCurveIntersectionSourceInfo::crossSection() const
RimExtrudedCurveIntersection* RivExtrudedCurveIntersectionSourceInfo::intersection() const
{
return m_crossSectionGeometryGenerator->crossSection();
return m_intersectionGeometryGenerator->intersection();
}

View File

@@ -33,8 +33,8 @@ public:
const std::vector<size_t>& triangleToCellIndex() const;
std::array<cvf::Vec3f, 3> triangle( int triangleIdx ) const;
RimExtrudedCurveIntersection* crossSection() const;
RimExtrudedCurveIntersection* intersection() const;
private:
cvf::cref<RivExtrudedCurveIntersectionGeometryGenerator> m_crossSectionGeometryGenerator;
cvf::cref<RivExtrudedCurveIntersectionGeometryGenerator> m_intersectionGeometryGenerator;
};

View File

@@ -186,7 +186,7 @@ void RivIntersectionBoxPartMgr::updatePartEffect()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionBoxPartMgr::appendNativeCrossSectionFacesToModel( cvf::ModelBasicList* model,
void RivIntersectionBoxPartMgr::appendNativeIntersectionFacesToModel( cvf::ModelBasicList* model,
cvf::Transform* scaleTransform )
{
if ( m_intersectionBoxFaces.isNull() && m_intersectionBoxGridLines.isNull() )

View File

@@ -57,7 +57,7 @@ public:
void applySingleColorEffect();
void updateCellResultColor( size_t timeStepIndex );
void appendNativeCrossSectionFacesToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
void appendNativeIntersectionFacesToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
void appendMeshLinePartsToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
private: