| 119 | } |
| 120 | |
| 121 | bool TSShapeInstance::getFeatures(const MatrixF& mat, const Point3F& n, ConvexFeature* cf, S32 dl) |
| 122 | { |
| 123 | // if dl==-1, nothing to do |
| 124 | if (dl==-1) |
| 125 | return false; |
| 126 | |
| 127 | AssertFatal(dl>=0 && dl<mShape->details.size(),"TSShapeInstance::buildPolyList"); |
| 128 | |
| 129 | // get subshape and object detail |
| 130 | const TSDetail * detail = &mShape->details[dl]; |
| 131 | S32 ss = detail->subShapeNum; |
| 132 | S32 od = detail->objectDetailNum; |
| 133 | |
| 134 | // nothing emitted yet... |
| 135 | bool emitted = false; |
| 136 | U32 surfaceKey = 0; |
| 137 | |
| 138 | S32 start = mShape->subShapeFirstObject[ss]; |
| 139 | S32 end = mShape->subShapeNumObjects[ss] + start; |
| 140 | if (start<end) |
| 141 | { |
| 142 | MatrixF final; |
| 143 | const MatrixF* previousMat = &mMeshObjects[start].getTransform(); |
| 144 | final.mul(mat, *previousMat); |
| 145 | |
| 146 | // run through objects and collide |
| 147 | for (S32 i=start; i<end; i++) |
| 148 | { |
| 149 | MeshObjectInstance * mesh = &mMeshObjects[i]; |
| 150 | |
| 151 | if (od >= mesh->object->numMeshes) |
| 152 | continue; |
| 153 | |
| 154 | if (&mesh->getTransform() != previousMat) |
| 155 | { |
| 156 | previousMat = &mesh->getTransform(); |
| 157 | final.mul(mat, *previousMat); |
| 158 | } |
| 159 | emitted |= mesh->getFeatures(od, final, n, cf, surfaceKey); |
| 160 | } |
| 161 | } |
| 162 | return emitted; |
| 163 | } |
| 164 | |
| 165 | bool TSShapeInstance::castRay(const Point3F & a, const Point3F & b, RayInfo * rayInfo, S32 dl) |
| 166 | { |
nothing calls this directly
no test coverage detected