//================================================================
void HYDROGUI_VTKPrsBathymetry::compute()
{
+ HYDROGUI_VTKPrs::compute();
+
if ( !getObject().IsNull() )
{
Handle(HYDROData_Bathymetry) aBathymetry = Handle(HYDROData_Bathymetry)::DownCast( getObject() );
vtkVertex* aVertex = vtkVertex::New();
- int aZ;
+ double aZ;
int anInvalidZ = InvalidZValue();
for (int i = 0; i < aNbPoints; i++ )
{
aZ = anAltPnt.Z();
if ( ValuesLessEquals( aZ, anInvalidZ ) )
{
- aZ = Z_MAX;
- }
- else
- {
- aZ = -aZ;
+ aZ = Z_MAX; // If Z value is invalid then use Z_MAX
}
aPoints->InsertPoint( i, anAltPnt.X(), anAltPnt.Y(), aZ );
aVertex->GetPointIds()->SetId( 0, i );
myMapper->SetInputData( aVertexGrid );
- SALOME_Actor* anActor = SALOME_Actor::New();
+ SALOME_Actor* anActor = getActor<SALOME_Actor>(this);
anActor->SetMapper( myMapper.GetPointer() );
anActor->setIO( getIO() );
AddObject( anActor );
- anActor->Delete();
aVertexGrid->Delete();
aZValues->Delete();
}