Skip to content

Minor update, added get/set on a protected variable#138

Merged
PierreFonda3D merged 2 commits intomainfrom
Dev_SofaUnityXR
Mar 5, 2025
Merged

Minor update, added get/set on a protected variable#138
PierreFonda3D merged 2 commits intomainfrom
Dev_SofaUnityXR

Conversation

@PierreFonda3D
Copy link
Copy Markdown
Contributor

  • Minor update to SofaVisualModel: added getter and setter for a protected variable, making it useful for sphere mapping on Sofa Objects.

@PierreFonda3D PierreFonda3D requested a review from epernod March 3, 2025 11:22
return 0;
}

public Mesh GetMesh()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public Mesh GetMesh()
/// Getter: returns Unity Mesh object attached to the MeshFilter of this GameObject
public Mesh GetMesh()

return m_mesh;
}

public void SetMesh(Mesh mesh)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public void SetMesh(Mesh mesh)
/// Setter: Method to set Mesh attached to the MeshFilter of this GameObject
public void SetMesh(Mesh mesh)


public void SetMesh(Mesh mesh)
{
m_mesh=mesh;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
m_mesh=mesh;
m_mesh = mesh;
MeshFilter mf = gameObject.GetComponent<MeshFilter>();
if (mf != null)
{
mf.mesh = m_mesh;
}

@epernod epernod added pr: new feature pr: status to review To notify reviewers to review this pull-request labels Mar 3, 2025
Copy link
Copy Markdown
Contributor

@epernod epernod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PierreFonda3D did you see my reviews?

@PierreFonda3D PierreFonda3D merged commit eb8ce8f into main Mar 5, 2025
PierreFonda3D added a commit that referenced this pull request Mar 5, 2025
Minor update, added get/set on a protected variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: new feature pr: status to review To notify reviewers to review this pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants