90 | | v21.normalize(); |

91 | | v32.normalize(); |

| 90 | float length_21 = v21.normalize(); |

| 91 | float length_32 = v32.normalize(); |

| 92 | |

| 93 | float t = 5.0; |

| 94 | if (length_21==0.0) |

| 95 | { |

| 96 | OSG_NOTICE<<"length_21=="<<length_21<<", length_32="<<length_32<<std::endl; |

| 97 | osg::Vec3 bisector = v32 ^ osg::Vec3(0.0f,0.0f,1.0f); |

| 98 | bisector.normalize(); |

| 99 | osg::Vec3 new_vertex = v2 + bisector * t; |

| 100 | return new_vertex; |

| 101 | } |

| 102 | else if (length_32==0.0) |

| 103 | { |

| 104 | OSG_NOTICE<<"length_21=="<<length_21<<", length_32="<<length_32<<std::endl; |

| 105 | osg::Vec3 bisector = v21 ^ osg::Vec3(0.0f,0.0f,1.0f); |

| 106 | bisector.normalize(); |

| 107 | osg::Vec3 new_vertex = v2 + bisector * t; |

| 108 | return new_vertex; |

| 109 | } |

| 110 | |