@@ -123,37 +123,37 @@ float Triangle::getArea() const {
123123 return _v0.cross (_v1).length () * 0 .5f ;
124124}
125125
126- void Triangle::getMidpoint (Vector3& target) {
126+ void Triangle::getMidpoint (Vector3& target) const {
127127
128128 target.addVectors (this ->a_ , this ->b_ ).add (this ->c_ ).multiplyScalar (1 .0f / 3 );
129129}
130130
131- void Triangle::getNormal (Vector3& target) {
131+ void Triangle::getNormal (Vector3& target) const {
132132
133133 return getNormal (this ->a_ , this ->b_ , this ->c_ , target);
134134}
135135
136- void Triangle::getBarycoord (Vector3& point, Vector3& target) {
136+ void Triangle::getBarycoord (Vector3& point, Vector3& target) const {
137137
138138 return getBarycoord (point, this ->a_ , this ->b_ , this ->c_ , target);
139139}
140140
141- void Triangle::getUV (const Vector3& point, const Vector2& uv1, const Vector2& uv2, const Vector2& uv3, Vector2& target) {
141+ void Triangle::getUV (const Vector3& point, const Vector2& uv1, const Vector2& uv2, const Vector2& uv3, Vector2& target) const {
142142
143143 return getUV (point, this ->a_ , this ->b_ , this ->c_ , uv1, uv2, uv3, target);
144144}
145145
146- bool Triangle::containsPoint (const Vector3& point) {
146+ bool Triangle::containsPoint (const Vector3& point) const {
147147
148148 return containsPoint (point, this ->a_ , this ->b_ , this ->c_ );
149149}
150150
151- bool Triangle::isFrontFacing (const Vector3& direction) {
151+ bool Triangle::isFrontFacing (const Vector3& direction) const {
152152
153153 return isFrontFacing (this ->a_ , this ->b_ , this ->c_ , direction);
154154}
155155
156- void Triangle::closestPointToPoint (const Vector3& p, Vector3& target) {
156+ void Triangle::closestPointToPoint (const Vector3& p, Vector3& target) const {
157157
158158 const auto a = this ->a_ , b = this ->b_ , c = this ->c_ ;
159159 float v, w;
0 commit comments