public BoundingBoxRenderableComponent(IVeldridShaderSpecification shader, DeviceBufferesUpdater deviceBufferes, BoundingBox box) : base(shader, deviceBufferes) { EntityTag = new ElementTag("BoundingBox"); Box = box; geometry = new Geometry3D(); var corners = box.GetCorners(); var points = new List <Vector3>() { corners.NearBottomLeft, corners.NearBottomRight, corners.NearTopLeft, corners.NearTopRight, corners.FarBottomLeft, corners.FarBottomRight, corners.FarTopLeft, corners.FarTopRight }; geometry.Positions = points; var index = 0; geometry.Indices = new List <int>(geometry.Positions.Select(x => index++)); var lb = new Std.Engine.Helpers.LineBuilder(); geometry = lb.Build(points); }
protected ShaderComponent(IVeldridShaderSpecification shader, DeviceBufferesUpdater deviceBufferes) { Shader = shader; Bufferes = deviceBufferes; Resources = new ResourcesUpdater(Shader.GetResourceDescription()); }
public LineGeometryRenderComponent(IVeldridShaderSpecification shader, DeviceBufferesUpdater deviceBufferes, Geometry3D geometry) : base(shader, deviceBufferes) { this.Geometry = geometry; }