com.ardor3d.scenegraph.Node.propageEventUp()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(232)

本文整理了Java中com.ardor3d.scenegraph.Node.propageEventUp()方法的一些代码示例,展示了Node.propageEventUp()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.propageEventUp()方法的具体详情如下:
包路径:com.ardor3d.scenegraph.Node
类名称:Node
方法名:propageEventUp

Node.propageEventUp介绍

暂无

代码示例

代码示例来源:origin: Renanse/Ardor3D

  1. /**
  2. * Propagate the dirty event up the hierarchy. If a listener is found on the spatial the event is fired and the
  3. * propagation is stopped.
  4. *
  5. * @param spatial
  6. * the spatial
  7. * @param dirtyType
  8. * the dirty type
  9. * @param dirty
  10. * if true, propogate a dirty event, else propogate a clean event
  11. */
  12. protected void propageEventUp(final Spatial spatial, final DirtyType dirtyType, final boolean dirty) {
  13. boolean consumed = false;
  14. if (_listener != null) {
  15. if (dirty) {
  16. consumed = _listener.spatialDirty(spatial, dirtyType);
  17. } else {
  18. consumed = _listener.spatialClean(spatial, dirtyType);
  19. }
  20. }
  21. if (!consumed && _parent != null) {
  22. _parent.propageEventUp(spatial, dirtyType, dirty);
  23. }
  24. }

代码示例来源:origin: com.ardor3d/ardor3d-core

  1. /**
  2. * Propagate the dirty event up the hierarchy. If a listener is found on the spatial the event is fired and the
  3. * propagation is stopped.
  4. *
  5. * @param spatial
  6. * the spatial
  7. * @param dirtyType
  8. * the dirty type
  9. * @param dirty
  10. * if true, propogate a dirty event, else propogate a clean event
  11. */
  12. protected void propageEventUp(final Spatial spatial, final DirtyType dirtyType, final boolean dirty) {
  13. boolean consumed = false;
  14. if (_listener != null) {
  15. if (dirty) {
  16. consumed = _listener.spatialDirty(spatial, dirtyType);
  17. } else {
  18. consumed = _listener.spatialClean(spatial, dirtyType);
  19. }
  20. }
  21. if (!consumed && _parent != null) {
  22. _parent.propageEventUp(spatial, dirtyType, dirty);
  23. }
  24. }

相关文章