Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
igorseabra4 committed Dec 3, 2018
1 parent 2920189 commit f5bda79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ public override void Draw(SharpRenderer renderer)
{
if (DontRender || isInvisible) return;

Vector4 Color = _color;
Color.W = Color.W == 0f ? 1f : Color.W;

if (ArchiveEditorFunctions.renderingDictionary.ContainsKey(_modelAssetID))
ArchiveEditorFunctions.renderingDictionary[_modelAssetID].Draw(renderer, world, isSelected ? renderer.selectedObjectColor * _color : _color);
ArchiveEditorFunctions.renderingDictionary[_modelAssetID].Draw(renderer, world, isSelected ? renderer.selectedObjectColor * Color : Color);
else
renderer.DrawPyramid(world, isSelected, 1f);
}
Expand Down
22 changes: 0 additions & 22 deletions IndustrialPark/Assets/ObjectAssets/DYNA/DynaPointer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,28 +141,6 @@ public override float GetDistance(Vector3 cameraPosition)
return null;
}

private float? TriangleIntersection(Ray r, float initialDistance)
{
if (triangles == null)
return initialDistance;

bool hasIntersected = false;
float smallestDistance = 1000f;

foreach (RenderWareFile.Triangle t in triangles)
if (r.Intersects(ref vertices[t.vertex1], ref vertices[t.vertex2], ref vertices[t.vertex3], out float distance))
{
hasIntersected = true;

if (distance < smallestDistance)
smallestDistance = distance;
}

if (hasIntersected)
return smallestDistance;
return null;
}

private float? TriangleIntersection(Ray r, float initialDistance, List<Models.Triangle> triangles, List<Vector3> vertices)
{
bool hasIntersected = false;
Expand Down

0 comments on commit f5bda79

Please sign in to comment.