projection

nhibernate queryOver projection syntax

蹲街弑〆低调 提交于 2019-12-03 13:36:49
I am trying some code out from a NH 3.0 Cookbook, and wondering why I can't get the code below to compile. I think the QueryProjectionBuilder that should make this work is in "NHibernate.Criterion.Lambda" but the using directive for it doesn't help. The problems are the SelectGroup and SelectAvg parts. Assuming the syntax from the book is correct, can anyone see a missing reference here? namespace Queries.Implementations { using System; using System.Collections.Generic; using System.Linq; using Eg.Core; using NHibernate; using NHibernate.Criterion; using NHibernate.Criterion.Lambda; public

How to set QGraphicsScene/View to a specific coordinate system

南楼画角 提交于 2019-12-03 11:07:02
问题 I want to draw polygons in a QGraphicsScene but where the polygons has latitude/longitude positions. In a equirectangular projection the coordinates goes from: ^ 90 | | -180----------------------------------->180 | | -90 How can I set the QGraphicsScene / QGraphicsView to such projection? Many thanks, Carlos. 回答1: Use QGraphicsScene::setSceneRect() like so: scene->setSceneRect(-180, -90, 360, 180); If you're concerned about the vertical axis being incorrectly flipped, you have a few options

How to expose a complete tree structure with Spring Data REST and HATEOAS?

拈花ヽ惹草 提交于 2019-12-03 08:37:52
I have a JPA tree structure @Entity public class Document { @Id @GeneratedValue(strategy = GenerationType.AUTO) private int id; private String text; @ManyToOne @JoinColumn(name = "parent") Document parent; @OneToMany(mappedBy = "parent", fetch = FetchType.EAGER) Set<Document> children; (getters and setters) } and a projection @Projection(name = "all", types = Document.class) public interface AllDocumentsProjection { int getId(); String getText(); Set<Document> getChildren(); } When I make a GET request with url localhost:8080/documents/1?projection=all I only get the first children of the root

CT projection (distance-driven) operator implementation?

走远了吗. 提交于 2019-12-03 08:01:57
问题 I am trying to use MATLAB to implement a CT (computed tomography) projection operator, A, which I think is also referred as "system matrix" often times. Basically, for a N x N image M, the projection data, P, can be obtained by multiplication of the project operator to the image: P = AM and the backprojection procedure can be performed by multiplying the (conjugate) transpose of the projection operator to the projection data: M = A'P Anyone has any idea/example/sample code on how to implement

Perspective Projection with OpenGL

萝らか妹 提交于 2019-12-03 06:37:09
I am confused about perspective projection. Here is the scenario that is confusing me. My frustrum's front plane is basically positioned at at positive z-axis and the back plane at a negative axis and rotated about some deg along the posive z-axis. Now, whenever I go through examples I see that the near and the far plane are all present in the negative z axis. My approach in this case was basically something like: glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustrum(-xval,+xval,-yval,+yval,-10,+10); gluLookAt(); // some point lying on this axis of symmetry about the point glMatrixMode(GL

Grails Criteria projections on joined table

时间秒杀一切 提交于 2019-12-03 06:18:56
问题 I have an issue with grails criteria builder, I want to do a projection on a column that is on a table that is in one-to-many relation to parent table example: Car.createCriteria() { projections { property('name') property('wheels.name')// ???? } join 'wheels' //or wheels {} ??? } or something similar exist? I think it is basic propblem with aliases 回答1: I am assuming the following domain classes: class Car { String name static hasMany = [wheels : Wheel] } class Wheel { String name static

Projection- Transforming 3d to 2d

感情迁移 提交于 2019-12-03 06:16:35
I have problem or well, I do not know how to transform 3d point with x,y,z values to 2d point, I have to draw projection, where I do have x,y,z values for points but I don't know how to transform them into 2d so I can move them onto my axis. I have been looking around wiki and google, howevever I'm not quite sure which matrix transformations should I use to get wanted result. Let's first assume the camera looking at your scene is centered at the origin, and looking at the -z direction. Then: a perspective projection is given by: x' = x/z y' = y/z an orthographic projection is given by: x' = x

How to convert spherical coordinates to equirectangular projection coordinates?

坚强是说给别人听的谎言 提交于 2019-12-03 05:15:28
问题 Simplified question How do you convert a spherical coordinate (θ, φ) into a position (x, y) on an equirectangular projection (also called 'geographic projection')? In which: x is longitude, the horizontal position, from -180 to 180 degrees. y is latitude, the vertical position, from -90 to 90 degrees. θ is theta, the horizontal angle in degrees, a vector from (0,0,0) to a point on the surface of a sphere. φ is phi, the vertical angle in degrees, a vector from (0,0,0) to a point on the surface

2D outline algorithm for projected 3D mesh

允我心安 提交于 2019-12-03 02:46:30
问题 Given: A 3D mesh defined with a set of vertices and triangles building up the mesh with these points. Problem: Find the 2d outline of the projected arbitrarily rotated mesh on an arbitrary plane. The projection is easy. The challenge lies in finding the "hull" of the projected triangle edges in the plane. I need some help with input/pointers on researching this algorithm. For simplicity, we can assume the 3D edges are projected straight down onto the xy plane. 回答1: Start with the rightmost

Exact definition of the matrices in OpenCv StereoRectify

那年仲夏 提交于 2019-12-03 01:38:12
Normally the definition of a projection matrix P is the 3x4 matrix which projects point from world coordinates to image/pixel coordinates. The projection matrix can be split up into: K : a 3x4 camera matrix K with the intrinsic parameters T : a 4x4 transformation matrix with the extrinsic parameters The projection matrix is then P = K * T . What are the clear definitions of the following input to OpenCV's stereoRectify: cameraMatrix1 – First camera matrix (I assume it is the instrinsic K part of the projection matrix, correct?) . R – Rotation matrix between the coordinate systems of the first