File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -2882,6 +2882,7 @@ def kernel_init_vgeom_fields(
28822882 vgeoms_vface_start : ti .types .ndarray (),
28832883 vgeoms_vvert_end : ti .types .ndarray (),
28842884 vgeoms_vface_end : ti .types .ndarray (),
2885+ vgeoms_color : ti .types .ndarray (),
28852886 # taichi variables
28862887 vgeoms_info : array_class .VGeomsInfo ,
28872888 static_rigid_sim_config : ti .template (),
@@ -2904,6 +2905,8 @@ def kernel_init_vgeom_fields(
29042905 vgeoms_info .vface_num [i ] = vgeoms_vface_end [i ] - vgeoms_vface_start [i ]
29052906
29062907 vgeoms_info .link_idx [i ] = vgeoms_link_idx [i ]
2908+ for j in ti .static (range (4 )):
2909+ vgeoms_info .color [i ][j ] = vgeoms_color [i , j ]
29072910
29082911
29092912@ti .kernel
Original file line number Diff line number Diff line change @@ -1731,7 +1731,7 @@ class StructVgeomsInfo:
17311731 pos : V_ANNOTATION
17321732 quat : V_ANNOTATION
17331733 link_idx : V_ANNOTATION
1734- vvert_num : V_ANNOTATION
1734+ : V_ANNOTATION
17351735 vvert_start : V_ANNOTATION
17361736 vvert_end : V_ANNOTATION
17371737 vface_num : V_ANNOTATION
@@ -1751,6 +1751,7 @@ def get_vgeoms_info(solver):
17511751 "vface_num" : V (dtype = gs .ti_int , shape = shape ),
17521752 "vface_start" : V (dtype = gs .ti_int , shape = shape ),
17531753 "vface_end" : V (dtype = gs .ti_int , shape = shape ),
1754+ "color" : V (dtype = gs .ti_vec4 , shape = shape ),
17541755 }
17551756
17561757 if use_ndarray :
You can’t perform that action at this time.
0 commit comments