Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,15 @@ VisualModelImpl::VisualModelImpl() //const std::string &name, std::string filena
// add one identity matrix
xforms.resize(1);

addUpdateCallback("updateGeometry", {&d_triangles},
[&](const core::DataTracker&) -> sofa::core::objectmodel::ComponentState {
modified=true;
return sofa::core::objectmodel::ComponentState::Loading;
}, {&d_componentState});

addUpdateCallback("updateTextures", { &d_texturename },
[&](const core::DataTracker& tracker) -> sofa::core::objectmodel::ComponentState
[&](const core::DataTracker&) -> sofa::core::objectmodel::ComponentState
{
SOFA_UNUSED(tracker);
m_textureChanged = true;
return sofa::core::objectmodel::ComponentState::Loading;
}, { &d_componentState });
Expand Down
2 changes: 1 addition & 1 deletion Sofa/framework/Core/src/sofa/core/fwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace sofa::helper::visual { class DrawTool; }
namespace sofa::core
{


class ObjectFactory;
class BaseState;
class BaseMapping;
class BehaviorModel;
Expand Down
2 changes: 1 addition & 1 deletion Sofa/framework/Core/src/sofa/core/objectmodel/Base.h
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ class SOFA_CORE_API Base : public IntrusiveObject
/// @name componentstate
/// Methods related to component state
/// @{

int getRevisionCounter() const { return d_componentState.getCounter(); }
ComponentState getComponentState() const { return d_componentState.getValue() ; }
bool isComponentStateValid() const { return d_componentState.getValue() == ComponentState::Valid; }
bool isComponentStateInvalid() const { return d_componentState.getValue() == ComponentState::Invalid; }
Expand Down
9 changes: 9 additions & 0 deletions applications/plugins/SofaImplicitField/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ sofa_find_package(Sofa.Component.Topology.Container.Constant REQUIRED)

set(HEADER_FILES
config.h.in
fwd.h
initSofaImplicitField.h

# This is backward compatibility
deprecated/SphereSurface.h
deprecated/ImplicitSurfaceContainer.h # This is a backward compatibility file toward ScalarField
deprecated/InterpolatedImplicitSurface.h # This is a backward compatibility file toward DiscreteGridField

components/engine/FieldToSurfaceMesh.h
components/engine/RayMarching.h
components/geometry/BottleField.h
components/geometry/DiscreteGridField.h
components/geometry/SphericalField.h
Expand All @@ -28,6 +31,8 @@ set(SOURCE_FILES
deprecated/SphereSurface.cpp
deprecated/InterpolatedImplicitSurface.cpp

components/engine/FieldToSurfaceMesh.cpp
components/engine/RayMarching.cpp
components/geometry/BottleField.cpp
components/geometry/ScalarField.cpp
components/geometry/DiscreteGridField.cpp
Expand All @@ -47,6 +52,10 @@ endif()
add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES} ${EXTRA_FILES})
target_link_libraries(${PROJECT_NAME} PRIVATE Sofa.Component.Topology.Container.Constant)

find_package(SofaPython3 REQUIRED)
if (SofaPython3_FOUND)
add_subdirectory(python)
endif()

## Install rules for the library and headers; CMake package configurations files
sofa_create_package_with_targets(
Expand Down
Loading
Loading