projection

Implementing graphics pipeline

浪子不回头ぞ 提交于 2019-12-11 07:49:21
问题 Following on from this post from yesterday. The situation is the same as in the original post: I'm implementing my own Graphics pipeline, odd issue with transforms. However, I now believe that the issue isn't with the perspective projection and is a larger issue than just that. Right now the pipeline only has three stages, the first transforms individual vertices using the model and projection matrices. The next assembles these into the primitives, which are finally rendered by the rasteriser

DataContext Translate<> for anonymous types

痴心易碎 提交于 2019-12-11 07:36:12
问题 This is just selection of some columns from Cars: var qs = myDataContext.Cars .Select(c => new { c.id, c.color }) .ToList(); What I need is function, that would do the same, but via SqlCommand, so I can alter the process. Its (simplified) code is here public static IEnumerable<P> ProjectionFunction<T, P>( this System.Data.Linq.Table<T> input, Func<T, P> projection ) where T : class { System.Data.Linq.DataContext dc = input.Context; string paramList = string.Join( ",", typeof(P).GetProperties(

Coordinate transformations and projection issues

ぃ、小莉子 提交于 2019-12-11 07:16:10
问题 I've been trying for a while to get my mouse coordinates converted into 3D space coordinates in an OpenGL scene. Currently, my projections are a little bit of a mess (I think), and it doesn't seem to fully take my "camera" into account when I move around a scene. To check this, I draw a line. My resize function: void oglWidget::resizeGL(int width, int height) { if (height == 0) { height = 1; } pMatrix.setToIdentity(); pMatrix.perspective(fov, (float) width / (float) height, -1, 1); glViewport

How to draw ortho axes for object in perspective projection using modern OpenGL? [closed]

独自空忆成欢 提交于 2019-12-11 06:23:48
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last year . I have 3D scene with perspective projection. Also I can select an object on the scene. I need to draw axes for selected object. The problem is the axes don't save their size in perspective projection. If object is far from the eye (camera), axes is going be small too. How to draw axes with the same

How do I match the projection of my cartopy map with that of a shapefile?

送分小仙女□ 提交于 2019-12-11 05:54:35
问题 I am trying to synthesise the projections of a coastlines() map with that of a shapefile, whose .prj file says: GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984", SPHEROID["WGS_1984",6378137.0,298.257223563]], PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] My attempt is: import matplotlib.pyplot as plt import cartopy.crs as ccrs from cartopy.io import shapereader # set up a map with coastlines around Auckland: plt.figure(figsize=(10, 10)) platecarree = ccrs.PlateCarree(globe=ccrs.Globe

NHibernate Entity access through projection

这一生的挚爱 提交于 2019-12-11 05:48:44
问题 I have this mapping file: 'class name="WebTools.Data.Common.IHObjekt, WebTools.Data" table="IHObjekt"' .... 'property name="TYPBEZEICH" type="string"' ... 'many-to-one name="standort" column="STANDORT_ID" fetch="join"' And I would like to use a 'Projections.ProjectionList()' to reduce the number of returned columns from the query. I do this: 'ICriteria criteria = Session.CreateCriteria(typeof(Data.Common.IHObjekt));' 'ProjectionList projectionList = Projections.ProjectionList();' ..

My unworking implementation of perspective projection

天涯浪子 提交于 2019-12-11 05:05:51
问题 I wrote a program that takes in entry some points, expressed in 3D coordinates and that must be drawn in a 2D canvas. I use perspective projection, homogeneous coordinates and similar triangles to do that. However, my program does not work and I actually don't know why. I followed two tutorials. I really understood the geometrical definitions and properties I have read. However, my implementation fails... I will write references to these both courses little by little, to make your reading

QR Codes - Camera Orientation/Projection

孤街浪徒 提交于 2019-12-11 04:41:11
问题 I am looking for a library or method to decode a QR Code (or potentially another form of 2d barcode) and to be able to actually determine the camera position and orientation. This seems like it should be doable, but I am not entirely sure. Does anyone know what the best route for this is? Or if it is even possible? 回答1: zxing is the open-source Google-hosted Java library for 2d barcodes including QR. see com.google.zxing.ResultMetadataType.ORIENTATION (optional metadata returned in a

Using Projecions to fetch a particular column from child table

我只是一个虾纸丫 提交于 2019-12-11 03:58:33
问题 I have two tables Loan (id, amount, duration) LoanStatus(id, status, loan_id) // just an example, but it has lot more fields in this table Loan.java public class Loan{ private int id; private int amount; private int duration; private LoanStatus loanStatus; // getter and setters } LoanStatus.java public class LoanStatus{ // just an example, but it has many fields than what actually given private int id; private String status; private Loan loan; //getter and setters } Now I would like to get

How to use OpenLayers 3 with Proj4js

与世无争的帅哥 提交于 2019-12-11 02:20:29
问题 I'm working on a map viewer project and used openlayers 2 before this. Now I have to use OpenLayers 3 and map viewer app should support many different projections because I have wms and wfs layers from different sources and projections. I've found examples that use openlayers2 and proj4js. But I couldn't find explicit example for using ol3 and proj4js. What is your suggestion? 回答1: It seems that sometimes, like when using OpenLayers 3 and proj4 in Angular 2 using webpack, one needs to