Skip to content

Commit

Permalink
Update remaining mesh
Browse files Browse the repository at this point in the history
  • Loading branch information
phohenberger committed Jul 2, 2024
1 parent 74c4547 commit d6adfa6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions znvis/mesh/arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
class Arrow(Mesh):
"""
A class to produce arrow meshes. Arrow meshes are a special case and need to
overwrite the create_mesh object of the parent mesh class.
overwrite the instantiate_mesh of the parent mesh class.
Attributes
----------
Expand All @@ -47,7 +47,7 @@ class Arrow(Mesh):
scale: float = 1.0
resolution: int = 10

def create_mesh(
def instantiate_mesh(
self, starting_position: np.ndarray, starting_orientation: np.ndarray = None
) -> o3d.geometry.TriangleMesh:
"""
Expand Down
2 changes: 1 addition & 1 deletion znvis/mesh/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class CustomMesh(Mesh):
file: str = None
scale: float = 1.0

def create_mesh(
def instantiate_mesh(
self, starting_position: np.ndarray, starting_orientation: np.ndarray = None
) -> o3d.geometry.TriangleMesh:
"""
Expand Down
2 changes: 1 addition & 1 deletion znvis/mesh/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __post_init__(self):

self.o3d_material = material

def create_mesh(
def instantiate_mesh(
self, starting_position: np.ndarray, starting_orientation: np.ndarray = None
) -> o3d.geometry.TriangleMesh:
"""
Expand Down
4 changes: 2 additions & 2 deletions znvis/particle/particle.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ def _create_mesh(self, position, director):
A mesh object
"""
if director is not None:
mesh = self.mesh.create_mesh(position, starting_orientation=director)
mesh = self.mesh.instantiate_mesh(position, starting_orientation=director)
else:
mesh = self.mesh.create_mesh(position)
mesh = self.mesh.instantiate_mesh(position)
if self.smoothing:
return mesh.filter_smooth_taubin(100)
else:
Expand Down
4 changes: 2 additions & 2 deletions znvis/particle/vector_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ def _create_mesh(self, position: np.ndarray, direction: np.ndarray):
mesh : o3d.geometry.TriangleMesh
A mesh object
"""
mesh = self.mesh.create_mesh(position, direction)

mesh = self.mesh.instantiate_mesh(position, direction)
if self.smoothing:
return mesh.filter_smooth_taubin(100)
else:
Expand Down

0 comments on commit d6adfa6

Please sign in to comment.